You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/03/18 17:38:47 UTC

DO NOT REPLY [Bug 11852] - The bean:message tag should accept Objects as arguments

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11852>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11852

The bean:message tag should accept Objects as arguments

jpl@remotejava.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|LATER                       |



------- Additional Comments From jpl@remotejava.com  2003-03-18 16:38 -------
By all means, please FIX THIS! I want to produce a message saying "Returning XXX of YYY search results". This is what I have to falling back on the proposed "formatKey" resolution:

            <bean:message key="msgsearch.manyMatches_1"/>
            <bean:write formatKey="integerFormat" name="results" property="hitCount"/>
            <bean:message key="msgsearch.manyMatches_2"/>
            <bean:write formatKey="integerFormat" name="results" property="totalHitCount"/>
            <bean:message key="msgsearch.manyMatches_3"/>

This is what I would need if setArg was accepting non-String arguments:

<bean message key="msgsearch.manyMatches" setArg0="<%= results.getHitCount() %>" setArg1="<%= results.getTotalHitCount() %>"/>

The necessity of using ugly JSP scriptlets in the one-liner above is yet another story, but concatenating messages with 5 JSP tags looks insane. Note that I cannot even prepare the Message in my Action (which generally is flawed design, IMO) and pass it to the JSP page because at the time the Action is being executed, the HTML cache has not been consulted (by the view) yet to determine whether the data should be retrieved from the db at all.

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