Re: Output and JSTL
Shash Chatterjee <[email protected]>
| Newsgroups | gmane.comp.java.keel.devel |
|---|---|
| Message-ID | <[email protected]> |
Max,
>
> *Problem1:*
>
> However I am having difficulty in accessing the outputs by name. From
> the OutputsInMaverickJSTL Wiki it says that named outputs can be
> accessed using something like:
>
> <c:out value="${model.myoutput.map['content']}" default=""/>
>
> This does not work and neither does:
>
> <c:out value="${myoutput.map['content']}" default=""/>
>
> I looked at the code in StrutsClientConnector where I think the
> response elements are added to the DynaBean, but I cannot see where
> the elements are added by name. Also as they are added as an array and
> not as a Map so the elements cannot be referenced using something like
> outputs['myoutput']. I seem to remember doing this in Expresso.
>
I finally got a chance to look at this, using the Maverick client. The
doc was wrong....for "named" outputs, just skip the "model."
prefix....i.e., use: <c:out value="${myoutput.map['content']}"
default=""/>. In StrutsClientConnector, line 179, it is also added to
the webapp-request, I guess you'd have to get the output as an attribute
from the request first....I haven't tried it, though.
Shash