wood burning stoves 2.0*
The moose likes Struts and the fly likes saving session variable in drop down list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "saving session variable in drop down list" Watch "saving session variable in drop down list" New topic
Author

saving session variable in drop down list

divya kundapur
Ranch Hand

Joined: Aug 21, 2007
Posts: 110

i have 2 session variables which has user selected values from 2 drop down lists. When the page reloads i want these 2 session variables to be displayed in the drop down lists. How can i use those session variables as values since the drop down lists gets data from a action class.


SCJP - 5.0
Bilal A. Siddiqui
Ranch Hand

Joined: Sep 14, 2008
Posts: 53

Add these session variables in your drop down list in action class itself.


Cheers!!! Bilal
Handsome Android||@bilal_speed||LinkedIn
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

divya kundapur wrote:
i have 2 session variables which has user selected values from 2 drop down lists. When the page reloads i want these 2 session variables to be displayed in the drop down lists. How can i use those session variables as values since the drop down lists gets data from a action class.

Do you want to say, like " User selects two values from DD lists, and when they select those values, its get inserted into session ?"


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
divya kundapur
Ranch Hand

Joined: Aug 21, 2007
Posts: 110
Sagar Rohankar wrote:
divya kundapur wrote:
i have 2 session variables which has user selected values from 2 drop down lists. When the page reloads i want these 2 session variables to be displayed in the drop down lists. How can i use those session variables as values since the drop down lists gets data from a action class.

Do you want to say, like " User selects two values from DD lists, and when they select those values, its get inserted into session ?"


I solved this issue, just had to use struts tags instead of plain html.
 
wood burning stoves
 
subject: saving session variable in drop down list