Replace from maxLength all text with parameter value suffix.
| Name | Type | Flags | Default | Default Prefix | Description |
|---|---|---|---|---|---|
| maxLength | int | NOT Allow Null | 20 | literal | max. length of string value |
| suffix | String | NOT Allow Null | ... | literal | the suffix for strings that longer then maxLength |
| trimPos | String | NOT Allow Null | right | literal | trim the string at the left or right site. Default is right. |
| value | String | Required, NOT Allow Null | prop | the string value |
Informal parameters: supported
This example describe how to use the TrimmedString component.
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<body>
<h1>Hello Guys and Dolls</h1>
<p>
trimmed string at position 20
<br/>
<span t:type="ck/TrimmedString"
value="literal:this ist a very long test string"/>
</p>
<p>
trimmed string at position 10
<br/>
<span t:type="ck/TrimmedString" maxLength="10"
value="literal:this ist a very long test string"/>
</p>
<p>
trimmed string at position 20 (left side)
<br/>
<span t:type="ck/TrimmedString" maxLength="20"
value="literal:this ist a very long test string" trimPos="left"/>
</p>
</body>
</html>