To me, if resources and time allowed, I would use pure JavaScript to do it for faster performance. But using a server-side reusable logic is also very appealing.
You could attach a custom event to the first drop-down list as follows: <select onchange='this.form.action = this.form.action + "?9change=property1;property2;property3"; this.form.submit();' ...> <option> </select> In your action class, if you find the parameter with name "9change", you could invoke a general purpose method that takes property1 as the current selected item in the first drop-down list and property2 as a map holding key/value pairs. You use the property1 as the key to find the value which is type of String[]. You assign the value to property3 to which the option of the second select list is bound to. And finally you return the action forward to the current page. This example tells me that the reusable logic and reusable component are very different and sometime the reusable logic is easier to use. You could plug such reusable logic into anywhere in your page without having to introduce a *compound* component in terms of new tags. Jing Netspread Carrier http://www.netspread.com ----- Original Message ----- From: "Kommineni, Sateesh (IndSys)" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, August 21, 2003 1:28 AM Subject: RE: is there any Dependable Option List Tag ? > Hi All, > > Thanks for your suggestions.. > > The JavaScript option which most of you mentioned cannot be made as a > component . If we have a Tag Lib tag for this , we can just pass say an > ArrayList and the dependency relationship so that it will be reused across > many pages/ Applications.. > > Any way thanks for the responses.. > > -Sateesh > > -----Original Message----- > From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 20, 2003 10:23 PM > To: 'Struts Users Mailing List' > Subject: RE: is there any Dependable Option List Tag ? > > > Sateesh, > What you want to do is typically done on the client side in JavaScript. That > is not to say that it can't be done at the server, but for performance > reasons, the JavaScript solution avoids having to refresh the page each time > an item or items are moved from one select box to another. Once the items > are moved, then the request can be sent to the server and the changes can be > updated in the DB or wherever. > > Regards, > > Richard > > > -----Original Message----- > From: Kommineni, Sateesh (IndSys) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 20, 2003 5:50 AM > To: Struts Users Mailing List > Subject: is there any Dependable Option List Tag ? > > > Hi, > > If we have two related Drop Down boxes in a Form and need to populate > those when we load the page and when we change the value in the first drop > down we need to load the corresponding values in the second .. Can any > TagLib supports this..If so could you pls provide me some examples.. > > Thanks > Sateesh > > > "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE > ADDRESSEE and may contain confidential and privileged information. If the > reader of this message is not the intended recipient, you are notified that > any dissemination, distribution or copy of this > communication is strictly Prohibited. > If you have received this message by error, please notify us > immediately, return the original mail to the sender and delete the > message from your system." > > > --------------------------------------------------------------------- > 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] > > > "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE > ADDRESSEE and may contain confidential and privileged information. > If the reader of this message is not the intended recipient, > you are notified that any dissemination, distribution or copy of this > communication is strictly Prohibited. > If you have received this message by error, please notify us > immediately, return the original mail to the sender and delete the > message from your system." > > > --------------------------------------------------------------------- > 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]