Documenting ofBiz: 02.12.2004
Posted by Kelvin on 02 Dec 2004 at 10:56 pm | Tagged as: programming
widget-form.dtd
is found at ofBizHome/components/content/dtd/widget-form.dtd. This file is very helpful when learning to code forms using the form widget.- To substitute values into XXXForms.xml fields, in the appropriate .bsh file, use something like
formWrapper.putInContext("name", "value")
instead of adding the value into thecontext
. Even better, check out the wiki page for form widgets. - Individual <field> declarations override defaults for the <auto-fields-entity>. For example, this is how to make a hidden field with a value:
<field name="fieldName"><hidden value="defaultValue"/></field>
- There is a (implicit?) case-sensitive naming convention for form actions. This is IMPORTANT!
- Actions displaying forms to create an entity: AddXXX
- Actions executing the entity creation: createXXX
- Actions displaying forms to update an entity: EditXXX
- Actions executing the entity update: updateXXX
- Actions executing entity deletion: removeXXX
The rule of thumb is all actions which display a view should be start with an upper-case character, and all database-related actions should start with a lower-case character.
Comments Off on Documenting ofBiz: 02.12.2004