Udaya Allu wrote:
Dear All,
I need help  how to implement Radio buttons in struts. in two situations and  other 
two related to tranfer of data between objects.
1)an array of radio buttons i.e in iterate tag
and selected radio button sould catch an object or a foem as its  the value.
Do radio button value can be an object  or it can only be string?

It should be a string - all your form properties should be strings (or binary).



2)Table of radion buttons in a jsp.
each row is an array of radio buttons and one in each row will be selected.
and array of such selections to be updated in to form

Use the form taglib, and inside that, use iterate on each array to produce a radio button group.



3)In both of the above cases how to pass the arraylists related to selected radio 
buttons  to next page
i.e can I put the array of objects in request atrribute  and get them in next page by 
giving redirect as false.

no, putting them in a request attribute is useless.


Or only solution is putting in session.

that would work


Or can I pass objects or arrays as hidden attributes(sorry this may be absurd or blunder)

Also useless! What you could do is pass the array size as a hidden field and use it to recreate the blank array at the next submit.



4)If I can pass only string values(ID of object )through radio button values to next 
page or action class,
is it preferable to make a dabase call for getting details of object based on Id or 
better put array in session
and retrieve the details by Id.

that depends on how much detail you need in your objects - do you need lots of info? Then it's best to call it from the database. Are the objects small? Then store them in the session.


If you have high performance requirements and heavy duty data, you might benefit from using a caching framework or EJB.

hth
Adam


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to