PATH |
A WOString represents itself in the HTML page as a dynamically generated string.
true
(or YES
),
the string rendered by value is converted
so that characters which would be interpreted as HTML control characters
become their escaped equivalent (this is the default). Thus, if
a your value is "a <b>bold</b>
idea
", the string passed to the client browser
would be "a <B>bold</B>
idea
", but it would display in the browser
as "a <b>bold</b> idea
".
If escapeHTML evaluates to false
(or NO
), WebObjects
simply passes your data to the client browser "as is." In this
case, the above example would display in the client browser as "a
bold idea
". If you are certain that your strings
have no characters in them which might be interpreted as HTML control
characters, you get better performance if you set escapeHTML to false
(or NO
). An instance of an NSFormatter subclass to be used to format object values for display as strings. This attribute should specify a variable containing (or method returning) a preconfigured formatter object. For instance, a WOString might have the binding:
formatter = application.dateFormatter
With the following code:
// Application.wos NSFormatter *_dateFormatter; - (NSFormatter *)dateFormatter { if (!_dateFormatter) { _dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:@"%m/%d/%Y" allowNaturalLanguage:NO]; } return _dateFormatter; }
If a user enters an "unformattable" value, WOString passes the invalid value through, allowing you to send back an error page that shows the invalid value.
nil
. See the NSCalendarDate class
specification for a description of the date format syntax.nil
. See the NSNumberFormatter
class specification for a description of the number format syntax.