You should try using the name you're using for the form when you pass
it from your action to your JSP.

> final DynaBean dynaForm = (DynaBean)form;
> dynaForm.set("displayName", "test");

If you're using request.setAttribute("displayForm", dynaForm); then try

<c:out value="${displayForm.map.displayName} />

Hubert

On 8/24/05, John Hutchinson <[EMAIL PROTECTED]> wrote:
> Hi there.
> 
> I have a form that uses org.apache.struts.validator.LazyValidatorForm.
> 
> When I pre-populate this form before displaying it, I use code like
> the following in the action:
> 
> final DynaBean dynaForm = (DynaBean)form;
> dynaForm.set("displayName", "test");
> 
> In my JSP, I have a <html:text> element that looks like this:
> 
> <html:text property="displayName" size="25" />
> 
> The value 'test' is populated as expected.
> 
> Now I want to change this from a <html:text> to just hard output (via
> <c:out>) if some boolean is true:
> 
>     <c:choose>
>       <c:when test="${param.function == 'displayEdit'}">
>          <html:text property="displayName" size="25" />
>       </c:when>
>       <c:otherwise>
>          <c:out value="${dynabean.map.displayName} />
>       </c:otherwise>
>     </c:choose>
> 
> I can't seem to get the <c:out> to render anything using the
> dynabean.map.prop value as described in the guide. What am I doing
> wrong?
> 
> I'm using Struts 1.2.7 on Tomcat 5.5 with JSTL 1.1.2
> My includes are:
> <%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
> 
> ---------------------------------------------------------------------
> 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