You could have the other bean as an included object on
the form

<bean:write name="formName"
property="includedObject.date"/>

you are right that it won't be populated to the next
page if it is request scope.

It is normal to use html:hidden.

sandeep
--- Linus Nikander <[EMAIL PROTECTED]> wrote:
> How do I, at the Jsp level, successfully mix text
> and form fields where the
> data for them stems from the same bean. For example
> I have a Form bean,
> registeredUsersForm which contains a List of
> UserInfo beans. I've got a JSP
> that displays all the information from each bean in
> the list in a pretty
> table. The thing is that I don't want to let ther
> user edit some of the
> fields (registration date for instance). Basically
> I'd like to just output
> it as "normal" text if i could, in the same loop
> that generates the Form. I
> suspect that if I don't include the value as a part
> of the form then it
> won't be submitted to the next step, maybe that
> could be solved by having
> the same field rendered as text and a <html:hidden>
> field at the same time ?
> 
> The interation that generates the form is as
> follows:
> 
> <logic:iterate id="bean" name="registeredUsersForm"
> property="regUserList"
> indexId="i">
>   <tr>
>     <td><html:text name ="registeredUsersForm"
> property="<%=\"registeredUserBean[\" + i +
> \"].ssn\"%>" size="50"   /></td>
>     <td><html:checkbox name ="registeredUsersForm"
> property="<%=\"registeredUserBean[\" + i +
> \"].isBlacklisted\"%>"  /></td>
>     <td><html:text name ="registeredUsersForm"
> property="<%=\"registeredUserBean[\" + i +
> \"].dRegistrationDate\"%>"
> size="50"  /></td>
>     <td><html:checkbox name ="registeredUsersForm"
> property="<%=\"registeredUserBean[\" + i +
> \"].isContactLetterSent\"%>"
> /></td>
>     <td><bean:write name="registeredUserBean"
> property="dRegistrationDate"
> /></td>
>     </tr>
> </logic:iterate>
> 
> In the above I'd like to render the registration
> date as a normal string
> instead of a field, how do I achieve this using the
> same dataobject that is
> populating the form ?
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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

Reply via email to