AK wrote:
> This is not specifically a Stripes issue, but I suspect someone here
> has dealt with this problem and can provide some advice.
>
> I'm trying to build a set of dependent drop-down menus, State and
> City. When one of the 50 states is selected from the 1st drop-down,
> the City menu is populated with all the cities in that state.
>
> What's the best way to do something like this (w/ Stripes)? Also,
> anyone know where I can get this data?!
Using any Javascript framework and a JavascriptResolution, it is really
easy.
Something like this will do the work with Prototype:
new Ajax.Request(url, {
parameters: $(idSourceDropdown).name+'='+$F(idSourceDropdown),
onSuccess: function(request) {
$(destDropdown).options.length=0;
eval(request.responseText).each(function(item, i){
$(destDropdown).options[i] = new Option(item.label, item.value);
});
},
method:'post'
});
In your actionBean:
Just populate a List<LabelValueBean> and return new
JavascriptResolution(theList)
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users