Emits a value into the response page. The value can be limited to a specified number of characters
Name | Type | Required | Default | Description |
---|---|---|---|---|
maxLength | int | no | 25 | The value is truncated to this lengh unless content is raw. This includes the moreMarker if it is specified. |
moreMarker | java.lang.String | no | ... | The marker that is appended if the value string has been truncated. |
value | java.lang.String | no | The value to be emitted. Non-strings are converted to strings. | |
format | java.text.Format | no | A Format object used to convert the value to a string. | |
raw | boolean | no | If false (the default), then HTML characters in the value are escaped. If true, then value is emitted exactly as is. | |
class | java.lang.String | no | If specified, then any output is wrapped in an HTML span tag with the given CSS class. |
Insert a text that never goes beyond 22 characters including the "more" text: "..."
<span jwcid="@bayeux:InsertLimited" maxlength="22" value="ognl:longText">this text can't be ...</span>
public class APage extends BasePage { public String getLongText() { return "this text can't be longer than 22 characters"; } }