struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Fuentes Esteban <juanjose.fuen...@grupoica.com>
Subject RE: Basic Struts doubt
Date Mon, 29 Oct 2012 08:47:27 GMT
I suppose you want to do that asyncronously, because if not, you just have
to send the form and inspect the POST parameters for one with name '
TrackBaselineConfigActionForm' .

So, use javascript as Lukasz recommended you. If you use jQuery, this is the
API function to use:

http://api.jquery.com/jQuery.ajax/

-----Mensaje original-----
De: Alejandro [mailto:aparcos@gmail.com]
Enviado el: domingo, 28 de octubre de 2012 23:56
Para: Struts Users Mailing List
Asunto: Re: Basic Struts doubt

You could use the jquery ui. If you use struts2 there is a plugin for that.

Regards :)

2012/10/28 Lukasz Lenart <lukaszlenart@apache.org>

> 2012/10/28 Kakoli Sen (kasen) <kasen@cisco.com>:
> > Hello all,
> >
> >     I am a newbie in Struts and JSP.
> >
> > My initial JSP page is coming out where I have among other widgets, 2
> combo
> > boxes. The user selects from the first combo and then the second combo
> needs
> > to be populated from db based on the value selected.
> >
> >                 How do I call executeAction method of Action class when
> the
> > first combo box value is changed?
> >
> > Attaching my Struts-config.
> >
> >
> >
> > My JSP code snippet is thus :
> >
> > <tr>
> >
> > <td><label for="track_name">Track Name</label></td>
> >
> >                 <td><input type="hidden" value="myAction" /></td>
> >
> >                 <td><html:select name="TrackBaselineConfigActionForm"
> >
> >                                                 property="selTrackName"
> > onchange="this.form.myAction.value='getOsVersionAction';
> >
> >
> > this.form.submit();">
> >
> >                 <option value="">Select...</option>
> >
> >                 <html:optionsCollection  property="trackList"
> > label="selLabel" value="selLabel" />
> >
> >                 </html:select></td>
> >
> > </tr>
> >
> > <tr>
> >
> >                 <td><label for="os_version">OS Versions</label></td>
> >
> >                 <td><html:select name="TrackBaselineConfigActionForm"
> >
> >
> > property="osVersion">
> >
> >                 <option value="">ALL</option>
> >
> >                 <option value="">Standard Recommended Version</option>
> >
> >                 <!-- html:options name="TrackBaselineConfigActionForm"
> > property="osVersions" /-->
> >
> >                 </html:select></td>
> >
> > </tr>
>
> Use JavaScript to execute action and populate the second dropdown
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message