点集贵州电脑网
 
 
 梦想之源 ›› 灌水专区 ›› 在T4中遇到的一个错误的问题 版主:
灌水专区
新建论坛
申请免费TS
1 / 1 页
<< 1 >>
跳转
 主题:在T4中遇到的一个错误的问题
 
 lele
发表时间:[2007-11-02 09:19:44] [向作者发站内短信] [复制链接告诉朋友]
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0

错误如下:

请帮忙分析下

 

org.apache.tapestry.BindingException
Unable to read OGNL expression '<parsed OGNL expression>' of $AddorUpdatePage_14@76a6d9[AddDevice]: source is null for getProperty(null, "prototypeid")
binding: ExpressionBinding[AddDevice po.prototypeid]
location: context:/device/AddDevice.page, line 21, column 62
16 <binding name="value" value="ognl:po.connectip"/>
17 </component>
18  
19 <component id="device_type" type="PropertySelection">
20 <binding name="model" value="ognl:getSelect('1000001','action=getdeviceprototypelist')"/>
21 <binding name="value" value="ognl:po.prototypeid"/>
22 </component>
23  
24 <component id="isCollect" type="Checkbox">
25 <binding name="value" value="ognl:po.is_collect"/>
26 </component>
 
org.apache.hivemind.ApplicationRuntimeException
Unable to read OGNL expression '<parsed OGNL expression>' of $AddorUpdatePage_14@76a6d9[AddDevice]: source is null for getProperty(null, "prototypeid")
component: $AddorUpdatePage_14@76a6d9[AddDevice]
location: context:/device/AddDevice.page, line 5, column 78
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE page-specification PUBLIC
3 "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
4 "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
5 <page-specification class="com.longcredit.KEye.app.business.AddorUpdatePage">
6  
7 <component id="Privilege" type="Privilege">
8 <binding name="pageName" value="'device'"/>
9 </component>
10  
 
ognl.OgnlException
source is null for getProperty(null, "prototypeid")
Stack Trace:
  • ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1611)
  • ognl.ASTProperty.getValueBody(ASTProperty.java:96)
  • ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
  • ognl.SimpleNode.getValue(SimpleNode.java:210)
  • ognl.ASTChain.getValueBody(ASTChain.java:109)
  • ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
  • ognl.SimpleNode.getValue(SimpleNode.java:210)
  • ognl.Ognl.getValue(Ognl.java:333)
  • ognl.Ognl.getValue(Ognl.java:310)

 

 

 


 楼主更多新贴 :  
灌水专区jfreechart图形上的链接
灌水专区itemselection的问题
灌水专区ognl:devicegroup.id
灌水专区foreach的问题
  楼1  
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0
 lele
发表时间:[2007-11-02 09:20:23] [向作者发站内短信] [复制链接告诉朋友]

 // 设置设备参数PO类
 public BasePO po;

 @Override
 protected void initialize() {

  po = null;
 }

 public void setPO(BasePO po) {

  this.po = po;

 }

 public BasePO getPO() {

  return this.po;
 }
 

  楼2  
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0
 lele
发表时间:[2007-11-02 09:23:15] [向作者发站内短信] [复制链接告诉朋友]

BasePO  是PO的父类 里面没有属性prototypeid 但是我换成Device类 也不行 仍然出这样的错误,感觉是.page里的错误

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE page-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
<page-specification class="com.longcredit.KEye.app.business.AddorUpdatePage">
   
    <component id="Privilege" type="Privilege">
        <binding name="pageName" value="'device'"/>
    </component>
   
   
    <component id="device_name" type="TextField">
          <binding name="value" value="ognl:po.name"/>
    </component>
    <component id="device_IP" type="TextField">
          <binding name="value" value="ognl:po.connectip"/>
    </component>
   
    <component id="device_type" type="PropertySelection">
          <binding name="model" value="ognl:getSelect('1000001','action=getdeviceprototypelist')"/>
          <binding name="value" value="ognl:po.prototypeid"/>
    </component>
 
    <component id="isCollect" type="Checkbox">
          <binding name="value" value="ognl:po.is_collect"/>
    </component>   
    <component id="port" type="TextField">
          <binding name="value" value="ognl:po.connectport"/>
    </component>
    <component id="cycle" type="TextField">
          <binding name="value" value="ognl:po.pollinterval"/>
    </component>    
    <component id="username" type="TextField">
          <binding name="value" value="ognl:po.connectusername"/>
    </component>
    <component id="password" type="TextField">
          <binding name="value" value="ognl:po.connectpassword"/>
          <binding name="hidden" value="true"/>
    </component>
   
    <component id="collection_controller" type="PropertySelection">
          <binding name="model" value="ognl:getSelect('1000002','action=getcollectorlist')"/>
          <binding name="value" value="ognl:po.collectorid"/>
    </component>
   
    <component id="isPublicKeyVidate" type="Checkbox">
          <binding name="value" value="ognl:po.is_pblickeyvidate"/>
    </component> 
     <component id="secretKey" type="TextArea">
          <binding name="value" value="ognl:po.secretkey"/>
    </component>  
    
    <component id="snmpString" type="TextArea">
          <binding name="value" value="ognl:po.connectcommunity"/>
    </component>  

    <component id="snmpVersion" type="PropertySelection">
          <binding name="model" value="ognl:sNMPVersionSelectItem"/>
          <binding name="value" value="ognl:po.connectversion"/>
    </component>
   
    <component id="connectprompt" type="TextArea">
          <binding name="value" value="ognl:po.connectprompt"/>
    </component>  
    
     <component id="connectkeyfile" type="TextArea">
          <binding name="value" value="ognl:po.connectprompt"/>
    </component>   
    
    <component id="device" type="Hidden">
          <binding name="value" value="ognl:po"/>
    </component>
        
    <component id="device_add_submit" type="Submit">
        <binding name="listener" value="listener:updateOrAdd"/>
        <binding name="parameters" value='{"action=adddevice&amp;","com.longcredit.KEye.app.business.PO.Device","updateDeviceSuccess","updateDeviceFail"}'/>
    </component>
                    
</page-specification>

  楼3  
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0
 lele
发表时间:[2007-11-02 09:24:00] [向作者发站内短信] [复制链接告诉朋友]

现在帖 的代码都是 增加页面和规范 在主页面上点增加 跳转的时候出错误了

  楼4  
等 级:下士
经 验:1683
性 别:帅哥
文 章:496
精 华:2
 干煸四季豆
发表时间:[2007-11-02 12:17:53] [向作者发站内短信] [复制链接告诉朋友]

Unable to read OGNL expression '<parsed OGNL expression>' of $AddorUpdatePage_14@76a6d9[AddDevice]: source is null for getProperty(null, "prototypeid")

是指po.connectip的po为null

  楼5  
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0
 lele
发表时间:[2007-11-02 12:42:42] [向作者发站内短信] [复制链接告诉朋友]

问题解决了 呵呵 确实是PO为空

1 / 1 页
<< 1 >>
跳转
  快速回复
  帐号: 密码: 匿名不登陆
回复内容:  
验 证 码:
 
 
·VIP收费TS,您明智的选择!
·9800GT+19'液晶DIY仅售3500元
·双核特惠:1999、2999、3999
·什么是点金积分,如何查看自
·团购一期:三星R458-DS0G+高
  
贵州点集科技发展有限责任公司·点集贵州电脑网 版权所有©2006-2008
中华人民共和国增值电信业务经营许可证 黔B-20070010号
客服QQ: 93804809818866281927205370
电子邮件: deangi@vip.sina.com
技术支持: 0851-5109268