用ext3+struts2,显示表格,firebug报错l is undefined

ext代码:
[code="java"]Ext.onReady(function(){

var cm_medicine = new Ext.grid.ColumnModel([
{header : '药品名称(中文)',dataIndex : 'medNameCN'},
{header : '药品名称(英文)', dataIndex : 'medNameEN',sortable : true},
{header : '类型', dataIndex : 'medMode',menuDisabled : true},
{header : '类别', dataIndex : 'medSortName',menuDisabled : true},
{header : '单位', menuDisabled : true,dataIndex : 'medUnit'},
{header : '价格',dataIndex : 'medPrice',sortable : true},
{header : '生产厂家',dataIndex : 'medFactory',sortable:true},
{header : '创建人', dataIndex : 'medCreater',sortable : true}]
);
var ds_medicine = new Ext.data.Store({
url : 'findAllMedicine.action',
reader : new Ext.data.JsonReader(
{totalProperty : 'totalProperty',root : 'root'},
[{name : 'medId',type : 'int'},
{name : 'medNameCN',type : 'string'},
{name : 'medNameEN',type : 'string'},
{name : 'medCreater',type : 'string'},
//{name : 'medEDate',type : 'date'},
{name : 'medFactory',type : 'string'},
{name : 'medGuiGe',type : 'string'},
//{name : 'medInDate',type : 'date'},
{name : 'medMode',type : 'string'},
{name : 'medNote',type : 'string'},
//{name : 'medPDate',type : 'date'},
{name : 'medPL',type : 'string'},
{name : 'medPrice',type : 'float'},
{name : 'medUnit',type : 'string'},
{name : 'medUse',type : 'string'}
//{name : 'medSortId',mapping:'medSort.medSortId',type : 'int'},
//{name : 'medSortName',mapping:'medSort.medSortName',type : 'string'}

])

});
ds_medicine.load();
var grid_medicine = new Ext.grid.GridPanel({
region : 'center',
loadMask : {msg : '请稍候...'},
enableColumnMove : false,
cm : cm_medicine,
ds : ds_medicine,
sm : new Ext.grid.RowSelectionModel({singleSelect : true}),

viewConfig : {forceFit : true}
//plugins : expander,

// tbar : [btn_add_medicine, '-',btn_edit_medicine, '-', btn_del_medicine, '-',
// text_search_medicine,btn_search_medicine],
// bbar : new Ext.PagingToolbar({
// pageSize : 25,
// store : ds_medicine,
// displayInfo : true,
// displayMsg : '第 {0} - {1} 条 共 {2} 条',
// emptyMsg : "没有记录"
// })

});
var medicine_panel = new Ext.Panel({
title : '药品管理',
iconCls : 'icon-plugin',
region : 'center',
border : 'layout',
frame : true,
layout:'border',
defaults: {
collapsible: true,
split: true
},
items: [{
region:'center',
layout : 'border',
items : [grid_medicine]
}]
});
var viewport = new Ext.Viewport({
layout:'border',

         items:[medicine_panel]
     });

});[/code]
Action:
[code="java"]

medicineInfos

    </result>
 </action>

[/code]
Action方法:
[code="java"]
public String findAll(){
medicineInfos=medicineInfoManager.searchWithNameCN("");
totalProperty=medicineInfos.size();
System.out.println("listsize:"+totalProperty);
return SUCCESS;
}[/code]

