Listboxes and retrieving results into session variables

I have a problem with the list boxes! I have followed the sun java tutorial and everything works fine like it is supposed to do according to the example.

I can add and remove text into and out of the listbox and I can select individual or multiple items and pass these values into a text field using binding abd sessionBean1.

What I would like to do, is get all values from the list box and store them into session variables (setValue("#{sessionScope.goPhrase}", ""); so that I can use them in a later stage in my project.

I can not get this done for some strange reason. Does any one have any reference pages other than the listbox tutorial that maybe of assistance?

Right now I have to instruct the users to highlight there choices and then click the select button that passes the values into a text area and this is not what I want to do.

This is my psuedo code:

ADD Phase

user enters text into text field and clicks Add

goes through code that enters the info into listbox

Code has to get value from text field and enter it into listbox as option

Remove Phase

user selects single or multiple entries to remove selection clicks remove

Code gets value of what was selected and removes its

Select phase

user clicks select and either selection of list box or all with no selection are chosen.

I thank you for any assistance as this is stumping me.

[1444 byte] By [dupey00_ca] at [2007-11-26 9:29:26]
# 1
Hi there,I am not sure if you have seen this tutorial "Sharing Data Between Two Pages", but it does exactly what you are asking http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/dat a_sharing_twopages.htmlHope it helpsK
kish@sun at 2007-7-7 0:12:20 > top of Java-index,Development Tools,Java Tools...
# 2

I have seen and even tried that demo and like all examples that I have tried and comprehended, it works great but unfortunately, It requires that the user makes a selection.

See I have the list box getting filled with entries from a text field and this portion of adding and removing work great and is a requirement.

I need to get all values upon a button click from the list and since the user entered the information into the list, I do not want the user to select his entries.

Ultimately I need the listbox because of the add/ remove capability but I am unsure of how to proceed to alleveate the extra steps of the users from selecting their input.

I understand the option[] is where the list is stored and the string[] is the results but where my logic or knowledge lacks is in getting the list back when no selection is made.

I thank you for any help.

dupey00_ca at 2007-7-7 0:12:20 > top of Java-index,Development Tools,Java Tools...
# 3
I replied to your duplicate question http://swforum.sun.com/jive/thread.jspa?threadID=104721&tstart=0. Hopefully this is what you are looking for.
jetsons at 2007-7-7 0:12:20 > top of Java-index,Development Tools,Java Tools...