« Return to Thread: Setting HTML form parameters to Custom classes (not action support)

Setting HTML form parameters to Custom classes (not action support)

by ravi_eze :: Rate this Message:

Reply to Author | View in Thread

hi,

we have multiple classes (C1,C2,C3) each as java beans. now i have a form as:
<s:form...>
<s:textfield name="a.field1" ../>
<s:textfield name="b.field1" ../>
<s:textfield name="c.field1" ../>

is it possible for me to populate the individual classes? The problem is that we need to build a framework in struts2 and it requires the above to happen.

After googling a lot... i found that that the current ActionSupport class is kept in ognl value stack which is later filled. If this is true then can we push the C1's object as a, C2's object as b etc into value stack???

Also, ModelInterceptor... would also push the object to the value stack. But my problem is that i need all the 3 objects into the stack...

please correct me if i am wrong... any help would be great...

cheers,
ravi

 « Return to Thread: Setting HTML form parameters to Custom classes (not action support)