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/11/11 17:22:03 UTC

DO NOT REPLY [Bug 24608] New: - Enhance BaseFieldTag - refactor value attribute retrieval

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=24608>.
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=24608

Enhance BaseFieldTag - refactor value attribute retrieval

           Summary: Enhance BaseFieldTag - refactor value attribute
                    retrieval
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: rvh3@comcast.net


As a base to http://issues.apache.org/bugzilla/show_bug.cgi?id=22991, pulling
value retrieval out into a protected method would simplify (and reduce
cut/paste) extending input tags in order to allow for custom formatting (or
Converter usage) of the initial value.

Suggested patch:

diff --rcs BaseFieldTag.java.orig BaseFieldTag.java
d173 9
a181 2
        results.append( getValue() );
        results.append('"');
a194 14
     * Return the value.
     */
    public String getValue() {
        if (value != null) {
            results.append(ResponseUtils.filter(value));
        } else if (redisplay || !"password".equals(type)) {
            Object value = RequestUtils.lookup(pageContext, name, property, null);
            if (value == null)
                value = "";
            results.append(ResponseUtils.filter(value.toString()));
        }
    }

    /**

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