• 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

Dependent dropdowns and Multiple select swap

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I know dependent dropdowns have been discussed over and over again but my problem is slightly different.... I searched but i couldn't find. Someone please help me out here....
I am using Jdeveloper 10.1.2 with Struts and JSP , ADF BC. NO AJAX ( Could use it but can't afford more time than i have already used)

1.Ok dependent dropdowns - What i have currently done is onchange go to the action class and execute my child dropdown's view object by giving where caluse param as the value selected in parent dropdown. Now this was fine if I had only two dropdowns on my page. But my form has about 7 dropdowns, 6 radio buttons and lots more. Its an application form. Everytime I slect one of the dropdown it reloads which is costly plus I am executing the view object a lot...

2. Multiple Select swap - My basic requirement was to let user select multiple options from a drop down box by pressing ctrl. If i use this, how do i store these values in my entity object and then my data base( as an array? or comma seperated string?) Then i thought it would be cool to have multi select swap boxes.. Again I wrote a javascript function, not quite working yet...which will do the swaps between the two boxes but again how to store this data and now i will need two fields in the form for two diff boxes.. used in this case...right ??? Is there any demo anywhere for this.. i googled but didn't get anything in Struts...

I hope my questions are clear....
Please help
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well on page submit you can call a function to select all of the values in the list so they are submitted to the server.

OR

You can make a hidden textbox on the page that has a comma deliminated version of the values in your select box. When the user moves something over you recalculate the hidden's value.

Eric
 
Susan Monz
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replying. Is this in reply for how to store the values?
Then in the second option, my problem is each dropdown has atleast 20 values. to write a comma seperated combination for each is going to be tough. About the first option not sure, what you mean?
 
Something about .... going for a swim. With this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic