struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jishnu Viswanath" <jishnu.viswan...@tavant.com>
Subject RE: Struts 2 Indexed Properties
Date Mon, 14 Jul 2008 21:28:50 GMT
Re you using struts 2 itself?

If yes it would look something like this
<s:iterator value="listName"  status="stat">
	<input name="someName[<s:property value='stat.index'/>]">
</s:iterator>

The code you send looks like struts 1
Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-----Original Message-----
From: YAQ [mailto:yvette_quinby@yahoo.com] 
Sent: Monday, July 14, 2008 4:05 PM
To: user@struts.apache.org
Subject: Struts 2 Indexed Properties


Hi,

I'm having problem with Struts2 and indexed properties.

The list in my action is not being updated.

My JSP is something like:

<logic:iterate id="coverTypes" name="questionnaireVO.coverTypesList"
indexId="index">
	<input 	type="hidden"
			id="questionnaireInputVO.coverTypesList[<c:out
value="${index}" />].key"
			name="questionnaireInputVO.coverTypesList[<c:out
value="${index}"
/>].key"
			value="<c:out value="${coverTypes.key.id}" />"
/>
	<input 	type="hidden"
			id="questionnaireInputVO.coverTypesList[<c:out
value="${index}"
/>].agreementType.key"
			name="questionnaireInputVO.coverTypesList[<c:out
value="${index}"
/>].agreementType.key"
			value="<c:out
value="${coverTypes.agreementType.key.id}" />" />
</logic:iterate>


I've discovered I need an entry in the x-work conversion properties:

Element_questionnaireInputVO.coverTypesList=com.mypath.CoverTypeVO
CreateIfNull_questionnaireInputVO.coverTypesList=true


But I am getting the following error:


[2008-07-14 12:13:07,860] [.Transports : 2] DEBUG
[com.opensymphony.xwork2.util.InstantiatingNullHandler       ]  :
Entering
nullPropertyValue [target=com.mypath.QuestionnaireInputVO@78de78de,
property=coverTypesList] 
[2008-07-14 12:13:07,860] [.Transports : 2] ERROR
[com.opensymphony.xwork2.util.InstantiatingNullHandler       ]  : Could
not
create and/or set value back on to object 
org.springframework.beans.factory.BeanCreationException: Error creating
bean
with name '[Lcom.mypath.CoverTypeVO;': Could not resolve matching
constructor
	at
org.springframework.beans.factory.support.ConstructorResolver.autowireCo
nstructor(ConstructorResolver.java:178)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:799)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.autowire(AbstractAutowireCapableBeanFactory.java:255)
	at
com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjec
tFactory.java:145)
	at
com.opensymphony.xwork2.util.InstantiatingNullHandler.createObject(Insta
ntiatingNullHandler.java:123)
	at
com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyValue(
InstantiatingNullHandler.java:104)
	at ognl.ASTProperty.getValueBody(ASTProperty.java:94)
	at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
	at ognl.SimpleNode.getValue(SimpleNode.java:210)
	at ognl.ASTChain.setValueBody(ASTChain.java:168)
	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
	at ognl.SimpleNode.setValue(SimpleNode.java:246)
	at ognl.Ognl.setValue(Ognl.java:476)
	at
com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
	at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:158)
	at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:146)
	at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
ParametersInterceptor.java:193)
	at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
rametersInterceptor.java:159)
	at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.ing.itrf.starlite.common.interceptor.StarliteSecurityInterceptor.int
ercept(StarliteSecurityInterceptor.java:54)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Servle
tConfigInterceptor.java:170)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.ing.itrf.starlite.common.interceptor.StarliteDebugInterceptor.interc
ept(StarliteDebugInterceptor.java:54)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercep
t(ExceptionMappingInterceptor.java:176)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
	at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:5
04)
	at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:419)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.solution.filter.PerformanceMonitorFilter.doFilter(Performan
ceMonitorFilter.java:135)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.security.filter.SecurityFilter$1.run(SecurityFilter.java:21
4)
	at
java.security.AccessController.doPrivileged(AccessController.java:260)
	at javax.security.auth.Subject.doAs(Subject.java:555)
	at
com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:165)
	at
com.ing.itrf.security.filter.SecurityFilter.doFilter(SecurityFilter.java
:212)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.solution.filter.WaitPageFilter.doFilter(WaitPageFilter.java
:190)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.solution.filter.EncodingFilter.doFilter(EncodingFilter.java
:115)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:1027)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:544)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:210)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
39)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:332)
	at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
	at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invo
ke(CacheableInvocationContext.java:120)
	at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:250)
	at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
	at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
652)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)
[2008-07-14 12:13:07,860] [.Transports : 2] DEBUG
[com.opensymphony.xwork2.util.OgnlValueStack                 ]  : Error
setting value 
ognl.OgnlException: source is null for getProperty(null, "0")
	at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1638)
	at ognl.ASTProperty.getValueBody(ASTProperty.java:92)
	at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
	at ognl.SimpleNode.getValue(SimpleNode.java:210)
	at ognl.ASTChain.setValueBody(ASTChain.java:168)
	at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
	at ognl.SimpleNode.setValue(SimpleNode.java:246)
	at ognl.Ognl.setValue(Ognl.java:476)
	at
com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
	at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:158)
	at
com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java
:146)
	at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(
ParametersInterceptor.java:193)
	at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(Pa
rametersInterceptor.java:159)
	at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.ing.itrf.starlite.common.interceptor.StarliteSecurityInterceptor.int
ercept(StarliteSecurityInterceptor.java:54)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(Servle
tConfigInterceptor.java:170)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.ing.itrf.starlite.common.interceptor.StarliteDebugInterceptor.interc
ept(StarliteDebugInterceptor.java:54)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercep
t(ExceptionMappingInterceptor.java:176)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
	at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
	at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
	at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
	at
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java
:50)
	at
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:5
04)
	at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:419)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.solution.filter.PerformanceMonitorFilter.doFilter(Performan
ceMonitorFilter.java:135)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.security.filter.SecurityFilter$1.run(SecurityFilter.java:21
4)
	at
java.security.AccessController.doPrivileged(AccessController.java:260)
	at javax.security.auth.Subject.doAs(Subject.java:555)
	at
com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:165)
	at
com.ing.itrf.security.filter.SecurityFilter.doFilter(SecurityFilter.java
:212)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.solution.filter.WaitPageFilter.doFilter(WaitPageFilter.java
:190)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ing.itrf.solution.filter.EncodingFilter.doFilter(EncodingFilter.java
:115)
	at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInst
anceWrapper.java:132)
	at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterCh
ain.java:71)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa
tch(WebAppRequestDispatcher.java:1027)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe
questDispatcher.java:544)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq
uestDispatcher.java:210)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:1
39)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv
oker.java:332)
	at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati
on(CachedInvocation.java:71)
	at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invo
ke(CacheableInvocationContext.java:120)
	at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle
tRequestProcessor.java:250)
	at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis
tener.java:334)
	at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection
.java:56)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:
652)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)


Can anyone help?




-- 
View this message in context:
http://www.nabble.com/Struts-2-Indexed-Properties-tp18441212p18441212.ht
ml
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed
and may 
contain confidential and/or privileged material. If you have received this in error, please
contact the 
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies

may be subject to our monitoring procedures.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message