See response inline.

[EMAIL PROTECTED] wrote:

The documentation says you don't need bean-el:write because of c:out,
but I think I have a valid use case for bean-el:write (Assuming
you want to avoid using <% %>).

Example:
I have a list of objects named "results"
each result contains a hashmap called 'translations'.

(1) render the results in a particular language (e.g. german)

<c:forEach items="results" var="result">
   <c:out value="${result.translations.de}"/>
</c:forEach>

(2) render the results in ${language} (= "language" in the pageContext)?

<c:out value="${result.translations(${language})}"/> is of course invalid, but
I think we could do it with bean-el:write

(...)
<bean-el:write name="result" property="translations(${language})"/>
pageContext - Is implicit variable in jsp.

<c:out value="${result.translations[pageContext.language]}"/>


What do you think?  Is there a way to do this without (the non-existant) 
bean-el:write that I overlooked?

Karel

Thanks,
Vijay Venkataraman

------------------------------DISCLAIMER------------------------------
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Lisle Technology Partners Pvt. Ltd. and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.

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

Reply via email to