This works the same way as it does with the <html> tags.  The default value (value 
that is shown selected when the page is loaded) is determined by the value of the 
<nested:select>'s property attribute.  So, if 'rechercheInstancier.agent' is i1 and i1 
is one of the values of the <nested:options>, it will be displayed (selected).
 
Sri

-----Original Message-----
From: BARADAT Benoit [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 10:24 AM
To: Struts Users Mailing List
Subject: Display an option of a list with Nested


Hi !
 
I use the tag Nested Select for fill a list:
 
              <nested:select property="rechercheInstancier.agent">
                <nested:options property="rechercheInstancier.listeAgents" />
              </nested:select>
 
I grab this tag to a bean "rechercheInstancier" with an Arraylist:
 
  ArrayList listeAgents = new ArrayList();
 
To fill this ArrayList I use this instruction:
 
rechercheInstancierBean.addAgent(rs.getString("idAgent")); 
 
 
My problem: I would like to display a value of a list:
 
With HTML I use the word "selected":
<select name="liste"
    <option value="i1"selected>i1</option
    <option value="i2">i2></option>
</select>
In this case I display "i1" on the screen.
 
How display i1 with the Nested ?
 
Tank in advance
 
 
 
 
 
 

Reply via email to