Other option is 
1-Store all the data in tokenized form in a hidden variable.
something like this-  a1|b1|[EMAIL PROTECTED]|b2|c2@
"|" and "@" are delimiters.
2-Use javascript split function on the onchange of first list and create the 
second list with javascript


-----Original Message-----
From: Givler, Eric [mailto:[EMAIL PROTECTED]
Sent: Friday, September 15, 2006 2:23 PM
To: Struts Users Mailing List
Subject: RE: dependent drop down lists


You'd need to rebuild the second list on the posting of the form, i.e. 
1. get value selected from first list
2. invoke method to refresh dependent list based on user prm from fist list
3. place that list into a request attribute to read on the page.

Here's a code snippet.  The prepareLOVs is called on a post-back event:

public void prepareLOVs(ActionForm form,
                        HttpServletRequest request) 
      throws Exception
{
   MyForm myform = (MyForm) form;
   String strCountyId = myform.getCounty_id();
   AppModule am = new AppModuleImpl( request.getRemoteUser() );
   List municipalities = am.getPaMunicipalitiesView( strCountyId );
   request.setAttribute ( Constants.MUNICIPALITIES_LOV, municipalities );
}


-----Original Message-----
From: Joe Yuen [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 14, 2006 4:18 PM
To: user@struts.apache.org
Subject: dependent drop down lists
Importance: High



I currently having trouble implementing dependent drop down lists. Do anyone 
know where I might see an example of how to implement such a thing?

Thanks,
-Joe 

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


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

Reply via email to