起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1296|回复: 9

[结贴] 无法获取属性“loadData”的值: 对象为 null 或未定义

[复制链接]

29

主题

84

帖子

200

积分

中级会员

Rank: 3Rank: 3

积分
200
QQ
发表于 2014-3-19 13:35:36 | 显示全部楼层 |阅读模式
页面一加载报这个错误 可以搜索了一下也没有这个loadData

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2014-3-19 13:41:44 | 显示全部楼层
代码中有loadXML或者loadJSon吧看看正确吗
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

29

主题

84

帖子

200

积分

中级会员

Rank: 3Rank: 3

积分
200
QQ
 楼主| 发表于 2014-3-19 13:45:52 | 显示全部楼层
jishuang 发表于 2014-3-19 13:41
代码中有loadXML或者loadJSon吧看看正确吗

源码和js里都没有啊
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2014-3-19 14:00:19 | 显示全部楼层
把.w和js文件发一下
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

29

主题

84

帖子

200

积分

中级会员

Rank: 3Rank: 3

积分
200
QQ
 楼主| 发表于 2014-3-19 14:12:46 | 显示全部楼层
jishuang 发表于 2014-3-19 14:00
把.w和js文件发一下

<?xml version="1.0" encoding="utf-8"?>
<xui:window xmlns:xui="http://www.justep.com/xui" xmlns="http://www.justep.com/xui" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.justep.com/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" component="/UI/system/components/window.xbl.xml#window" id="window">  
  <xforms:model id="model1" style="height:auto;top:139px;left:216px;">
    <data component="/UI/system/components/data.xbl.xml#bizData" update-mode="whereVersion" data-type="json" auto-load="true" id="listData" concept="PM_LXSQB"><creator id="default2" action="/PM/PMsys/logic/action/createPM_LXSQBAction"></creator>
  <reader id="default3" action="/PM/PMsys/logic/action/queryPM_LXSQBAction"></reader>
  <writer id="default4" action="/PM/PMsys/logic/action/savePM_LXSQBAction"></writer>
  <calculate-relation relation="calculate0" id="calculate-relation1" type="xsd:integer"></calculate-relation></data></xforms:model>  
  <xui:view auto-load="true" id="rootView">
    <xui:layout style="height:100%;width:100%">
      <xhtml:div component="/UI/system/components/borderLayout.xbl.xml#borderLayout" id="borderLayout1" style="width:100%; height: 100%;;;">
   <top id="borderLayout-top1" size="40px">
    <xhtml:div collapsed-label="隐藏过滤" component="/UI/system/components/buttonBar.xbl.xml#buttonBar" expandable="false" expanded="true" expanded-label="展开过滤" expanded-position="6" expanded-width="75" id="navigatorBar" separator="false" separator-size="2">
     <xui:place control="newTrigger" id="controlPlace2"></xui:place>
     <xui:place control="editTrigger" id="controlPlace6"></xui:place>
     <xui:place control="deleteTrigger" id="controlPlace3"></xui:place>
     <xui:place control="refreshTrigger" id="controlPlace4"></xui:place>
     <xhtml:div class="xui-input" component="/UI/system/components/smartFilter.xbl.xml#smartFilter" filter-data="listData" filter-relations="fXMMC" id="smartFilter1" style="width:120px;"></xhtml:div>
     <xforms:trigger appearance="image" class="button-yellow" component="/UI/system/components/trigger.xbl.xml#trigger" icon-class="icon-system-search" id="searchTrigger" operation="refresh" operation-owner="listData" style="width:30px;">
      <xforms:label id="searchTriggerLabel"></xforms:label></xforms:trigger> </xhtml:div> </top>
   <center id="borderLayout-center1">
    <xui:place control="grid1" id="controlPlace1" style="width:100%;height:100%;"></xui:place></center>
   <bottom id="borderLayout-bottom1" size="40px">
    <xui:place control="pagination1" id="controlPlace5"></xui:place></bottom> </xhtml:div>
  <xui:place control="windowDialog1" id="controlPlace9" style="position:absolute;top:144px;left:84px;"></xui:place></xui:layout>  
    <xforms:trigger appearance="image-text" class="button-blue" component="/UI/system/components/trigger.xbl.xml#trigger" icon-class="icon-system-plus" id="newTrigger">
   <xforms:label id="newTriggerLabel">新建</xforms:label>
   <xforms:action id="action2" ev:event="DOMActivate"><xforms:script id="xformsScript2"><![CDATA[mainActivity.newTriggerClick(event)]]></xforms:script></xforms:action></xforms:trigger>
  <xforms:trigger appearance="image-minimal" component="/UI/system/components/trigger.xbl.xml#trigger" icon-class="icon-system-edit-alt" id="editTrigger">
   <xforms:label id="default1">编辑</xforms:label>
   <xforms:action ev:event="DOMActivate" id="action1">
    <xforms:script id="xformsScript1">mainActivity.editItemClick(event)</xforms:script></xforms:action> </xforms:trigger>
  <xforms:trigger appearance="image-minimal" component="/UI/system/components/trigger.xbl.xml#trigger" icon-class="icon-system-trash" id="deleteTrigger" operation="delete" operation-owner="listData">
   <xforms:label id="deleteTriggerLabel"></xforms:label></xforms:trigger>
  <xforms:trigger appearance="image-minimal" component="/UI/system/components/trigger.xbl.xml#trigger" id="refreshTrigger" operation="refresh" operation-owner="listData">
   <xforms:label id="refreshTriggerLabel"></xforms:label></xforms:trigger>
  <xhtml:div align="right" component="/UI/system/components/pagination.xbl.xml#pagination" data="listData" first-label="首页" id="pagination1" items="first last pre next" last-label="尾页" next-label="下页" page-count="15" pre-label="上页"></xhtml:div>
  <xhtml:div class="grid-compact" component="/UI/system/components/grid.xbl.xml#grid" header-row-height="30" row-height="30" show-header-menu="hide-column,save-layout,group-column,adjust-column" smart-render="20" id="grid1" data="listData"><xui:column id="gridColumn8" ref="calculate0" label="序号" type="ed" width="30px" show-index="true"></xui:column>
  <xui:column id="gridColumn1" ref="fXMMC" label="项目名称" type="ed" width="100px"></xui:column>
  <xui:column id="gridColumn2" ref="fXMLX" label="项目类型" type="ed" width="100px"></xui:column>
  <xui:column id="gridColumn3" ref="fYHDWQC" label="用户单位全称" type="ed" width="100px"></xui:column>
  <xui:column id="gridColumn4" ref="fXMDJ" label="项目等级" type="ed" width="100px"></xui:column>
  <xui:column id="gridColumn5" ref="fSZDQ" label="市/州/地区" type="ed" width="100px"></xui:column>
  <xui:column id="gridColumn6" ref="fXQXZ" label="县/区/乡镇" type="ed" width="100px"></xui:column></xhtml:div>
  <xhtml:div component="/UI/system/components/windowDialog.xbl.xml#windowDialog" title="立项信息" width="400px" height="300px" modal="true" id="windowDialog1" url="/UI/PM/PMsys/process/ProDeclare/mainActivityLX.w" status="maximize"></xhtml:div></xui:view>  
  <xui:resource id="resource1">
    <xhtml:script id="htmlScript1" src="mainActivity.js"/>
  </xui:resource>
