Hi Rama, I think you want to use a Map in your action form to take care of the form data being submitted from jsp page. I'd suggest you to read the following article:
http://struts.apache.org/struts-action/userGuide/building_controller.html#map_action_form_classes HTH, On 4/17/06, rama chandrula <[EMAIL PROTECTED]> wrote: > > > Hi Vinit, > > I have used jstl to display the data in the form. But if I want to edit > this > data and send them back to the action form. I am not able to do this. can > u > give me a suggestion how I can proceed further > > Thanks, > Rama > > >From: "Vinit Sharma" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" <user@struts.apache.org> > >To: "Struts Users Mailing List" <user@struts.apache.org> > >Subject: Re: directly addressing maps in jsp-file > >Date: Thu, 13 Apr 2006 11:04:49 +0530 > > > >Hi, > > > >JSTL can help you here. Suppose key comes from bean item: > > > ><c:set var="key" value="${item.fieldName}"/> > > > >I can use this key to access the bean property as: > > > ><c:out value='${hasht[key]}'/> > > > >Hope it works :) > > > >HTH, > > > > > >On 4/12/06, Andreas Hartmann <[EMAIL PROTECTED]> wrote: > > > > > > Hello all, > > > > > > I've got some problems accessing arrays and maps in the jsp-file. > > > > > > In the Action class, the following objects are defined: > > > > > > Hashtable <String,String> hash = new Hashtable<String,String>(); > > > ArrayList <Hashtable <String,String>> list = new ArrayList <Hashtable > > > <String,String>>(); > > > > > > hash.put("key","value"); > > > hash.put("key1","value1"); > > > > > > list.add(hash); > > > > > > rq.setAttribute("hasht", hash) > > > rq.setAttribute("array", list); > > > > > > > > > > > > In the jsp-file: > > > > > > Access with iterate through Arraylist: > > > <logic:iterate name="array" id="hashtable" > > > > <bean:write name="hashtable" property="key"/> > > > </logic:iterate> > > > > > > > > > > > > direct access of the value with the key in the hashtable: > > > <bean:write name="hasht" property="key - don't know"> > > > > > > The key could come from an method (Something like > some_other_list.get(1) > > > e.g.) or a literal like key1 as defined in the example above. > > > > > > > > > I would be very glad, if anybody could solve my problem with directly > > > accessing Hashtables in jsp-file. > > > > > > > > > Kind regards, > > > Andreas Hartmann > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > >-- > >Vinit Sharma > >IBM > > _________________________________________________________________ > One and only Ash. Find out all about her. Only on MSN Search > http://server1.msn.co.in/profile/aishwarya.asp > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Vinit Sharma IBM