Dynamic Element Specifications
Table of Contents Previous Section
WOString
Synopsis
WOString { value=aString; [escapeHTML=YES|NO; ] [dateformat=dateFormatString;] [numberformat=numberFormatString;] ... };
Description
A WOString represents itself in the HTML page as a dynamically generated string.
- value
- Text to display in the HTML page. value is typically assigned an NSString object, an object that responds to a description message by returning an NSString, or a method that returns an NSString.
- The NSString's contents are substituted into the HTML in the place occupied by this dynamic element.
- escapeHTML
- If escapeHTML is YES, HTML tags in WOString's contents are protected from being interpreted by the browser; otherwise, they are not.
- By default, WebObjects tries to ensure that the contents of a WOString appears in the client browser just as it appears in the WebObjects application source code. Thus, if a WOString's value is "<B>a bold idea</B>" (and escapeHTML is YES or not specified), the string will be passed to the browser as "<B>a bold idea</B>" and it will appear in the browser as "<B>a bold idea</B>". If escapeHTML is NO, WebObjects simply passes the string to the browser without protecting HTML tags from being interpreted as commands. In this case, the string will appear in the browser as "a bold idea".
- dateformat
- A format string that specifies how value should be formatted as a date. If a date format is used, value must be assigned an NSCalendarDate object. If value can't be interpreted according to the format you specify, value is set to nil. See the NSCalendarDate class specification for a description of the date format syntax.
- numberformat
- A format string that specifies how value should be formatted as a number. If a number format is used, value must be assigned an NSNumber object. If the element's value can't be interpreted according to the format you specify, value is set to nil. See the NSNumberFormatter class specification for a description of the number format syntax.
Examples
How long is a fortnight?
Using escapeHTML
Using date and number formats
Table of Contents Next Section