Hi,
I have a situation where it would be useful to ignore the the nestedPath in a <form:input> tag. With "ignore" i mean providing a value for the path element which isn't relative to the current level in the nestedPath hiearchy, but starting from the root of my form backing object.
Eg:
The example above will cause an error since there is no formBackingObject inside myObject.Code:<form:form commandName="formBackingObject"> <spring:nestedPath path="myObject"> <form:input path="attributeInMyObject"/> <form:input path="formBackingObject.myOtherObject.attributeInMyOtherObject"/> </spring:nestedPath> </form>
Obviously the example above is a simplification of the problem I have at hand which involves elements nested inside lists and multiple levels of nestedPaths. Anyway, I want to be able to "reach" another object than myObject from the formBackingObject even though the input-tag is inside the <spring:nestedPath> tag. Eg:
<form:input path="/formBackingObject.myOtherObject.attributeInMyOther Object"/>
or <form:input path="formBackingObject.myOtherObject.attributeInM yOtherObject" ignoreNestedPath="true"/> or something the like.
Is this possible or do I have to redo my datamodel and make the attributeInMyOtherObject reachable from
myObject? I can not just close the spring:nestedPath tag since they are nested within lists (iterated over using the c:forEach tag.)
I'll appreciate any suggestions.
Cheers
/Anders


Reply With Quote