This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes How do I keep my multiple selections highlighted? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How do I keep my multiple selections highlighted?" Watch "How do I keep my multiple selections highlighted?" New topic
Author

How do I keep my multiple selections highlighted?

William Oberkirsch
Greenhorn

Joined: May 04, 2010
Posts: 6
I have a pdk:select with optionsCollection, with the multiple set so that I can select multiple options. The problem I am having is they will not stay highlighted. I need to be able to select one or many options and when the selection is taking place, I need to be able to make calls to the db and get other options associated with the selected options (one to many), this much I have working but how do I keep my selections highlighted after the screen has refreshed? :banghead:
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

I'll move this thread to our Struts forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What's pdk:select? Is it a Struts tag with a weird prefix?
William Oberkirsch
Greenhorn

Joined: May 04, 2010
Posts: 6
Yes, it is sturts.




in the set_selectedValues() for now I am just doing "document.forms[0].submit(); In my action class I have a private method set_sectors that calls to the db and gets all sectors relating to the selected industries:



So how do I keep my multiple selections highlighted after my set_selectedValues() call?
any help will be greatly appreciated.

Bill O.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The form would need to be either (a) in session, or (b) initialized to the current values.
William Oberkirsch
Greenhorn

Joined: May 04, 2010
Posts: 6
I am very new to JAVA so please......

how do I initialize my selection list to the latest selected values. I can do the initialization for a single selected value but how for multiple selected values? and where? in the script or in the java class?

this is how I am setting the current selection in the java class


Thanks,

Bill O.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I keep my multiple selections highlighted?
 
Similar Threads
SELECT boxes in Netscape
How do I keep my multiple selections highlighted?
SCJP Exam - Doubts in Format and Score
Tree problem
Queries about Multiple Tree Selections; maybe design issue