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

http://issues.apache.org/bugzilla/show_bug.cgi?id=38208

           Summary: Should an attribute add to <bean:write/> tag for
                    ellipsis?
           Product: Struts
           Version: 1.2.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Taglibs
        AssignedTo: dev@struts.apache.org
        ReportedBy: [EMAIL PROTECTED]


In WriteTag.java
// ......
   // initial=0 
    protected int abbreviate = 0;
    
    public int getAbbreviate() {
        return abbreviate;
    }
    
    public void setAbbreviate(int abbreviate) {
        this.abbreviate = abbreviate;
    }
// ......
public int doStartTag() throws JspException {
// ...
         if (abbreviate > 0) {
            // if greater than 0(default if not set in <bean:wrire/>)
            output = StringUtils.abbreviate(output, abbreviate);
        }
        
        // Print this property value to our output writer, suitably filtered
        if (filter) {
//...
}

And the tag:
        <attribute>
            <name>abbreviate</name>
            <required>false</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>

Then  we can use <bean:write name="somename" abbreviate="length(int)"/> for
short text we want.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

Reply via email to