Firebug的错误:
Break on Error
l is undefined
Ext.DomHelper=function(){var s=null,j=/^(.....

后台输入得知找到了8条记录,刚学EXT,还有很多东西弄不清楚,希望各位大哥解答一下。。。

7个回答

return SUCCESS;值是为 success 吗?
还有medicineInfos 提供了getMedicineInfos 函数吗?
或者把你action代码发来看看

其他浏览器下报错吗?JS错误你这样贴代码上来不容易解决,建议采取排除法依次删除怀疑有问题的代码。

吧medicineInfos 去了

{totalProperty : 'totalProperty',root : 'root'}, 改成
{totalProperty : 'totalProperty',root : 'medicineInfos'},

medicineInfos //设置json插件解析那个属性 所以要去了。
{totalProperty : 'totalProperty',root : 'medicineInfos'}, //root totalProperty ,设置映射 action属性

return SUCCESS; 需要对应struts result name属性 result type 必须是json

或者直接访问 findAllMedicine.action 吧json数据发过来看看

你这样写吧.
struts.xml :

action :
action 中添加一个方法:
protected String returnJSON(String json) {
if(json == null)return null;
try{
response.setCharacterEncoding("UTF-8");
response.setContentType("text/plain; Charset=UTF-8");
response.setHeader("Cache-Control", "no-cache");
response.getWriter().write(json);
}catch(Exception e){
e.printStackTrace();
}
return null;
}

调用的action方法:这样写
把你要反悔到前段的json 转发成字符串,使用 returnJSON(String json) 这个方法 返回,
如:
public String findAll(){

medicineInfos=medicineInfoManager.searchWithNameCN("");

totalProperty=medicineInfos.size();

//这里吧你的对象 medicineInfos 转化成你前台要返回的json格式数据
//如:String json = getJson(medicineInfos);
return returnJSON(json);

}

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
用ext3+struts2,显示表格,firebug报错l is undefined
ext代码:rn[code="java"]Ext.onReady(function()rnrnvar cm_medicine = new Ext.grid.ColumnModel([ rn header : '药品名称(中文)',dataIndex : 'medNameCN', rn header : '药品名称(英文)', dataIndex : 'medNameEN',sortable : true, rn header : '类型', dataIndex : 'medMode',menuDisabled : true, rn header : '类别', dataIndex : 'medSortName',menuDisabled : true, rn header : '单位', menuDisabled : true,dataIndex : 'medUnit', rn header : '价格',dataIndex : 'medPrice',sortable : true, rn header : '生产厂家',dataIndex : 'medFactory',sortable:true, rn header : '创建人', dataIndex : 'medCreater',sortable : true]rn);rnvar ds_medicine = new Ext.data.Store(rn url : 'findAllMedicine.action',rn reader : new Ext.data.JsonReader(rn totalProperty : 'totalProperty',root : 'root', rn [name : 'medId',type : 'int', rn name : 'medNameCN',type : 'string', rn name : 'medNameEN',type : 'string', rn name : 'medCreater',type : 'string',rn //name : 'medEDate',type : 'date', rn name : 'medFactory',type : 'string',rn name : 'medGuiGe',type : 'string',rn //name : 'medInDate',type : 'date',rn name : 'medMode',type : 'string',rn name : 'medNote',type : 'string',rn //name : 'medPDate',type : 'date',rn name : 'medPL',type : 'string',rn name : 'medPrice',type : 'float',rn name : 'medUnit',type : 'string',rn name : 'medUse',type : 'string'rn //name : 'medSortId',mapping:'medSort.medSortId',type : 'int',rn //name : 'medSortName',mapping:'medSort.medSortName',type : 'string'rn rn ])rn);rnds_medicine.load();rnvar grid_medicine = new Ext.grid.GridPanel(rn region : 'center',rn loadMask : msg : '请稍候...',rn enableColumnMove : false,rn cm : cm_medicine,rn ds : ds_medicine,rn sm : new Ext.grid.RowSelectionModel(singleSelect : true),rnrn viewConfig : forceFit : truern //plugins : expander,rn// tbar : [btn_add_medicine, '-',btn_edit_medicine, '-', btn_del_medicine, '-', rn// text_search_medicine,btn_search_medicine],rn// bbar : new Ext.PagingToolbar(rn// pageSize : 25,rn// store : ds_medicine,rn// displayInfo : true,rn// displayMsg : '第 0 - 1 条 共 2 条',rn// emptyMsg : "没有记录"rn// )rn rn);rnvar medicine_panel = new Ext.Panel(rn title : '药品管理',rn iconCls : 'icon-plugin',rn region : 'center',rn border : 'layout',rn frame : true,rn layout:'border',rn defaults: rn collapsible: true,rn split: truern ,rn items: [rn region:'center',rn layout : 'border',rn items : [grid_medicine]rn ]rn);rn var viewport = new Ext.Viewport(rn layout:'border',rn rn items:[medicine_panel]rn );rnrn);[/code]rnAction:rn[code="java"]rn rn medicineInfosrn rn rn rn[/code]rnAction方法:rn[code="java"]rn public String findAll()rn medicineInfos=medicineInfoManager.searchWithNameCN("");rn totalProperty=medicineInfos.size();rn System.out.println("listsize:"+totalProperty);rn return SUCCESS;rn [/code]rnrnFirebug的错误:rnBreak on Errorrnl is undefinedrnExt.DomHelper=function()var s=null,j=/^(.....rnrn后台输入得知找到了8条记录,刚学EXT,还有很多东西弄不清楚,希望各位大哥解答一下。。。
Ext3表格汇总插件
根据GroupSummary改编,效果也和GroupSummary类似,在普通grid中实现汇总功能。 和网上其他Summary不同,这个不需要更改grid的代码,是真正插件的形式。
responsetext 在firefox中显示undefined firebug显示response的数据正确
responsetext 在firefox中显示undefined(IE可以正常显示), firebug显示response的数据正确rnrn var XmlHttp = false;rn rn if(window.XMLHttpRequest)rn rn XmlHttp = new XMLHttpRequest();rn rn else if(window.ActiveXObject)rn rn tryrn rn XmlHttp = new ActiveXObject("Msxml2.XMLHTTP");rn rn catch (e)rn rn tryrn rn XmlHttp = new ActiveXObject("Microsoft.XMLHTTP");rn rn catch(e)rn rn rn rn rn rnrnrnrnfunction TitleNamechange()// check Titlenamern rn //XmlHttp=new getxmlhttpRequest();rn var TitleName = document.getElementById("TitleName").value;rn var flag = "NewPage";rn if((TitleName == null)||(TitleName==""))return;rn var url = "FindData.ashx?Tname="+escape(TitleName)+"&flag=" +escape(flag);rn XmlHttp.open("GET",url,true);rn XmlHttp.onreadystatechange = updatepage;rn XmlHttp.send(null);rn rn rnfunction updatepage()rn rn if(XmlHttp.readyState==4)rn rn if(XmlHttp.status == 200)rn rn document.getElementById("TNresult").innerHTML = XmlHttp.responsetext; rn rn else if(XmlHttp.status== 404)rn rn alert("Requset Url not found!");rn rnrn rn rn各位帮忙看看怎么回事?????
eclipse用struts2报错
在网上看了一个struts2的分页代码,自己做了做怎么也不行。一直报错,错误如下;rnorg.apache.jasper.JasperException: File "/struts-tags" not foundrn org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)rn org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)rn org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)rn org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:160)rn org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)rn org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)rn org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)rn org.apache.jasper.compiler.Parser.parse(Parser.java:138)rn org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)rn org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)rn org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)rn org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)rn org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rnrn自己在网上查了查,说是找不到"/struts-tags",可是我的xml头是2.4的,按理说不需要指定,我改成2.3,自己加上rn rn /struts-tags rn /WEB-INF/struts-tags.tld rnrn告诉我struts-tags.tld 中的2.2.3错误,我将其值改成2.3,该文件不报错误,但是做了以上操作还是显示如上的"/struts-tags" not found”一系列错误。我会将代码贴出来,希望大家帮帮我,我用的struts2是2.1.6rneclipse是3.4java EE的,tomcat是6.0,jdk是1.5,jre是1.6,数据库是mysql
setInterval() firebug报错~~
代码结构rn$(document).ready(function()rnfunction ajaxScore()rn //ajax请求页面rnrnsetInterval(ajaxScore,180000);rnajaxScore();//进来先调用一次rnrn);rnrn在firebug下,报ReferenceError: ajaxScore is not definedrn但是看到错误后面,确实他还是请求了这个页面,请问,这个问题怎么解决啊?rn
struts2结合ext3批量下载文件
NULL 博文链接:https://ninggy.iteye.com/blog/645307
struts2 Ext3 jsvm jsonplugin 树形菜单
在firefox没有出错,菜单会显示,在IE上只显示只显示一个根节点 只执行到1 ,2 执行不到rnExt.namespace("sys");rnsys.WestPanel = Ext.extend(Ext.Panel, rnrn constructor : function(cfg) rn if(!cfg)rn cfg = ;rn Ext.applyIf(cfg, rn layout:'accordion',rn title : '我的地盘我作主',rn border : false,// 无边框样式rn width : 180,// 必须指定rn collapsible : true,// 收缩rn split : true,// 拖动rn collapseMode : 'mini',// 前提要能拖动rn id:'westPanel'rn );rnrnvar self = this;rnrn Ext.Ajax.request(rn url: 'menu/menuAction!show.do',rn method:'post',rn success:function(response, opts)rn var data = Ext.decode(response.responseText);rn alert(Ext.encode(data));rn for(var i=0; i
报错:Use of undefined constant allowhtml 与Undefined index
运行程序报如下错误,这是哪里出问题了?rnNotice: Use of undefined constant allowhtml - assumed 'allowhtml' in /home/wwwroot/kaimen360_com/public_html/uc_client/model/base.php on line 69rnrnNotice: Undefined index: allowhtml in /home/wwwroot/kaimen360_com/public_html/uc_client/model/base.php on line 69
报错 undefined reference to
出错的代码void MediaFlySetting::menuClicked(int id)rnrn MediaflySettingResultView *view = new MediaflySettingResultView(_user->getValueId(), _psword->getValueId(), g_MainWindow);rn g_MainWindow->showView(view);rnrnrn报错rnMediaflySetting.cpp:(.text+0x2080): undefined reference to `MediaflySettingResultView::MediaflySettingResultView(QString, QString, QWidget*)'rnrnrn我引入了头文件啊:#include "MediaSettingResultView.h"rnMediaflySettingResultView(QString user, QString psword, QWidget *parent = 0);
关于报错和undefined
1.在全局范围内,变量必须要用var 声明,不然会报错。在局部环境内不用var的会JS在解析时会自动在全局内通过var申明一个变量。 2.通关var申明的变量如果未赋值的话,会取得默认值undefined。通过if(undefined)这样的判断语句是可以生效的。而直接判断一个未申明的变量是会报错的。undefined并不是按字面意思“未定义”,其实更接近于”定义而未赋值“。 3.可以直接判断...
codeblocks 报错Undefined reference to
想要gcc编译工程给linux用rn报下面错 可是明明头文件给了 静态库也连接了 o文件也生成了 右键 find decalaration也能找到相应头文件中的定义rn[img=https://img-bbs.csdn.net/upload/201906/20/1560999189_635135.png][/img]rnrn另外[url=https://www.cnblogs.com/Bonker/p/3549140.html][/url] 这个里面的这个问题我也看了rn所有的cpp文件都生成了o文件rn[img=https://img-bbs.csdn.net/upload/201906/20/1560999237_789872.png][/img]rn设置也没问题rnrnrn[face]monkey:50.gif[/face]rn第一次用这个ide 真的找不到问题 有没有遇到过这个问题的 帮忙排查一下
用什么表格显示?
|国家| 城市 |rn----------------rn|中国| 北京 |rn| |---------|rn| | 沈阳 |rn| |---------|rn| | 大连 |rn| |---------|rn| | 上海 |rn---------------rn各位帮忙看看啊!
ext3日期显示分秒控件
ext3的日期控件没有分秒,在网上早了一个2.0的日期控件,添进去以后,没有Ext.menu.Adapter这个类,从2.0的ext-all.js中加入以后,有提示this.cells = this.el.select("table.x-date-inner tbody td"); rnthis.cells 为空,但是在ext3的ext-all.css中有这个啊,请教高手,rn控件源代码http://www.javaeye.com/problems/31274
ext3 + struts2 + spring +hibernate做的例子(二)
ext3 + struts2 + spring +hibernate做的例子 共分两个
ext3 + struts2 + spring +hibernate做的例子
ext3 + struts2 + spring +hibernate做的例子 本例子有两个注意下载
struts2报错
com.opensymphony.xwork2.config.ConfigurationException: There is no Action mapped for namespace [/] and action name [] associated with context path [/struts2].rn at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185) ~[xwork-core-2.3.33.jar:2.3.33]rn at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63) ~[struts2-core-2.3.33.jar:2.3.33]rn at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:37) ~[struts2-core-2.3.33.jar:2.3.33]rn at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58) ~[xwork-core-2.3.33.jar:2.3.33]rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:565) [struts2-core-2.3.33.jar:2.3.33]rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81) [struts2-core-2.3.33.jar:2.3.33]rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99) [struts2-core-2.3.33.jar:2.3.33]rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.59]rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.59]rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [catalina.jar:7.0.59]rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.59]rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [catalina.jar:7.0.59]rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [catalina.jar:7.0.59]rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.59]rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [catalina.jar:7.0.59]rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.59]rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) [catalina.jar:7.0.59]rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) [tomcat-coyote.jar:7.0.59]rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) [tomcat-coyote.jar:7.0.59]rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) [tomcat-coyote.jar:7.0.59]rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_67]rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_67]rn at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.59]rn at java.lang.Thread.run(Thread.java:745) [?:1.7.0_67]rn求大神,这是什么原因,拜托了
用if来判断显示 true is undefined
[code=JScript]rnfunction body_getPosition()rn rn if(<%=Enable %>)rn rn document.getElementById("<%=HF_Body_CoordinateXs.ClientID %>"+flagid).value += fun1()+"|";rn rn rn[/code]rn其中<%=Enable %>是后台一个bool的变量。当Enable=true的时候,为什么会提示true is undefined错误???
struts2 报错
rnrnstruts2 API里的例子 直接报错rnrn2010-1-25 10:50:11 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet jsp threw exceptionrntag 'select', field 'list', name 'months': The requested list key '#'01':'Jan', '02':'Feb', [...]' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.name - [unknown location]rn at org.apache.struts2.components.Component.fieldError(Component.java:230)rn at org.apache.struts2.components.Component.findValue(Component.java:351)rn at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)rn at org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105)rn at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856)rn at org.apache.struts2.components.UIBean.end(UIBean.java:510)rn at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)rn at org.apache.jsp.dstest_jsp._jspx_meth_s_select_0(dstest_jsp.java:173)rn at org.apache.jsp.dstest_jsp._jspx_meth_s_form_0(dstest_jsp.java:111)rn at org.apache.jsp.dstest_jsp._jspService(dstest_jsp.java:69)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Unknown Source)
Struts2报错
[code=java]严重: Dispatcher initialization failedrnUnable to load configuration. - bean - jar:file:/D:/Program%20Files/tomcat6.0/webapps/HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.15.1.jar!/struts-plugin.xml:8:162rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)rn at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)[/code]rnrn[code=java]Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/D:/Program%20Files/tomcat6.0/webapps/HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.15.1.jar!/struts-plugin.xml:8:162rn at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)rn at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:226)rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)rn ... 30 morernCaused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainerrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)rn at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)rn at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)rn ... 33 morern2013-7-19 21:35:09 org.apache.catalina.core.StandardContext filterStartrn严重: Exception starting filter struts2rnUnable to load configuration. - bean - jar:file:/D:/Program%20Files/tomcat6.0/webapps/HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.15.1.jar!/struts-plugin.xml:8:162rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:502)rn at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)rn at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)[/code]rnrn[code=java]Caused by: Unable to load configuration. - bean - jar:file:/D:/Program%20Files/tomcat6.0/webapps/HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.15.1.jar!/struts-plugin.xml:8:162rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)rn at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)rn ... 28 morernCaused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/D:/Program%20Files/tomcat6.0/webapps/HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.15.1.jar!/struts-plugin.xml:8:162rn at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)rn at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:226)rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)rn ... 30 morernCaused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainerrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)rn at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)rn at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)rn ... 33 morern2013-7-19 21:35:09 org.apache.catalina.core.StandardContext startrn严重: Error filterStartrn2013-7-19 21:35:09 org.apache.catalina.core.StandardContext startrn严重: Context [/HelloWorld] startup failed due to previous errorsrn2013-7-19 21:35:09 org.apache.catalina.startup.HostConfig deployDirectory[/code]rnrnrn这是什么错误呢?我按照书上的实例来的,改了很多地方 都是这样报错,求解答!
Struts2 报错
ERROR org.apache.struts2.dispatcher.Dispatcher:38 - Exception occurred during processing request: No result defined for action com.sozii.biz.action.GuaInfoAction and result inputrn No result defined for action com.sozii.biz.action.GuaInfoAction and result inputrn at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:239)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:161)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:563)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)rn at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1778)rn at java.lang.Thread.run(Thread.java:745)rnrn求大神帮忙看下,在xml配置文件中对应的配置都正确,一开始没有报错,后来就不知怎么报错了rn
Struts2 中jsp页面显示多行多列表格
我用一个action控制jsp的显示,在action中有一个list的属性,jsp从list中取值,我想要在jsp中将这些数据在一个表格中显示出来,一行显示6个,显示多行,而且list的长度是不确定的,应该怎么办?
JavaScript报错(一):获取class报错undefined
var checkClass = document.getElementsByClassName('active'); alert(checkClass.textContent); 这原本很简单的一个获取class的方法,但是它就是要报一个undefined的错误。可我明明就有这个class,为什么会报这个错误 ? 因为啊!document.getElementsByC...
firebug
firefox下非常强大的html开发插件,可以查看dom,某个元素的css,编辑html....
FireBug
强大的firefox浏览器,web程序debug插件,安装见说明
报错Notice: Undefined offset: 1
[code=php]rn $t)rn rn $hk_warehouse[] = $hk_warehouse_fn;rn rnrn$jp_warehouse=array();rnforeach(glob('download/jp_warehouse_mix*.txt') as $jp_warehouse_fa) rn if(substr($jp_warehouse_fa, 16, 8)>$t)rn rn $jp_warehouse[] = $jp_warehouse_fa;rn rnrnrn$mix_warehouse=array();rnforeach(glob('download/mix_warehouse_mix*.txt') as $mix_warehouse_fa) rn if(substr($mix_warehouse_fa, 17, 8)>$t)rn rn $mix_warehouse[] = $mix_warehouse_fa;rn rnrnrn$sum_warehouse=array();rnforeach(glob('download/sum_warehouse_mix*.txt') as $sum_warehouse_fa) rn if(substr($sum_warehouse_fa, 17, 8)>$t)rn rn $sum_warehouse[] = $sum_warehouse_fa;rn rnrnrnrn//warehouse_mix_label.pdfrnrn$hk_warehouse_pdf = array();rnforeach(glob('download/hk_warehouse_mix*.pdf') as $hk_warehouse_pdf_fn) rn if(substr($hk_warehouse_pdf_fn, 16, 8)>$t)rn rn $hk_warehouse_pdf[] = $hk_warehouse_pdf_fn;rn rnrn$jp_warehouse_pdf=array();rnforeach(glob('download/jp_warehouse_mix*.pdf') as $jp_warehouse_pdf_fa) rn if(substr($jp_warehouse_pdf_fa, 16, 8)>$t)rn rn $jp_warehouse_pdf[] = $jp_warehouse_pdf_fa;rn rnrnrn$mix_warehouse_pdf=array();rnforeach(glob('download/mix_warehouse_mix*.pdf') as $mix_warehouse_pdf_fa) rn if(substr($mix_warehouse_pdf_fa, 17, 8)>$t)rn rn $mix_warehouse_pdf[] = $mix_warehouse_pdf_fa;rn rnrnrn//pdf_mixrnrn rn$hk_pdf = array();rnforeach(glob('download/HK_print_Mix*.pdf') as $hk_pdf_fn) rn if(substr($hk_pdf_fn, 12, 8)>$t)rn rn $hk_pdf[] = $hk_pdf_fn;rn rnrn$jp_pdf=array();rnforeach(glob('download/JP_print_Mix*.pdf') as $jp_pdf_fa) rn if(substr($jp_pdf_fa, 12, 8)>$t)rn rn $jp_pdf[] = $jp_pdf_fa;rn rnrnrn$mix_pdf=array();rnforeach(glob('download/Mix_print_Mix*.pdf') as $mix_pdf_fa) rn if(substr($mix_pdf_fa, 13, 8)>$t)rn rn $mix_pdf[] = $mix_pdf_fa;rn rnrnrn//pdf_mix_A4rnrn$hk_pdf_a4 = array();rnforeach(glob('download/HK_print_Mix_A4_*.pdf') as $hk_pdf_a4_fn) rn if(substr($hk_pdf_a4_fn, 16, 8)>$t)rn rn $hk_pdf_a4[] = $hk_pdf_a4_fn;rn rnrn$jp_pdf_a4=array();rnrnforeach(glob('download/JP_print_Mix_A4_*.pdf') as $jp_pdf_a4_fa) rn if(substr($jp_pdf_a4_fa, 16, 8)>$t)rn rn $jp_pdf_a4[] = $jp_pdf_a4_fa;rn rnrnrn$mix_pdf_a4=array();rnforeach(glob('download/Mix_print_Mix_A4_*.pdf') as $mix_pdf_a4_fa) rn if(substr($mix_pdf_a4_fa, 17, 8)>$t)rn rn $mix_pdf_a4[] = $mix_pdf_a4_fa;rn rnrnrnrn//统计每类文件的数量,以便循环rn$hk_warehouse_count=count($hk_warehouse);rn$jp_warehouse_count=count($jp_warehouse);rn$mix_warehouse_count=count($mix_warehouse);rn$sum_warehouse_count=count($sum_warehouse);rn$hk_warehouse_pdf_count=count($hk_warehouse_pdf);rn$jp_warehouse_pdf_count=count($jp_warehouse_pdf);rn$mix_warehouse_pdf_count=count($mix_warehouse_pdf);rn$hk_pdf_count=count($hk_pdf);rn$jp_pdf_count=count($jp_pdf);rn$mix_pdf_count=count($mix_pdf);rn$hk_pdf_a4_count=count($hk_pdf_a4);rn$jp_pdf_a4_count=count($jp_pdf_a4);rn$mix_pdf_a4_count=count($mix_pdf_a4);rnrn$c=max($hk_warehouse_count,$jp_warehouse_count,$mix_warehouse_count,$sum_warehouse_count,$hk_warehouse_pdf_count,$jp_warehouse_pdf_count,$mix_warehouse_pdf_count,$hk_pdf_count,$jp_pdf_count,$mix_pdf_count,$hk_pdf_a4_count,$jp_pdf_a4_count,$mix_pdf_a4_count);rnrnecho $c;rnrnfor($i=1;$i<$c;$i++)rnrn ?> rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn报以下错误:rnNotice: Undefined offset: 1 in /var/www/html/amazon/download_all.php on line 203rnrn请问哪时错了
vue 自定义全局函数报错undefined
报错如下: vue Uncaught (in promise) TypeError: Cannot read property ‘dealLogin’ of undefined 原因如下: .then(function (response) { //这里不允许this this.dealLogin(response); } 改为如下解决问题: .then((response) =&amp;gt; { ...
c++ 编译时报错 "undefined reference to ……"
![编译情况](https://img-ask.csdn.net/upload/201803/17/1521251236_172399.png)rnrn总共有五个文件,Graph.h ,Graph.cpp,diamond.h.diamond.cpp,new.cpprn编译成功的是我把diamond类的声明和定义(Graph的声明和定义也放在了一个文件里,但是没有影响)都放在diamond.cpp里。rnnew.cpp 就是包含了"Graph.h"和"diamond.",然后用diamond创建了一个对象,调用ShapePrint()函数。rnrnGraph.hrn```rn #ifndef _Graph_H_rn#define _Graph_H_rnrnclass shapernrn public:rn void ShapePrint();rn void ShapePrint(int x);rn void ShapePrint(int x,int y);rn int GetLength_x();rn int GetLength_y();rn protected:rn void SetLength_x(int length_x);rn void SetLength_y(int length_y);rn private:rn int length_x ;rn int length_y ;rnrn;rnrn#endifrn```rndiamond.hrnrnrn```rn #include rn#include rn#include "Graph.h"rn#ifndef _diamond_rn#define _diamond_rnclass diamond:public shapernpublic:rn diamond();rn rn diamond(int x);rnrn int GetLength();rnprotected:rn void SetLength(int l);rn rnprivate:rn int length;rn rn;rn#endifrnrn```rnrnrndiamond.cpprn```rn #include "diamond.h"rnusing namespace std;rnvoid diamond::SetLength(int l)rnrn this->length = l;rnrnrnrnint diamond::GetLength()rnrn return length;rnrnrnrndiamond::diamond()rn rn SetLength(7);rn rndiamond::diamond(int l)rn rn SetLength(l);rn rn void diamond::ShapePrint()rn rn int length=GetLength();rn for(int i=1;i<=length;++i)rn rn cout<
fireBug
中文版的fireBug,很好用哦!
firebug不能显示js,求助
如图[img=https://img-bbs.csdn.net/upload/201611/16/1479283883_990514.jpg][/img]
mvc+jquery treeView 显示undefined
http://www.cnblogs.com/chenql/archive/2009/10/08/1579153.htmlrnrn按照这个例子写的。rn结果显示:undefinedrnrn跟踪调试。我JION返回的是:rn"[\"id\":\"1\",\"text\":\"北京市\",\"children\":[\"id\":\"2\",\"text\":\"市辖区\",\"children\":[\"id\":\"3\",\"text\":\"东城区\",\"children\":[],\"id\":\"4\",\"text\":\"西城区\",\"children\":[],\"id\":\"5\",\"text\":\"崇文区\",\"children\":[],\"id\":\"6\",\"text\":\"宣武区\",\"children\":[],\"id\":\"7\",\"text\":\"朝阳区\",\"children\":[],\"id\":\"8\",\"text\":\"丰台区\",\"children\":[],\"id\":\"9\",\"text\":\"石景山区\",\"children\":[],\"id\":\"10\",\"text\":\"海淀区\",\"children\":[],\"id\":\"13\",\"text\":\"门头沟区\",\"children\":[],\"id\":\"14\",\"text\":\"房山区\",\"children\":[],\"id\":\"15\",\"text\":\"通州区\",\"children\":[],\"id\":\"16\",\"text\":\"顺义区\",\"children\":[],\"id\":\"17\",\"text\":\"昌平区\",\"children\":[],\"id\":\"18\",\"text\":\"大兴区\",\"children\":[],\"id\":\"19\",\"text\":\"怀柔区\",\"children\":[],\"id\":\"20\",\"text\":\"平谷区\",\"children\":[]],\"id\":\"21\",\"text\":\"县\",\"children\":[\"id\":\"22\",\"text\":\"密云县\",\"children\":[],\"id\":\"23\",\"text\":\"延庆县\",\"children\":[]]]]"rnrn而我调试treeview的例子返回的是:rn[rn rn "text": "1. Pre Lunch (120 min)",rn "expanded": true,rn "classes": "important",rn "children":rn [rn rn "text": "1.1 The State of the Powerdome (30 min)"rn ,rn rn "text": "1.2 The Future of jQuery (30 min)"rn ,rn rn "text": "1.2 jQuery UI - A step to richnessy (60 min)"rn rn ]rn ,rn rn "text": "2. Lunch (60 min)"rn ,rn rn "text": "3. After Lunch (120+ min)",rn "children":rn [rn rn "text": "3.1 jQuery Calendar Success Story (20 min)"rn ,rn rn "text": "3.2 jQuery and Ruby Web Frameworks (20 min)"rn ,rn rn "text": "3.3 Hey, I Can Do That! (20 min)"rn ,rn rn "text": "3.4 Taconite and Form (20 min)"rn ,rn rn "text": "3.5 Server-side JavaScript with jQuery and AOLserver (20 min)"rn ,rn rn "text": "3.6 The Onion: How to add features without adding features (20 min)",rn "id": "36",rn "hasChildren": truern ,rn rn "text": "3.7 Visualizations with JavaScript and Canvas (20 min)"rn ,rn rn "text": "3.8 ActiveDOM (20 min)"rn ,rn rn "text": "3.8 Growing jQuery (20 min)"rn rn ]rn rn]rnrn我不知道哪错了。还有我没有例子中提到的“JsonStringResult 是自定义的一个result类”是不是这个原因?rn我使用的是: rnpublic JsonResult GetMenuTree()rn rn DataTable dt =city.ListToDataTable();rn string jr = JQTreeHelper.GetJsonString(dt, "CityID", "CityName", "RootID", "");rn return this.Json(jr,JsonRequestBehavior.AllowGet); rn rn请教高手解决。谢谢
查询数据在前台显示undefined
页面代码:使用json来传数据[code=html]$().ready(function($) rn cart.select();rn alert("aa");rn //var uid = $(".gid").val();rn $.post("/My_cart01/userAction_show",cid:1,function(data,textStatus)rn alert("ee");rn var str ="";rn $.each(data,function(i,content)rn str+=" ";rn str+=" ";rn str+=" ";rn str+=" '"+content.image+"'";rn str+=" '"+content.gname+"'";rn str+=" '"+content.gdesc+"'";rn str+=" ";rn str+="";rn str+="";rn str+=" "+content.gprice+"";rn str+=" "+content.gprice+""rn str+=" 删除"; rn );rn $(".gwc1").append(str);rn ,"json");[/code]rnrn后台代码:[code=java]public List getGoodsById(int cid) rn Session session=sf.openSession();rn String sql="select * from Q_GOODS g where g.GID in(select cg.GID FROM CART_GOODS cg where cg.CID=:id)"; rn Query query = session.createSQLQuery(sql);rn query.setParameter("id", cid);rn return query.list();rn [/code]rn使用的是SSH架构,配置文件如下:rnrnrnrnrn rn rn rn rn rn当前台使用userAction_show 来显示页面时能查到数据,使用路径访问页面,显示属性undefined,如图rn [img=https://img-bbs.csdn.net/upload/201611/01/1477986487_921453.png][/img]rn[img=https://img-bbs.csdn.net/upload/201611/01/1477986678_289590.png][/img],rnrn
为什么会显示undefined?
var cc = function()document.write("helloworld"); rn var json = aa:11,bb:cc;rn alert(json.bb());//提示信息undefinedrnrn就是想问问为什么弹窗显示undefined?
request.responseTxet为什么显示undefined
[code=javascript]function getHTTPObject()rnrn if(typeof XMLHttpRequest=="undefined")rn rn XMLHttpRequest=function()rn rn tryreturn new ActiveXObject("Msxml2.XMLHTTP.6.0"); rn catch (e)rn tryreturn new ActiveXObject("Msxml2.XMLHTTP.3.0"); rn catch (e)rn tryreturn new ActiveXObject("Msxml2.XMLHTTP"); rn catch (e)rn return false;rn rn rn return new XMLHttpRequest();rnrnaddLoadEvent(getHTTPObject);[/code]rn[code=javascript]function getNewContent()rnrn var request=getHTTPObject();rn if(request)rn rn request.open("GET","example.txt",true);rn request.onreadystatechange=function()rn rn if(request.readyState==4)rn rn alert("Response Received");rn var para=document.createElement("p");rn var txt=document.createTextNode(request.responseTxet);rn para.appendChild(txt);rn document.getElementById('new').appendChild(para);rn rn ;rn request.send(null);rn rn elsern rn alert('sorry,your browser dosen\'t support XMLHttpRequest');rn rn alert('Function done');rnrnaddLoadEvent(getNewContent);[/code]rn[code=javascript]rnrnrn rn Ajaxrnrnrnrn rn rn rn rn rnrn[/code]rnrn最后显示到网页上的是undefined,而不是文档中的内容
为什么history.current显示undefined?
为什么history.length显示4而history.current显示undefined?rn rn
用循环嵌套显示多个表格...
目标效果(注意是表格,而不是单元格):rn | | | rn 表格1 | 表格2 | 表格3 | 表格4 rn | | |rn-------------------------------------------------------rn | | |rn 表格5 | 表格6 | 表格7 | 表格8rn | | |rn-------------------------------------------------------rn | | |rn 9 | 10 | 11 | 12rn | | |rn-------------------------------------------------------rn | | |rn...rnrn我分别用一个行的循环嵌套一个列的循环,但问题是表格2默认是插入在表格1的下方,而不是在表格1的右方,怎样在一行上插入多个表格?rnrn如果你没理解清楚可以在DW里插入一个100 x 100的表格,然后再插入一个100 x 100的表格,看这两个表格是不是分成了两行?而不是并列显示在一行上。
用vector显示表格问题
在用jBuilder9.0开发数据库过程中,用vector在jTabPane中显示多个表格,在多个Panel间遇到只能显示一个jTable的问题.请问大侠们如何解决?
javascript用表格显示时间问题
如呵用javascript代码把系统的时间用一个1行8列的表格给显示出来rn如:rnrnrnrnrn 当前时间是:2009年 11月 1日 星期日 20时 20分 30秒rnrnrnrnrnrn这些都是在表格里面显示的rn一格显示一个rnrn是一个一行八列的表格rnrn谢谢大家给个源码
用表格显示数据问题
最近刚接触php,对函数啊,语法什么的都不太熟,只能靠读别人的程序来摸索rn请教各位,帮我看看下面的代码,我想用表格显示从数据库里面读出的内容,这么写不行(是从网上看的)rn应该怎么写才对呢?谢谢各位了rnrn rn rn 文件名rn 中文名rn 路径rn 内容rn 所属栏目rn rn rn rn $filed1rn $filed2rn $filed3rn $filed4rn $diled5rn rnrnrnrn
用表格显示数据库信息??
例如:rn姓名 姓别rn张三 女rnrnrnrn用什么控件,怎样写程序??
开机显示“L”
刚装好linux9.0,开机后显示“L”,看来是lilo引导出错了,该咋办?
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件