You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Schaub, Stephen" <st...@agilysys.com> on 2005/07/11 22:08:25 UTC

Displaying data from a form bean

Newbie question:

Struts lets me bind ActionForm properties to HTML form components like this:

<html:form action="confirm.do">

 Enter customer name: <html:text property="customer" />
  ...

</html:form>

I don't have to name the form bean, because Struts will look it up in the struts-config file for me. 

I'm trying to get Struts to output the contents of an ActionForm property, without binding it to an input control. Currently, I'm using <c:out> to render the display-only info. However, this requires me to name the form bean explicitly, which I would like to avoid:


<html:form action="confirm.do">

 <c:out value="${myformbean.product}" />

 Enter customer name: <html:text property="customer" />
  ...

</html:form>

I looked through the struts <html:> tags looking for one that simply emits the data in the specified form bean, but I can't find one. What am I missing? 

Stephen

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