ImageSubmit Component Index InsertText

Insert
org.apache.tapestry.components.Insert
Inserted text

Description
Allows for the insertion of text (with a specified format) into the HTML. The text itself can be 'transformed' or not (where 'transform' in this case means that various characters like < and > are transformed into HTML safe representations such as &lt; and &gt;). The value for the text is bound, just like any other component.
See Also
Conditional, Foreach, RenderBlock, InsertText, RenderBody
Parameters
Name Type Direction Required Default Description
value Object in no   The value to be inserted. If the binding is null, then nothing is inserted. Any object may be inserted, the toString() method is used to convert it to a printable value.
format Format in no   An optional format object used to convert the value parameter for insertion into the HTML response.
class String in no   If specified, then the output is wrapped in an HTML <span> tag, using the value specified as the CSS class.

Informal parameters are only rendered if a class is specified.

raw boolean in no false If true, then the method IMarkupWriter.printRaw(String) is used, rather than IMarkupWriter.print(String).

This bypasses the normal safeguards and is used when the value to insert contains HTML markup that should be emitted as is.

Body: removed
Informal parameters: allowed
Reserved parameters: none

Examples

Inserts the pages dueDate and applies the specified DateFormat and HTML class.

The order was due on the 21 January 2002.

The order was due on the <span jwcid="@Insert" value="ognl:dueDate" format="ognl:@EnquiryPage.@DATE_FORMAT" class="ognl:dueClass"/>.


<property-specification name="dueDate" type="java.util.Date"/>
<property-specification name="dueClass" type="java.lang.String"/>
public abstract class EnquiryPage extends BasePage { public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd MMM yyyy"); public abstract Date getDueDate(); public abstract String getDueClass(); }

InsertImage Home InsertText