You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by David Solis <ds...@legosoft.com.mx> on 2003/02/05 03:42:07 UTC
Maybe an error due to changes to PageRecorder in 2.4
I hope this is a smart question ☺
I’m porting an application from 2.3 to 2.4
I’ve a page with a persistent attribute of type Vector for example movements. The source excerpt is:
public Vector getMovements()
{
return movements;
}
public void setMovements(Vector movements)
{
this.movements = movements;
fireObservedChange("movements", movements);
}
public void detach()
{
movements = null;
super.detach();
}
The exception is:
net.sf.tapestry.ApplicationRuntimeException
Unable to update expression '<parsed expression>' of com.ixe.isis.ixewap.Movements@12c3327[Movements] to [].
ognl.MethodFailedException
Method setMovements failed for object com.ixe.isis.ixewap.Movements @12c3327[Movements]
java.lang.NoSuchMethodException
setMovements(java.util.ArrayList)
ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java)
ognl.OgnlRuntime.callMethod(OgnlRuntime.java)
ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java)
ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java)
ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java)
ognl.OgnlRuntime.setProperty(OgnlRuntime.java)
ognl.ASTProperty.setValue(ASTProperty.java)
ognl.Ognl.setValue(Ognl.java)
net.sf.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:142)
net.sf.tapestry.util.prop.OgnlUtils.set(OgnlUtils.java:125)
net.sf.tapestry.record.PageRecorder.rollback(PageRecorder.java:260)
net.sf.tapestry.engine.RequestCycle.getPage(RequestCycle.java:272)
net.sf.tapestry.engine.DirectService.service(DirectService.java:165)
net.sf.tapestry.engine.AbstractEngine.service(AbstractEngine.java:882)
net.sf.tapestry.ApplicationServlet.doService(ApplicationServlet.java:232)
net.sf.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:362)
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
The problem is that the PageRecorder (via the DefaultValuePersister and ListCopier) tries to save the movements as an ArrayList instead of a Vector.
I already know how many ways to solve this issue from changing the code to writing an extension for a custom Value Persister. My question is: Is this the expected behavior? Is it a bug?
Any ideas?
Regards
David