</xui:window>

回复 支持 反对

使用道具 举报

29

主题

84

帖子

200

积分

中级会员

Rank: 3Rank: 3

积分
200
QQ
 楼主| 发表于 2014-3-19 14:13:03 | 显示全部楼层
jishuang 发表于 2014-3-19 14:00
把.w和js文件发一下

var mainActivity = {};

mainActivity.openDialog = function(operator, id){
        justep.xbl("windowDialog1").open({
                operator : operator,
                id : id
        });
}

mainActivity.newTriggerClick = function(event){
        mainActivity.openDialog("new");
       
};

/**
        name:windowDialog#onReceive}
        @param {function} onInit 初始化事件,参见{@link UI.windowDialog#onInit}
        @param {function} onOpen 对话框打开事件,参见{@link UI.windowDialog#onOpen}
        @param {function} onClose 对话框关闭事件,参见{@link UI.windowDialog#onClose}
description: 构造函数
        @example
        //动态创建
        var dialog = new justep.WindowDialog(id, url, title);
*/
mainActivity.windowDialog1Receive = function(event){
        justep.xbl('listData').refreshData();
};

mainActivity.editItemClick = function(event){
        var data = justep.xbl('listData');
        var id = data.getCurrentID();
        if(!!id)
                mainActivity.openDialog("edit",id);       
};

mainActivity.grid1RowDblClick = function(event){
        var data = justep.xbl('listData');
        var id = data.getCurrentRowId();
        if (!!id)
                mainActivity.openDialog("edit", id);       
};
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2014-3-19 14:23:36 | 显示全部楼层
打开页面就报错了吗?测试没问题 ,确认grid中的列是否都正确?模型检查一下看看
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

29

主题

84

帖子

200

积分

中级会员

Rank: 3Rank: 3

积分
200
QQ
 楼主| 发表于 2014-3-19 14:34:40 | 显示全部楼层
jishuang 发表于 2014-3-19 14:23
打开页面就报错了吗?测试没问题 ,确认grid中的列是否都正确?模型检查一下看看 ...

无法获取属性“loadData”的值: 对象为 null 或未定义
at (http://localhost:8080/x5/PM/PMsys/process/ProDeclare/mainActivity.w?$log=1&bsessionid=7C497D1456D9E87F94727D92183EABA6&language=zh_CN&process=/PM/PMsys/process/ProDeclare/proDeclareProcess&activity=mainActivity:1)
回复 支持 反对

使用道具 举报

29

主题

84

帖子

200

积分

中级会员

Rank: 3Rank: 3

积分
200
QQ
 楼主| 发表于 2014-3-19 14:36:48 | 显示全部楼层
jishuang 发表于 2014-3-19 14:23
打开页面就报错了吗?测试没问题 ,确认grid中的列是否都正确?模型检查一下看看 ...

要不远程一下看看吧
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35920
发表于 2014-3-19 14:44:13 | 显示全部楼层
已远程,发的.w不是错误的那个.w

这个错误的原因是data的store-type设置为grid,但并没有用grid或者gridSelect关联
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-3 20:56 , Processed in 0.072939 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表