Give this a try:

<html:form action="/nextAction.do" >
    <table align="center" border="0" cellpadding="2" cellspacing="10">
        <tr>
            <td align="left">
                <html:text name="path.to.model.bean" property="name" size
="50" maxlength="50"/>
            </td>
        </tr>
    </table>
</html:form>


Looking at the code, if the 'value' attribute is null, then the 'name' and
'property' attributes are used to look up the value via the pageContext.
This means that the 'property' value must be the same in both the model
bean and your form bean.

Regards,

Steve Akins
Team Leader, Frameworks, J2EE Engineering
Development Centre
Financial Services Australia Technology


( +61 3 8641 2846 2 +61 3 8641 4152 : [EMAIL PROTECTED]


National Australia Bank Limited
4th Floor/ 500 Bourke St
Melbourne, Victoria 3000


|---------+---------------------------->
|         |           Richard Hill     |
|         |           <[EMAIL PROTECTED]|
|         |           .com>            |
|         |                            |
|         |           04/04/2003 13:25 |
|         |           Please respond to|
|         |           "Struts Users    |
|         |           Mailing List"    |
|         |                            |
|---------+---------------------------->
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                          |
  |       To:       "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>                          
|
  |       cc:                                                                          
                          |
  |       Subject:  Using a model bean value in a <html:text value=...tag              
                          |
  
>--------------------------------------------------------------------------------------------------------------|




I have an action that creates and populates a model bean (not a form bean)
and makes it available to the view component, in this case a success.jsp .

In the success.jsp I have a form. I would like to populate the form field
with the value from my model bean that was just passed to it.

I tried using the following...

<html:form action="/nextAction.do" >
    <table align="center" border="0" cellpadding="2" cellspacing="10">
        <tr>
            <td align="left">
                <html:text property="name" size="50" maxlength="50"
value="<bean:write name="path.to.model.bean" property="name" />" />
            </td>
        </tr>
    </table>
</html:form>

And I get a "org.apache.jasper.JasperException: /success.jsp(10,103)
jsp.error.attribute.noequal" error.

How can I populate the form field with my model bean value?

Thanks,
- Richard



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






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

Reply via email to