RE: Multiple Drop Down Menus
No, I don't know of any example as far as AjaxTags goes that is closer to that... However, I would think you'll probably wind up using the std:InnerHTML handler for what your doing, and the Java Web Parts sample app has a page that demonstrates that, as well as a lot of other AjaxTags stuff. If you want to look at that, click the download link (this time it *is* there!) and download the bin distro. This is just an exploded webapp that you can drop in your container of choice and play with it. You can download the src distro if you want, but you'll have to build first before you can play, the bin distro is ready to go. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, December 21, 2005 12:49 pm, Leahy, Kevin said: > Frank, > > Thanks for this. I am curious to have a go with the ajax tags so will > have > a look at the examples. I am interested in using ajax tags to speed up a > results page. It's fairly standard in that I have n pages of results and > the > user selects 1 - n or previous or next. I suppose you don't know of an > example that is closer to this scenario have you? > > Rgds > > Kevin > > > -Original Message- > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Sent: 21 December 2005 16:13 > To: Struts Users Mailing List > Cc: 'Struts Users Mailing List' > Subject: RE: Multiple Drop Down Menus > > Sorry, I need to make it a bit easier to find, you actually had to go to > the > main SF site. Here's a direct link: > > http://sourceforge.net/project/showfiles.php?group_id=140728 > > Just select the JWPCookbook module and you'll be good to go. > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > AIM: fzammetti > Yahoo: fzammetti > MSN: [EMAIL PROTECTED] > > On Wed, December 21, 2005 4:39 am, Leahy, Kevin said: >> Frank, >> >> Which download has the cookbook? >> >> Kevin >> >> -----Original Message- >> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] >> Sent: 20 December 2005 20:33 >> To: Struts Users Mailing List >> Cc: user@struts.apache.org >> Subject: Re: Multiple Drop Down Menus >> >> AJAX is your friend! (as long as Javascript is OK of course). >> >> Take a look here: >> >> http://javawebparts.sourceforge.net >> >> Check out the AjaxTags taglib (check out the javadocs). Then, if it >> looks interesting, click the Downloads link and grab the cookbook >> download. In it you will find an example of doing exactly what your >> asking for :) >> >> -- >> Frank W. Zammetti >> Founder and Chief Software Architect >> Omnytex Technologies >> http://www.omnytex.com >> AIM: fzammetti >> Yahoo: fzammetti >> MSN: [EMAIL PROTECTED] >> >> On Tue, December 20, 2005 2:35 pm, Daniel Kies said: >>> Greetings. I have an app that needs to have multiple drop down boxes >>> that are related to each other. Instead of calling an action >>> everytime the first menu is selected and querying for the data in the >>> second drop down, I want to have the values in the second drop down >>> reflect the choice of the first drop down. >>> >>> So Drop Down A has: >>> 1. Color >>> 2. Size >>> >>> If Color is selected, drop down B has: >>> 1. Blue >>> 2. Red >>> 3. Green >>> >>> If Size is selected, drop down B has: >>> 1. Small >>> 2. Medium >>> 3. Large >>> >>> I figure I can do this by calling an action when the A is selected, >>> but how can I do this without calling an action after A is chosen? >>> >>> Thanks in advance. >>> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> -- >> >> >> -- >> -- The information contained herein is confidential and is >> intended solely for the addressee. Access by any other party is >> unauthorised without the express written permission of the sender. If >> you are not the intended recipient, please contact the sender either >> via the company switchboard on +44 (0)20 7623 8000, or via e-mail >> return. If you have received this e-mail in error or wish to read our >> e-mail disclaimer statement and monito
RE: Multiple Drop Down Menus
Frank, Thanks for this. I am curious to have a go with the ajax tags so will have a look at the examples. I am interested in using ajax tags to speed up a results page. It's fairly standard in that I have n pages of results and the user selects 1 - n or previous or next. I suppose you don't know of an example that is closer to this scenario have you? Rgds Kevin -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: 21 December 2005 16:13 To: Struts Users Mailing List Cc: 'Struts Users Mailing List' Subject: RE: Multiple Drop Down Menus Sorry, I need to make it a bit easier to find, you actually had to go to the main SF site. Here's a direct link: http://sourceforge.net/project/showfiles.php?group_id=140728 Just select the JWPCookbook module and you'll be good to go. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, December 21, 2005 4:39 am, Leahy, Kevin said: > Frank, > > Which download has the cookbook? > > Kevin > > -Original Message- > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Sent: 20 December 2005 20:33 > To: Struts Users Mailing List > Cc: user@struts.apache.org > Subject: Re: Multiple Drop Down Menus > > AJAX is your friend! (as long as Javascript is OK of course). > > Take a look here: > > http://javawebparts.sourceforge.net > > Check out the AjaxTags taglib (check out the javadocs). Then, if it > looks interesting, click the Downloads link and grab the cookbook > download. In it you will find an example of doing exactly what your > asking for :) > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > AIM: fzammetti > Yahoo: fzammetti > MSN: [EMAIL PROTECTED] > > On Tue, December 20, 2005 2:35 pm, Daniel Kies said: >> Greetings. I have an app that needs to have multiple drop down boxes >> that are related to each other. Instead of calling an action >> everytime the first menu is selected and querying for the data in the >> second drop down, I want to have the values in the second drop down >> reflect the choice of the first drop down. >> >> So Drop Down A has: >> 1. Color >> 2. Size >> >> If Color is selected, drop down B has: >> 1. Blue >> 2. Red >> 3. Green >> >> If Size is selected, drop down B has: >> 1. Small >> 2. Medium >> 3. Large >> >> I figure I can do this by calling an action when the A is selected, >> but how can I do this without calling an action after A is chosen? >> >> Thanks in advance. >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- > > > -- > -- The information contained herein is confidential and is > intended solely for the addressee. Access by any other party is > unauthorised without the express written permission of the sender. If > you are not the intended recipient, please contact the sender either > via the company switchboard on +44 (0)20 7623 8000, or via e-mail > return. If you have received this e-mail in error or wish to read our > e-mail disclaimer statement and monitoring policy, please refer to > http://www.drkw.com/disc/email/ or contact the sender. 3167 > -- > -- > > > - > 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] The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. 3167 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Drop Down Menus
Sorry, I need to make it a bit easier to find, you actually had to go to the main SF site. Here's a direct link: http://sourceforge.net/project/showfiles.php?group_id=140728 Just select the JWPCookbook module and you'll be good to go. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, December 21, 2005 4:39 am, Leahy, Kevin said: > Frank, > > Which download has the cookbook? > > Kevin > > -Original Message- > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > Sent: 20 December 2005 20:33 > To: Struts Users Mailing List > Cc: user@struts.apache.org > Subject: Re: Multiple Drop Down Menus > > AJAX is your friend! (as long as Javascript is OK of course). > > Take a look here: > > http://javawebparts.sourceforge.net > > Check out the AjaxTags taglib (check out the javadocs). Then, if it looks > interesting, click the Downloads link and grab the cookbook download. In > it > you will find an example of doing exactly what your asking for :) > > -- > Frank W. Zammetti > Founder and Chief Software Architect > Omnytex Technologies > http://www.omnytex.com > AIM: fzammetti > Yahoo: fzammetti > MSN: [EMAIL PROTECTED] > > On Tue, December 20, 2005 2:35 pm, Daniel Kies said: >> Greetings. I have an app that needs to have multiple drop down boxes >> that are related to each other. Instead of calling an action >> everytime the first menu is selected and querying for the data in the >> second drop down, I want to have the values in the second drop down >> reflect the choice of the first drop down. >> >> So Drop Down A has: >> 1. Color >> 2. Size >> >> If Color is selected, drop down B has: >> 1. Blue >> 2. Red >> 3. Green >> >> If Size is selected, drop down B has: >> 1. Small >> 2. Medium >> 3. Large >> >> I figure I can do this by calling an action when the A is selected, >> but how can I do this without calling an action after A is chosen? >> >> Thanks in advance. >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- > > > > The information contained herein is confidential and is intended solely > for the > addressee. Access by any other party is unauthorised without the express > written permission of the sender. If you are not the intended recipient, > please > contact the sender either via the company switchboard on +44 (0)20 7623 > 8000, or > via e-mail return. If you have received this e-mail in error or wish to > read our > e-mail disclaimer statement and monitoring policy, please refer to > http://www.drkw.com/disc/email/ or contact the sender. 3167 > > > > - > 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]
RE: Multiple Drop Down Menus
Frank, Which download has the cookbook? Kevin -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: 20 December 2005 20:33 To: Struts Users Mailing List Cc: user@struts.apache.org Subject: Re: Multiple Drop Down Menus AJAX is your friend! (as long as Javascript is OK of course). Take a look here: http://javawebparts.sourceforge.net Check out the AjaxTags taglib (check out the javadocs). Then, if it looks interesting, click the Downloads link and grab the cookbook download. In it you will find an example of doing exactly what your asking for :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Tue, December 20, 2005 2:35 pm, Daniel Kies said: > Greetings. I have an app that needs to have multiple drop down boxes > that are related to each other. Instead of calling an action > everytime the first menu is selected and querying for the data in the > second drop down, I want to have the values in the second drop down > reflect the choice of the first drop down. > > So Drop Down A has: > 1. Color > 2. Size > > If Color is selected, drop down B has: > 1. Blue > 2. Red > 3. Green > > If Size is selected, drop down B has: > 1. Small > 2. Medium > 3. Large > > I figure I can do this by calling an action when the A is selected, > but how can I do this without calling an action after A is chosen? > > Thanks in advance. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. 3167 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Drop Down Menus
Try Struts-Layout has some options for doing "related" dropdowns. You may want to check it and avoid a lot of javascript coding. HTH, Raghu On 12/21/05, Neil Erdwien <[EMAIL PROTECTED]> wrote: > > If the amount of data needed for drop down B isn't large, I'd load it > into Javascript objects when the original page is displayed. Then use > client-side Javascript to populate B after A is chosen. > > If the amount of data is too big, I'd investigate doing the same concept > using client-side Javascript, but query the server for B's data using > AJAX methods. > > > Daniel Kies wrote: > > Greetings. I have an app that needs to have multiple drop down boxes > that > > are related to each other. Instead of calling an action everytime the > first > > menu is selected and querying for the data in the second drop down, I > want > > to have the values in the second drop down reflect the choice of the > first > > drop down. > > > > So Drop Down A has: > > 1. Color > > 2. Size > > > > If Color is selected, drop down B has: > > 1. Blue > > 2. Red > > 3. Green > > > > If Size is selected, drop down B has: > > 1. Small > > 2. Medium > > 3. Large > > > > I figure I can do this by calling an action when the A is selected, but > how > > can I do this without calling an action after A is chosen? > > > > Thanks in advance. > > > > -- > Neil Erdwien, [EMAIL PROTECTED], Web Technologies Manager > Computing and Network Services, Kansas State University > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Multiple Drop Down Menus
set a flag represented selected or not (can be a boolean, or an arraylist that holds all selected values), put into your global bean holder (if you have, this is a java bean simple holds all objects that would be created and used during the session), then you can use logic tag to check the flag (logic:equal, empty up to you) Here is my example: 1. Assume you have a session object called "selected" (an arraylist) 2.
Re: Multiple Drop Down Menus
You have two choices... DOM manipulation, or DIV replacement. The former can get a little complex, the later is pretty straight-forward: color size function doit(obj) { s = ""; type = obj.value; s += ""; document.getElementById("nextSelect").innerHTML = s; } -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Tue, December 20, 2005 3:33 pm, Daniel Kies said: > Do you have any examples of using javascript to populate B after A or > something like that? > > On 12/20/05, Neil Erdwien <[EMAIL PROTECTED]> wrote: >> >> If the amount of data needed for drop down B isn't large, I'd load it >> into Javascript objects when the original page is displayed. Then use >> client-side Javascript to populate B after A is chosen. >> >> If the amount of data is too big, I'd investigate doing the same concept >> using client-side Javascript, but query the server for B's data using >> AJAX methods. >> >> >> Daniel Kies wrote: >> > Greetings. I have an app that needs to have multiple drop down boxes >> that >> > are related to each other. Instead of calling an action everytime the >> first >> > menu is selected and querying for the data in the second drop down, I >> want >> > to have the values in the second drop down reflect the choice of the >> first >> > drop down. >> > >> > So Drop Down A has: >> > 1. Color >> > 2. Size >> > >> > If Color is selected, drop down B has: >> > 1. Blue >> > 2. Red >> > 3. Green >> > >> > If Size is selected, drop down B has: >> > 1. Small >> > 2. Medium >> > 3. Large >> > >> > I figure I can do this by calling an action when the A is selected, >> but >> how >> > can I do this without calling an action after A is chosen? >> > >> > Thanks in advance. >> > >> >> -- >> Neil Erdwien, [EMAIL PROTECTED], Web Technologies Manager >> Computing and Network Services, Kansas State University >> >> - >> 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]
Re: Multiple Drop Down Menus
That's a good point, I should have said it in my reply too... if the datasets are small, you'd be better off loading it all initially and changing things client-side. No need to involve the server for a small amount of data. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Tue, December 20, 2005 3:03 pm, Neil Erdwien said: > If the amount of data needed for drop down B isn't large, I'd load it > into Javascript objects when the original page is displayed. Then use > client-side Javascript to populate B after A is chosen. > > If the amount of data is too big, I'd investigate doing the same concept > using client-side Javascript, but query the server for B's data using > AJAX methods. > > > Daniel Kies wrote: >> Greetings. I have an app that needs to have multiple drop down boxes >> that >> are related to each other. Instead of calling an action everytime the >> first >> menu is selected and querying for the data in the second drop down, I >> want >> to have the values in the second drop down reflect the choice of the >> first >> drop down. >> >> So Drop Down A has: >> 1. Color >> 2. Size >> >> If Color is selected, drop down B has: >> 1. Blue >> 2. Red >> 3. Green >> >> If Size is selected, drop down B has: >> 1. Small >> 2. Medium >> 3. Large >> >> I figure I can do this by calling an action when the A is selected, but >> how >> can I do this without calling an action after A is chosen? >> >> Thanks in advance. >> > > -- > Neil Erdwien, [EMAIL PROTECTED], Web Technologies Manager > Computing and Network Services, Kansas State University > > - > 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]
Re: Multiple Drop Down Menus
Do you have any examples of using javascript to populate B after A or something like that? On 12/20/05, Neil Erdwien <[EMAIL PROTECTED]> wrote: > > If the amount of data needed for drop down B isn't large, I'd load it > into Javascript objects when the original page is displayed. Then use > client-side Javascript to populate B after A is chosen. > > If the amount of data is too big, I'd investigate doing the same concept > using client-side Javascript, but query the server for B's data using > AJAX methods. > > > Daniel Kies wrote: > > Greetings. I have an app that needs to have multiple drop down boxes > that > > are related to each other. Instead of calling an action everytime the > first > > menu is selected and querying for the data in the second drop down, I > want > > to have the values in the second drop down reflect the choice of the > first > > drop down. > > > > So Drop Down A has: > > 1. Color > > 2. Size > > > > If Color is selected, drop down B has: > > 1. Blue > > 2. Red > > 3. Green > > > > If Size is selected, drop down B has: > > 1. Small > > 2. Medium > > 3. Large > > > > I figure I can do this by calling an action when the A is selected, but > how > > can I do this without calling an action after A is chosen? > > > > Thanks in advance. > > > > -- > Neil Erdwien, [EMAIL PROTECTED], Web Technologies Manager > Computing and Network Services, Kansas State University > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Multiple Drop Down Menus
AJAX is your friend! (as long as Javascript is OK of course). Take a look here: http://javawebparts.sourceforge.net Check out the AjaxTags taglib (check out the javadocs). Then, if it looks interesting, click the Downloads link and grab the cookbook download. In it you will find an example of doing exactly what your asking for :) -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Tue, December 20, 2005 2:35 pm, Daniel Kies said: > Greetings. I have an app that needs to have multiple drop down boxes that > are related to each other. Instead of calling an action everytime the > first > menu is selected and querying for the data in the second drop down, I want > to have the values in the second drop down reflect the choice of the first > drop down. > > So Drop Down A has: > 1. Color > 2. Size > > If Color is selected, drop down B has: > 1. Blue > 2. Red > 3. Green > > If Size is selected, drop down B has: > 1. Small > 2. Medium > 3. Large > > I figure I can do this by calling an action when the A is selected, but > how > can I do this without calling an action after A is chosen? > > Thanks in advance. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Drop Down Menus
If the amount of data needed for drop down B isn't large, I'd load it into Javascript objects when the original page is displayed. Then use client-side Javascript to populate B after A is chosen. If the amount of data is too big, I'd investigate doing the same concept using client-side Javascript, but query the server for B's data using AJAX methods. Daniel Kies wrote: Greetings. I have an app that needs to have multiple drop down boxes that are related to each other. Instead of calling an action everytime the first menu is selected and querying for the data in the second drop down, I want to have the values in the second drop down reflect the choice of the first drop down. So Drop Down A has: 1. Color 2. Size If Color is selected, drop down B has: 1. Blue 2. Red 3. Green If Size is selected, drop down B has: 1. Small 2. Medium 3. Large I figure I can do this by calling an action when the A is selected, but how can I do this without calling an action after A is chosen? Thanks in advance. -- Neil Erdwien, [EMAIL PROTECTED], Web Technologies Manager Computing and Network Services, Kansas State University - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]