How do I manage standard HTML attribute markup?
How do I manage standard HTML attribute markup in my .html page?
If you were editing plain HTML you might wish to mark up a FORM INPUT component with attributes such as size= maxlength= name= value= etc. In WO, these are not managed in the HTML itself as you might expect, but in the associated .WOD file. This was previously managed for developers using Apple's WO tools with the WOBuilder application which presented a visual interface that hid the necessity for understanding these bindings from the developer.
Add the SIZE attribute to a FORM INPUT component
Say you wanted to add the LENGTH attribute to an HTML text input field that held a user's email address, and the default text field size was too short. Assuming the WebObject was named <webobject name = "email" /> in the .html file, you could add the SIZE attribute to it by editing its .wod file mapping as follows:
email : WOTextField {
value = user.email;
size = "30";
}
This would generate the following HTML
<input size="30" type="text" value="whatever the generated value is" name="whatever WO refers to this field as">
See Chuck Hill's http://wiki.objectstyle.org/confluence/display/WOL/Modern+Binding+Styles for more information on binding styles, and for experienced users, p201 of Practical WebObjects, Apress 2004, Hill & Mallais.