struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajanala, Srinivas" <srinivas.rajan...@qwest.com>
Subject Using Form Bean & Java Bean....
Date Tue, 23 Sep 2003 23:04:45 GMT

Hi,

Can I use both Form Bean & Java Bean inside a html:form?
I have ManageProfileBean(java bean) which has availRoles and
ManageProfileForm(Form bean) which has securityRoles. I need to iterate
through availRoles and display it as checkbox. When the user selects one or
more check boxes the data should get populated in the securityRoles of the
form bean.
I am trying to use the following code:
<html:form action="/manageProfile"> 


<td class=tr_header>Security Roles</td>
           <logic:present name="availRoles">
		       <logic:iterate name="availRoles" id="roles"
type="com.qwest.omt.bean.ManageProfileBean.availRoles">
		          <td>
                  <html:checkbox name="securityRoles" property="key"/>
                      <bean:write name="roles" property="value"/><br>
                  </logic:iterate>
                  </td>
            </logic:present>


In the following code, I am trying to use availDepts from the
ManageProfileBean(Java Bean) and
department from the ManageProfileForm(Form Bean). 


<logic:present name="availDepts">
                  <logic:iterate name="availDepts" id="dt">
                    <td>
                    <html:select property="department">
                      <html:option value="key">
                         <bean:write name="dt" property="value">
                      </html:option>
                    </html:select>
                  </logic:iterate>   
				  </td>
		   </logic:present>


Is it a correct? I appreciate your suggesions.

Thanks,
Srini

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message