• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2: dependent drop down problem

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in our project we are using ejb3.0 and struts2.0.I need guide links to implement dependent drop down lists.can directly cal bean in javascript using Ajax,Struts 2 allows s:select tag to get list.if we use two lists,one list should be empty,means no values.i tried to give id and name property without list property.But it doesnt allow without list property in select tag.how can i implement using Ajax with Struts2,In google,i didnt get sample code for struts2.x with Ajax examples.
this is urgent.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if this will help in your situation or not, but there is an example of a dependent autocompleter in the struts-showcasee-2.0.x.war file that comes with the download.

One word of caution, though: while this example worked fine for me using the FireFox browser, it did not work using Internet Explorer Version 7.
[ December 18, 2007: Message edited by: Merrill Higginson ]
 
selvaraju sellamuthu
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Merrill Higginson:

One word of caution, though: while this example worked fine for me using the FireFox browser, it did not work using Internet Explorer Version 7.


then any other way to do that.i tried that from struts2 showcase examples,but i didnt get in ie, is it neccessary to make dwr.xml file inside WEB-INF.Can you give me brief to implement dependent drop down.
Thanks in advance
 
selvaraju sellamuthu
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
autocompleter
i tested the above link,which you have given me struts2-showcase,for both IE7 and Firebox 3 beta,sample is not working.Please find me other solution,Thanks
 
selvaraju sellamuthu
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
work is Done by combining Ajax DWR with Struts2 autoCompleter tag.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Selvaraju,

Thanks for letting us know how you solved it. If you get the time, it would be great if you could show us some sample code of your solution. These forums are searchable, and I'm sure it would help the next person having this problem to see your solution in greater detail.

Merrill
[ January 02, 2008: Message edited by: Merrill Higginson ]
 
selvaraju sellamuthu
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSP Code

AjaxHelper.class


dwr.xml

i got the billingCountry list values from Action class when form loads.
In AjaxHelper,i have written code for get Ejb Bean which will return City values as list.
This code will work in all versions of IE ,firebox.
Thanks.
 
Ranch Hand
Posts: 83
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the benefit of other developers who are still looking for a similar problem here is a well organized and good example of Struts 2 AJAX drop down

Fixed link (Merrill)
[ September 01, 2008: Message edited by: Merrill Higginson ]
 
Poop goes in a willow feeder. Wipe with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic