1

I am using <bean:write/> tag in my struts program to catch my data into text field but I want to update/edit those data which is coming by this tag so I want to use <html:text/> tag with <bean:write/>, is it possible? is there any other option to update <bean:write/> tag's data.

I am using this tag like -

<bean:write name="Customer" property="lastname"/>

Khoyendra Pande
  • 1,627
  • 5
  • 25
  • 42

1 Answers1

1

It's not entirely clear to me what you want to update, and under what circumstances.

If you're saying to want to have the customer's last name be an editable text field, then initialize the ActionForm with the appropriate values before displaying it to the user; you don't need the <bean:write> tag at all if you're just trying to initialize/show a form field.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
  • ya we are already initializing this field in ActionForm but to show in to jsp form we are using tag. if we doesn't edit tag value then is there any other tag to catch that initialized value in jsp form? – Khoyendra Pande Oct 14 '11 at 11:55
  • @KhoyendraPande If the form bean is initialized, the form tag will use its existing value as the text input's value. The other option, which shouldn't be necessary, is to use JSP EL to set the input value, but this is redundant since the form tag will already use the action form value. – Dave Newton Oct 14 '11 at 12:21