You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/27 04:48:34 UTC
[jira] Updated: (STR-2725) Should an attribute add to
tag for ellipsis?
[ https://issues.apache.org/struts/browse/STR-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated STR-2725:
-------------------------------
Fix Version/s: Future
Assignee: (was: Struts Developers)
> Should an attribute add to <bean:write/> tag for ellipsis?
> ----------------------------------------------------------
>
> Key: STR-2725
> URL: https://issues.apache.org/struts/browse/STR-2725
> Project: Struts 1
> Issue Type: Improvement
> Components: Taglibs
> Affects Versions: 1.2.7
> Environment: Operating System: Linux
> Platform: PC
> Reporter: Chen Lei
> Priority: Minor
> Fix For: Future
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.