Thanks. yes, the userBean is the actionform associated with the jsp page.

I tried it using the below given code..i used userID instead of user ..just
for test..
<html:select name="userDataBean" property="userID">
<html:optionsCollection name="userDataBean" property="roleUser" label
="roleID" value="desc" />
</html:select>

But it's giving me below given error..though the userDataBean is having the
getter method for the userID ..
No getter method available for property userID for bean under name
userDataBean'



bye,
prashant..



                                                                                       
                            
                    "Nagendra                                                          
                            
                    Kumar O V S"         To:     <[EMAIL PROTECTED]>                   
               
                    <[EMAIL PROTECTED]        cc:                                      
                                 
                    go.com>              Subject:     Re: <html:select> problem        
                            
                                                                                       
                            
                    08/11/03                                                           
                            
                    06:27 PM                                                           
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    "Struts Users                                                      
                            
                    Mailing List"                                                      
                            
                                                                                       
                            
                                                                                       
                            



                                                                                       
        
 hi,                                                                                   
        
 u r not v clear in ur question                                                        
        
 is userBean, the action form associated with the jsp page..?? if yes.                 
        
 then                                                                                  
        
 <html:select name="userDataBean" property="user">                                     
        
 <html:optionsCollection name="userDataBean" property="roleUser" label="roleid" 
value="desc"   
 />                                                                                    
        
 </html:select>                                                                        
        
 should work for u                                                                     
        
                                                                                       
        
 the property "user" should also be in the action form, which holds the value of the 
client    
 selected in the drop down on the form submit                                          
        
                                                                                       
        
 -- nagi                                                                               
        
                                                                                       
        
 -------Original Message-------                                                        
        
                                                                                       
        
 From: Struts Users Mailing List                                                       
        
 Date: Monday, August 11, 2003 06:03:01 PM                                             
        
 To: [EMAIL PROTECTED]                                                            
 Subject: <?XML:NAMESPACE PREFIX = HTML /> problem                                     
        
                                                                                       
        
 Hi,                                                                                   
        
 I have a problem handling nested beans..                                              
        
 For example...                                                                        
        
 I have a userBean as given below                                                      
        
 private int userID;                                                                   
        
 private String lastName;                                                              
        
 private String firstName;                                                             
        
 private ArrayList roleUser;                                                           
        
 Where the last field Arraylist is the arraylist of the objects of the bean            
        
 called roleUserBean.                                                                  
        
                                                                                       
        
 Again the roleUserBean has the following properties.                                  
        
 private int roleid;                                                                   
        
 private String desc;                                                                  
        
 private String name;                                                                  
        
 private ArrayList menuComponent;                                                      
        
                                                                                       
        
 I have put the userBean in the session scope. Now I want to show all the              
        
 elements in the ArrayList roleUser in a drop down. I am trying to use the             
        
 <html:select> tag. But it's giving me errors.                                         
        
                                                                                       
        
 What I am doing is                                                                    
        
 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
        
 <bean:define id="roleuser" name="userDataBean" property="roleUser" scope              
        
 ="session" type="java.util.ArrayList"/>                                               
        
                                                                                       
        
 <html:select name="userDataBean" property="roleUser">                                 
        
 <html:options collection="roleuser" labelProperty="roleID" property                   
        
 ="desc" />                                                                            
        
 </html:select>                                                                        
        
 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 
        
                                                                                       
        
                                                                                       
        
                                                                                       
        
 Please help ..                                                                        
        
                                                                                       
        
 Thanks in advance.                                                                    
        
                                                                                       
        
 Prashant M Desai.                                                                     
        
                                                                                       
        
                                                                                       
        
 ---------------------------------------------------------------------                 
        
 To unsubscribe, e-mail: [EMAIL PROTECTED]                            
 For additional commands, e-mail: [EMAIL PROTECTED]                          
                                                                                       
        
                                                                                       
        
 .                                                                                     
        
                                                                                       
        
                                                                                       
        
                                                                                       
        
                                                                                       
        
                                                                                       
        
                                                                                       
        
                                                                                       
        
                                                                                       
        


____________________________________________________
  IncrediMail - Email has finally evolved - Click Here





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to