struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mick Knutson" <mickknut...@hotmail.com>
Subject Re: Using Form Bean & Java Bean....
Date Tue, 23 Sep 2003 23:10:20 GMT
I have a DynaActionForm that has several DTO's in an Array:

        <form-bean  name="locationListForm"
                    dynamic="false"
                    type="org.apache.struts.validator.DynaValidatorForm">
            <form-property name="userLocations"
type="com.baselogic.yoursos.location.LocationDto[]" />
            <form-property name="locationId" type="java.lang.String" />
            <form-property name="cellColor" type="java.lang.String"
initial="content_tbl_white" />
        </form-bean>

Works great.

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

----- Original Message ----- 
From: "Rajanala, Srinivas" <srinivas.rajanala@qwest.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Tuesday, September 23, 2003 4:04 PM
Subject: Using Form Bean & Java Bean....


>
> 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
>
>

---------------------------------------------------------------------
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