Apache OFBiz Framework Quick Reference Book brought to you by: Revision 1.6.3 - ofbiz.apache.org HOTWAX MEDIA, INC. SVN rev 514251 www.hotwaxmedia.com
Development Flow Configuration & Deployment Start Data Layer General Configuration
Entity Group Entity Definition JNDI Servers Cache Properties entitygroup*.xml entitymodel.xml jndiservers.xml cache.properties
URL Properties Debug Properties Entity ECA url.properties debug.properties eecas*.xml
Security Logic Layer security.properties security.xml
Service Service Definition Implementation services*.xml *Services.xml, Containers & Components *Services.java , etc.
Component Load component-load.xml Containers Service ECA Service Group *containers.xml secas*.xml groups*.xml Component ofbiz-component.xml User Interface Layer
Request & View Entity & Service Config Screen Widget Definitions *Screens.xml (web only) controller.xml Entity Config entityengine.xml Service Config serviceengine.xml BeanShell Form Widget *.bsh *Forms.xml Entity Field Type fieldtype*.xml Menu Widget *Menus.xml
FreeMarker Tree Widget *.ftl *Trees.xml
This diagram represents the recommend process for development. See the last page for a diagram that shows how the artifacts refer to each other.
Copyright © 2004-2007 HOTWAX MEDIA, INC. Main Diagram page 1 page 2 Entity Definition, Group, ECA Copyright © 2004-2007 HOTWAX MEDIA, INC. Entity Definition Entity ECA Entity Group [Root Element] [Root Element] [Root Element] [0..1] [0..*] [1..*] [0..1] [0..1] [0..1] entity="string [r]"/> operation="(create|store|remove|find| [0..1] create-store|create-remove| store- Start Choice [0..*] remove|create-store-remove|any) [r]" [1] Entity Definition: View Entities event="(validate|run|return|cache- [1] check|cache-put|cache-clear) [r]" End Choice [Part of Entity Definition] run-on-error="(true|false) [o]"> string package-name="string [r]" [1] string dependent-on="string [o]" [1] string default-resource-name="str[o]" End Choice string never-cache="(true|false) [o]" [1..*] string auto-clear-cache="(true|false)[o]" title="s[o]" copyright="s[o]" operator="(less|greater|less-equals| Entity Definition: Entities [0..1] greater-equals|equals|not-equals|is- [1..*] empty|is-not-empty|contains) [r]" [Part of Entity Definition] [0..*] [0..*] value="string [o]" [0..*] [0..*] type="(PlainString|String|BigDecimal| table-name="string [o]" Double|Float|Long|Integer|Date|Time| package-name="string [r]" format="string [o]"/> dependent-on="string [o]" [0..1] operator="(less|greater|less-equals| no-auto-stamp="(true|false) [o]" contains) [r]" auto-clear-cache="(true|false)[o]" [0..1] to-field-name="string [o]" title="s[o]" copyright="s[o]" [0..*] type="(PlainString|String|BigDecimal| author="s[o]" version="s[o]"> Double|Float|Long|Integer|Date|Time| [0..1] Timestamp|Boolean|Object) [o]" [1..*] [0..*] [0..*] [0..*] name="str [r]" field="str [o]" col-alias="string [o]" mode="(sync|async) [r]" prim-key="string [o]" result-to-value="(true|false) [o]" group-by="(true|false) [o]"> persist="(true|false) [o]" [0..1] [0..*] [0..1] run-as-user="string [0..1:system]" [0..1] value-attr="string [o]"/> rel-entity-name="string [r]" Start Choice [0..*] Entity Group type="(one|many|one-nofk) [r]" [1] fk-name="string [o]"> [1] [based on product/entitydef/entitygroup.xml] [0..1] [1..*] End Choice xsi:noNamesp...="...dtds/entitygroup.xsd"> rel-field-name="string [o]"/> unique="(true|false) [o]"> count-distinct|upper|lower) [o]" [0..1] field="string [r]"/> entity="SomeDataWarehouseEntity" /> [1..*] rel-entity-alias="string [r]" rel-optional="(true|false) [o]"> [0..1] [0..*] [1..*] Entity ECA [0..*] [0..*] [from product/entitydef/eecas.xml] mode="sync" value-attr="productInstance"/> operation="create-store" event="return"> mode="sync"/> operation="create-store-remove" event="return"> service="updateInventoryItemFromDetail" mode="sync"/> Copyright © 2004-2007 HOTWAX MEDIA, INC. Service Definition, Group, ECA page 3
Service Definiton: Attributes Service Definition Service ECA [Root Element] [Part of Service Definition] [Root Element] [0..1] [1..*] [0..1] [0..1] type="string [r]" [0..1] [1..*] mode="(IN | OUT | INOUT) [r]" optional="(true | false) [o]" event="(global-commit|global- string form-label="string [o]" rollback|auth|in-validate|out- string entity-name="string [o]" validate|invoke|commit|return) [r]" string field-name="string [o]" run-on-failure="(true|false) [o]" string string-map-prefix="str [o]" run-on-error="(true|false) [o]"> string string-list-suffix="str [o]" Start Choice [0..*] [1] [1] engine="string [r]" [0..*] [1] End Choice location="str [o]" invoke="str [o]" Start Choice [1..*] auth="(true|false) [o]" [1] [1] End Choice export="(true|false) [o]" type="s[o]" entity-name="s[o]" validate="(true|false) [o]" field-name="string [o]" empty|is-not-empty|contains) [r]" transaction-timeout="str [o]" [0..*] value="string [o]" max-retry="string [o:-1]" type="(PlainString|String|BigDecimal| debug="(true|false) [o]"> [0..1] class="str[0..1:org.ofbiz.base.util.UtilValidate]"> Timestamp|Boolean|Object) [o]" [0..1] Start Choice [1] format="string [o]"/> [0..*] [1] [1] [0..*] End Choice field-name="string [r]" [0..*] operator="(less | greater | less- [0..*] [0..*] equals | greater-equals | equals | to-map-name="string [o]" service-name="string [r]" to-field-name="string [o]" resource-description="string [o]" type="(PlainString|String|BigDecimal| main-action="(CREATE|UPDATE|DELETE| Double|Float|Long|Integer|Date|Time| VIEW) [o]"> Timestamp|Boolean|Object) [o]" join-type="(AND|OR) [r]"> [0..*] service-name="string [r]"/> [0..*] Service ECA mode="(sync|async) [r]" xsi:noNam...="...dtds/service-eca.xsd"> new-transaction="(true|false) [o]" event="commit"> ignore-failure="(true|false) [o]" mode="(IN|OUT|INOUT) [r]" name="oldStatusId"/> env-name="str [o]" value="str [o]" form-display="(true|false) [o]"> hash-code|long|double|upper-first- char|lower-first-char|db-to-java|java- to-db) [o]"/>
Service Definition Service Group [from ofbiz/applications/product/servicedef/services.xml] [Root Element] [1..*] xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/services.xsd"> Product Component Services OFBiz 1.0 send-mode="(none|all|first-available| random|round-robin) [o]"> [1..*] mode="(sync|async) [o]" preserve="(optional|preserve) [o]"/> Service Group xsi:noNam...="...dtds/service-group.xsd"> mode="sync" result-to-context="true"/> page 4 simple-methods 1 of 4 Copyright © 2004-2007 HOTWAX MEDIA, INC.
simple-method: General Operations simple-method: Call Operations simple-method [Root Element] [Part of simple-method] [Part of simple-method] [1..*] method-name="string [r]" short-description="string [r]" login-required="(true|false) [o]" use-transaction="(true|false) [o]" default-error-code="str [0..1:error]" [Used when method default-success-code="[0..1:success]" called as a Control Servlet Event] parameter-map-name="[0..1:parameter]" event-request-object-name="string [0..1:request]" event-response-object-name="string [0..1:response]" simple-method: Entity Operations event-response-code-name="string [0..1:_response_code_]" [Part of simple-method] event-error-message-name="string [Used when method [0..1:_error_message_]" called as an OFBiz Service] event-event-message-name="string [0..1:_event_message_]" service-response-message-name="string [0..1:responseMessage]" service-error-message-name="string [0..1:errorMessage]" See Shared service-error-message-list- See Shared name="string [0..1:errorMessageList]" See Shared service-error-message-map- name="string [0..1:errorMessageMap]" See Shared service-success-message-name="string See Shared [0..1:successMessage]" service-success-message-list- simple-method: Control Operations name="str [0..1:successMessageList]" locale-name="string [0..1:locale]" [Part of simple-method] delegator-name="str [0..1:delegator]" security-name="str [0..1:security]" dispatcher-name="s [0..1:dispatcher]" user-login-name="s [0..1:userLogin]"> Start Group: AllOperations [0..*] Start Choice [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] [1] End Choice simple-method example End Group: AllOperations [Example CrUD methods from framework/example/script/org/ofbiz/example/ExampleServices.xml] type="string [o]"/> ... property="str [o]"/> property="str [o]"/> property="str [o]"/> property="str [o]"/> property="str [o]"/> ... property="str [o]"/> property="str [o]"/> property="str [r]"/> ... Copyright © 2004-2007 HOTWAX MEDIA, INC. simple-methods 2 of 4 page 5
simple-method: If Operations 1 of 2 simple-method: If Operations 2 of 2 simple-method: Control Operations
[Part of simple-method] [Part of simple-method] [Part of simple-method] map-name="s[o]" field-name="s[r]" entry-name="string [r]" method="string [r]" list-name="string [r]"> class="s [0..1:org.ofbiz.base.util.UtilValidate]"> Group: AllOperations [0..*] [1] [1] Group: AllOperations [0..*] [0..*] [0..1] [0..1] key-name="string [r]" [1] class="string [r]"> Group: AllOperations [0..*] [1] Group: AllOperations [0..*] End Choice [0..1] count="str [r]" field="str [r]"> value="string [r]" format="string [o]" error-code="string [0..1:error]" [1] [1] operator="(less|greater|less-equals| error-list-name="s[0..1:error_list]"> greater-equals|equals|not-equals| [0..1] contains) [r]" [0..1] Group: AllOperations [0..*] type="(PlainString|String|BigDecimal| [0..1] Double|Float|Long|Integer|Date|Time| [0..1] Timestamp|Boolean|Object) [o]"> Start Group: IfConditions [1..*] Group: AllOperations [0..*] [0..1] error-list-name="s[0..1:error_list]"> [1] Start Choice [1] [1] [1] End Choice map-name="s[o]" field-name="s[r]" [1] End Group: IfConditions to-map-name="string [o]" End Choice to-field-name="string [o]" format="string [o]" greater-equals|equals|not-equals| contains) [r]" Group: IfConditions [1..*] type="(PlainString|String|BigDecimal| If & Service Example Double|Float|Long|Integer|Date|Time| Timestamp|Boolean|Object) [o]"> [from applications/product/script/org/ofbiz/ Group: IfConditions [1] Start Group: AllOperations [0..*] shipment/shipment/ShipmentServices.xml] [0..1] title="string [o]" error-list-name="s[0..1:error_list]"> map-name="s[o]" field-name="s[r]" Group: IfConditions [1..*] expr="string [r]"> Group: AllOperations [0..*] [0..1] "parameters.estimatedShipDate"/> permission="string [r]" map-name="s[o]" field-name="s[r]"> operator="not-equals" to-field- name="lkdUpVal.estimatedShipDate"/> [0..1] Group: AllOperations [0..*] [0..*] [0..1] Start Choice [1] [1] [1] map-name="s[o]" field-name="s[r]"> map-name="parameters"/> End Choice Group: AllOperations [0..*] [0..1] name="parameters.originFacilityId" operator="not-equals" to-field- name="lkdUpVal.originFacilityId"/> party-id-env-name="string [o]"/> permission="string [r]" action="string [o]"> action="string [o]"/> Group: AllOperations [0..*] [0..1] value-name="estShipWe" auto-field-map="false"> map-name="string [o]" env-name="lkdUpVal.estimatedShipWorkEffId"/> Start Choice [0..1] [1] [1] from-field= End Choice "parameters.estimatedShipDate"/> Control Snippets Example service-name="updateWorkEffort" to-map-name="estShipWeUpdMap"/> service-name="updateWorkEffort" in-map-name="estShipWeUpdMap"/> page 6 simple-methods 3 of 4 Copyright © 2004-2007 HOTWAX MEDIA, INC.
simple-method: General Operations simple-method: Call Operations simple-method: Call Service Ops
[Part of simple-method] [Part of simple-method] [Part of simple-method] default-value="string [o]" out-map-name="string [r]" service-name="string [r]" Double|Float|Long|Integer|Date|Time| [0..1] in-map-name="string [o]" Timestamp|Boolean|Object) [o]" include-user-login="(true | false) set-if-null="(true|false) [o]" set-if-empty="(true|false) [o]"/> resource="string [o]" service-name="string [r]" map-name="s[o]" field-name="s[r]" xml-resource="string [o]" include-user-login="(true|false) [o]" break-on-error="(true|false) [o]" list-name="string [r]" obj-field-name="string [r]" success-code="string [0..1:success]"> [0..1] map-name="string [r]" method-name="string [r]" [0..1] to-map-name="string [o]"/> ret-field-name="string [o]" [0..1] [0..1] map-name="s[o]" field-name="s[r]" Start Choice [0..*] [0..1] string="string [r]" [1] [1] [0..1] arg-list-name="string [o]" End Choice [0..1] prefix="string [o]" Start Choice [0..*] suffix="string [o]"/> [1] [1] string="str [r]" list-name="str [r]" method-name="string [r]" [1] arg-list-name="string [o]" ret-field-name="string [o]" [1] message-field-name="string [o]"/> ret-map-name="string [o]"> [1] [1] [1] format="string [o]" End Choice numeric-padding="string [o]"/> class-name="string [r]" field-name="str [o]"/> request-name="str [o]"/> list-name="string [r]"/> Start Choice [0..*] [1] [1] session-name="str [o]"/> End Choice service-result-name="string [o]"/>
[Part of simple-method] message="string [o]"> [1] [1] request-name="string [o]"/> map-name="s[o]" field-name="s[r]" session-name="string [o]"/> env-name="string [r]"/> default="string [o]" or in RPN: "a=+(b,/(*(+(c,x,2),-d),e))" --> resource="s[r]" property="s[r]" map-name="s[o]" field-name="s[r]" EventOperations default="string [o]" request-name="string [r]" no-locale="(true | false) [o]" list-name="string [o]"/> arg-list-name="string [o]"/> value-name="string [r]"/> default="string [o]" field-name="d"/> map-name="s[o]" field-name="s[r]" | Integer | BigDecimal) [o]" resource="str [r]" property="str [r]" decimal-format="string [o]"> default="string [o]" Start Choice [0..*] field-name="string [r]" [1] [1] session-name="string [o]"/> End Choice map-name="s[o]" field-name="s[r]" multiply|divide|negative) [r]" map-name="s[o]" field-name="s[r]"> Start Choice [0..*] [1] [1] End Choice Copyright © 2004-2007 HOTWAX MEDIA, INC. simple-methods 4 of 4 page 7
simple-method: Entity Find Ops simple-method: Entity Misc Ops Simple Map Processor [Part of simple-method] [Part of simple-method] [Root Element] [1..*] EntityFindOperations EntityMiscOperations entity-name="string [o]" sequence-name="string [r]" name="string [r]"> delegator-name="string [o]"/> [0..*] [0..*] entity-name="string [r]" seq-field-name="string [r]" map-name="string [r]" numeric-padding="string [0..1:5]" order-by-list-name="string [o]" increment-by="string [0..1:1]"/> Start Choice [0..*] delegator-name="string [o]" [1] [1] use-cache="(true | false) [o]" location="string [r]" [1] use-iterator="(true | false) [o]" delegator-name="string [o]" End Choice list-name="string [r]"/> timeout="integer [0..1:-1]" entity-name="string [r]" mode="(assert | load) [o]"/> count-name="string [r]"> began-transaction-name="string string Start Choice [1] [0..1:beganTransaction]"/> [1] [1] began-transaction-name="string [1] End Choice [0..1:beganTransaction]"/> [1] [1] [0..1] [1] [1] EntityTxOperations [1] [1] order-by-list-name="string [r]"/> EntityFindOperations Start Choice [1] list-name="[r]" to-list-name="[o]" simple-method: Entity Change Ops [1] [1] map-name="string [o]"/> End Choice EntityFindOperations greater-equals|equals|not-equals| thru-field-name="str [0..1:thruDate]" value-name="string [r]" type="(PlainString|String|BigDecimal| new-value-name="string [r]"/> Double|Float|Long|Integer|Date|Time| Entity Misc Operations Example value-name="string [r]" Start Choice [1] do-cache-clear="(true|false)[o]"/> [1] [1] entity-name="ShipmentItem"/> do-cache-clear="(true|false)[o]"/> field="str [r]" format="str [o]" value-name="string [r]" operator="(less|greater|less-equals| value-name="newEntity"/> greater-equals|equals|not-equals| do-cache-clear="(true|false)[o]"/> Double|Float|Long|Integer|Date|Time| seq-field-name="shipmentItemSeqId"/> value-name="string [r]" [1] [1] field-name="newEntity.shipmentItemSeqId" do-cache-clear="(true|false)[o]"/> result-name="shipmentItemSeqId"/> End Choice entity-name="string [r]" do-cache-clear="(true|false)[o]"/> [1] [1] End Choice EntityValueOperations env-name="newEntity.shipmentId"/> map-name="string [o]"/> Start Choice [1] [1] [1] field-name="newEntity.shipmentId"/> EntityValueOperations/> End Choice value-name="string [r]" set-if-null="(true | false) [o]"/> set-if-null="(true | false) [o]"/> replace="(true | false) [o]" do-cache-clear="(true|false)[o]"/> Start Choice [1] [1] [1] list-name="string [r]" End Choice do-cache-clear="(true|false)[o]"/> page 8 Request & View Definition Copyright © 2004-2007 HOTWAX MEDIA, INC. Request & View Request & View Example
[Root Element] [from ofbiz/applications/product/webapp/catalog/WEB-INF/controller.xml] [0..1] [0..1] xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/site-conf.xsd"> [1] Catalog Module Site Configuration File The Open For Business Project (c) 2001-2004 [1..*] /error/error.jsp [0..1] [0..1] [0..1] [1..*] [1..*] string string string type="(view | request) [o]" class="string [r]"/> [0..*] [0..*] [0..*] Verify a user is logged in. [0..*] edit="(true | false) [o]"> [0..1] [0..1] [0..1] [1..*] auth="(true|false) [o]" direct-request="(true|false) [o]" external-view="(true|false) [o]"/> path="str[o]" invoke="str[o]"/> type="(none | view | request | request-redirect | url) [r]" value="string [o]"/> page="s[o]" type="s[0..1:default]" info="str[o]" encoding="str[o]" content-type="string [o]"> [0..1] Copyright © 2004-2007 HOTWAX MEDIA, INC. Screen Widget page 9
Screen Widget Screen Widget: Visual Widgets Screen Widget: Include Widgets
[Root Element] [Part of Screen Widget] [Part of Screen Widget] [1..*] id="str [o]" style="str [o]"> name="string [r]" [0..*] location="string [o]"> name="string [r]"> [1..*] [1] src="string [o]" id="str [o]" name="string [o]"> height="str [o]" border="s [o]" [0..*] See Shared [0..1] url-mode="(ofbiz|content|raw)[o]"/> See Shared [0..1] [1] text="string [o]" id="str [o]" AllWidgets [0..1] style="string [o]"/> name="string [r]"/> text="string [o]" id="str [o]" name="string [r]" [0..*] style="str [o]" target="s [o]" location="string [r]" name="str [o]" prefix="str [o]" share-scope="(true | false) [o]"/> target-window="string [o]" [0..*] url-mode="(intra-app | inter-app | name="string [r]" content | plain) [o]" location="string [r]"/> full-path="(true | false) [o]" secure="(true | false) [o]" name="string [r]" encode="(true | false) [o]"> location="string [o]" [0..1] share-scope="(true | false) [o]"/> content-id="string [r]" location="string [r]" edit-request="string [o]" share-scope="(true | false) [o]"/> edit-container-style="string [0..1:editWrapper]" entry-name="string [r]" xml-escape="(true | false) [o]"/> list-name="string [r]" content-id="s [r]" map-key="s [r]" view-size="string [o]" edit-request="string [o]" paginate-target="string [o]" edit-container-style="string paginate="(true | false) [o]"> [0..1:editWrapper]" [0..*] xml-escape="(true | false) [o]"/>
Screen Widget: Platform Specific Screen Widget Example
[Part of Screen Widget] [from ofbiz/applications/product/widget/catalog/ProductScreens.xml] [0..1] [0..*] location="string [r]"/> location="string [r]"> ${uiLabelMap.${labelTitleProperty}} ${product.internalName} [${productId}] [1..*] text="[${uiLabelMap.ProductProductPage}]" style="buttontext"/> [0..*] ${uiLabelMap.ProductCatalogViewPermissionError} page 10 Form Widget 1 of 2 Copyright © 2004-2007 HOTWAX MEDIA, INC. Form Widget Form Widget Example
[Root Element] [from ofbiz/applications/product/webapp/catalog/product/ProductForms.xml] [1..*] xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-form.xsd"> paginate-size-field="str [o]" target="string [o]"/> [0..*] Copyright © 2004-2007 HOTWAX MEDIA, INC. Form Widget 2 of 2 page 11
Form Widget: Fields Form Widget: Field Types 2 of 2 Form Widget: Field Sub-elements [Part of Form Widget] [Part of Form Widget] [Part of Form Widget] allow-empty="(true|false) [o]" name="string [r]" current="(first-in-list|selected) operator="(less|greater|less-equals | [o]" greater-equals|equals|not-equals|in| no-current-selected-key="s[o]" between|like) [o]" current-description="str [o]"> ignore-if-null="(true|false) [o]" Start Choice [0..*] ignore-if-empty="(true|false) [o]" [1] env-name="string [o]" [1] value="string [o]"/> [1] End Choice entity-name="string [r]" [0..1] key-field-name="string [o]" description="string [r]" size="posInteger [0..1:25]" filter-by-date="(true|false|by-name) maxlength="posInteger [o]" [o]"> default-value="string [o]"> [0..*] [0..1] [0..*] also-hidden="(true | false) [o]" field-name="string [o]" target-window="string [o]"/> key="string [r]" attribute-name="string [o]" entry-name="string [o]" border="nonNegInteger [0..1:0]" content | plain) [o]" tooltip="string [o]" [0..1] target="string [r]" title-area-style="string [o]" description="string [o]" widget-area-style="string [o]" title-style="string [o]" target-form-name="string [r]" widget-style="string [o]" size="posInteger [0..1:25]" tooltip-style="string [o]" maxlength="posInteger [o]" position="posInteger [0..1:1]" default-value="string [o]"> red-when="(never | before-now | [0..1] after-now | by-name) [o]" use-when="string [o]" separate-column="(true|false) [o]" [0..1] required-field="(true|false) [o]" required-field-style="string [o]" [0..1] no-current-selected-key="[o]"> Start Choice [0..*] [1] [1] [1] Form Widget: Field Types 1 of 2 End Choice [Part of Form Widget] default-value="string [o]"> [0..1] type="(timestamp|date|time) [o]" default-value="string [o]"/> currency="string [o]"/> description="str[0..1:${description}]" [0..1] also-hidden="(true|false) [o]" cache="(true|false) [o]"> [0..1] cols="positiveInteger [0..1:60]" rows="positiveInteger [0..1:3]" default-value="string [o]"/> [0..1] page 12 Menu & Tree Widgets Copyright © 2004-2007 HOTWAX MEDIA, INC.
Menu Widget Tree Widget Tree Widget: Node
[Root Element] [Root Element] [1..*] [1..*] wrap-style="string [o]" render-style="(simple | follow-trail
tooltip="string [o]" collapse) [o]" See Shared [0..1] default-entity-name="string [o]" default-wrap-style="string [o]" Start Choice [0..1] default-title-style="string expand-collapse-request="str [o]" See Shared [1] [0..1:tabButton]" trail-name="string [o]" See Shared [1] default-widget-style="string [o]" open-depth="string [0..1:0]" End Choice default-tooltip-style="string [o]" post-trail-open-depth="str [0..1:0]" Start Choice [0..1] default-selected-style="str force-child-check="(true|false)[o]" [1] [0..1:tabButtonSelected]" entity-name="string [o]"> [1] orientation="(vertical | horizontal) [1..*] See Shared [1] [o]" End Choice extends="string [o]" [0..*] extends-resource="string [o]" location="string [r]" default-menu-item-name="str [o]" share-scope="(true | false) [o]"/> default-associated-content-id="string See Shared [1] default-hide-if-selected="(true | See Shared [1] false) [o]" See Shared [1] menu-width="string [o]" End Choice default-cell-width="string [o]" [0..*] default-disabled-title-style="string [o]" selected-menuitem-context-field- Menu Widget Example name="string [0..1:currentMenuItemName]" menu-container-style="string [from ofbiz/applications/content/webapp/content/content/ContentMenus.xml] [0..1:tabContainer]"> fill-style="string [o]" See Shared [0..1] default-associated-content-id="${userLogin.userLoginId}" [0..*] selected-menuitem-context-field-name="currentMenuItemName"> name="str [r]" title="str [o]" tooltip="string [o]"
title-style="string [o]" widget-style="string [o]" align-style="string [o]"
tooltip-style="string [o]" selected-style="string [o]" position="string [0..1:1]" associated-content-id="string [o]"
hide-if-selected="string [o]" cell-width="string [o]" disable-if-empty="string [o]" disabled-title-style="string [o]" target-window="string [o]" sub-menu="string [o]"> default-align="(right | left) [o]"
See Shared [0..1]
See Shared [0..1] Tree Widget Example
See Shared [0..1]
[0..*] [from ofbiz/applications/accounting/widget/AccountingTrees.xml]
disabled-style="string [o]"> [1] [Exception from Shared] target="GlAccountNavigate?glAccountId=${glAccountId}&trail=${currentNodeTrailPiped}" text="${glAccountId} ${accountName} ${postedBalance}"/> Copyright © 2004-2007 HOTWAX MEDIA, INC. Shared Elements page 13 Conditions Actions - General Actions - Entity
entity-name="string [r]" use-cache="(true | false) [o]" filter-by-date="(true|false|by-name) [o]" result-set-type="(forward|scroll) [o]" list-name="string [r]"> [1..*] [1] [0..*] [0..*] Start Choice [0..1] [1] [1] [1..*] [1] [0..*] End Choice [1..*] value-name="string [r]" entity-name="string [r]" relation-name="string [r]" use-cache="(true | false) [o]" [1..*] use-cache="(true | false) [o]" filter-by-date="(true|false|by-name) to-value-name="string [r]"/> [o]" [1] value-name="string [r]" delegator-name="string [o]" relation-name="string [r]" result-set-type="(forward|scroll) action="string [o]"/> use-cache="(true | false) [o]" Start Choice [0..1] [1] entity-name="string [r]" [1] entity-id="string [r]" resource="string [r]" [1] target-operation="string [r]"/> map-name="string [r]" End Choice [0..1] field-name="string [r]" [0..*] [0..*] method="string [r]" resource="string [r]" Start Choice [0..1] class="string property="string [r]" [1] [1] [0..1:org.ofbiz.base.util.UtilValidate]"/> field="string [r]" [1] operator="(less|greater|less-equals| arg-list-name="string [o]"/> value-name="string [o]" value="string [r]" Double|Float|Long|Integer|Date|Time| result-map-name="string [o]" [0..*] Timestamp|Boolean|Object) [o]" auto-field-map="(true|false) [o]" [0..*] format="string [o]"/> result-map-list-name="string [o]"> [0..*] operator="(less|greater|less-equals| operator="(less|greater|less-equals| Timestamp|Boolean||Object) [o]" from-scope="(screen | user | application) [o]" [Screen Widget Only] combine="(and|or) [o]"> [1] expr="string [r]"/> type="(PlainString|String|BigDecimal| [1] [1] field-name="string [r]"/> Timestamp|Boolean|Object) [o]"/> End Choice Link/Image Flexible Syntax style="str [o]" name="str [o]" variable: value="${productId}" Start Choice [1..*] target="str[o]" prefix="str[o]" - "." Used to access a sub-value, or a [1] target-window="string [o]" value in a Map: product.productId [1] url-mode="(intra-app | inter-app | - "[]" Used to access a member of a [1] content | plain) [o]" List: products[0]; for put replaces End Choice full-path="(true | false) [o]" the value, unless you use a + before secure="(true | false) [o]" the number: products[+0] is before 0, beginning of List; to put at end of start="nonNegativeInteger [r]" [0..1] List leave empty: products[]; size="nonNegativeInteger [r]"/> - env-name="product.productId" width="str[o]" height="str[o]" border="string [o]" url-mode="(ofbiz|content|raw) [o]" id="string [o]"/> page 14 Entity Configuration Copyright © 2004-2007 HOTWAX MEDIA, INC.
Entity Field Type Entity Config 2 of 3 Entity Config 3 of 3
[0..*] [0..1] helper-class="string [r]" [0..1] field-type-name="string [r]" use-schemas="(true|false) [o]" sql-type="string [r]" jndi-name="string [r]"/> add-missing-on-start="(true | false) [0..*] jndi-server-name="string [r]" use-pk-constraint-names="(true | false) [o]" class="string entity-model-reader="string [r]" nonNegativeInteger [0..1:30]" entity-group-reader="string [r]" use-proxy-cursor="(true|false)[o]" entity-eca-reader="string [o]" proxy-cursor-name="str[0..1:p_cursor]" distributed-cache-clear- result-fetch-size="nonNegInt[0..1:0]" Entity Field Type Example enabled=" (true | false) [o]" use-foreign-keys="(true|false)[o]" distributed-cache-clear-class- use-foreign-key-indices="(true | [ofbiz/framework/entity/fieldtype/*.xml] name="string false) [o]" distributed-cache-clear-user-login- [o]" sequenced-id-prefix="string [o]"> false) [o]" [1..*] fk-style="(name_constraint | name_fk) [o]" false) [o]" use-indices="(true | false) [o]" Entity Config 1 of 3 [0..*] check-indices-on-start="(true | false) [o]" join-style="(ansi | ansi-no- [1..*] [0..*] parenthesis | theta-oracle | theta- [1] mssql) [o]" [1..*] [1..*] location="string [o]"> always-use-constraint-keyword="(true [0..*] [0..*] | false) [o]"> [0..*] [0..*] [1..*] [0..*] [1..*] [0..*] Start Choice [1] [0..1] [0..1] [0..1] class="string [r]" loader="str [r]" location="str [r]"/> End Choice prepend-env="string [o]" prefix="string [o]"/> location="string [r]"/> pool-maxsize="nonNegInt [0..1:50]" pool-sleeptime="nNI [0..1:300000]" pool-lifetime="nNI [0..1:600000]" pool-deadlock-maxwait="[0..1:300000]" pool-deadlock-retrywait="[0..1:10000]" pool-jdbc-test-stmt="string [o]" pool-xa-wrapper-class="str [<--change datasource here] [0..1:org.enhydra.jdbc.standard.StandardXADataSource]"/> jndi-server-name="string [r]" isolation-level="(None| ReadCommitted|ReadUncommitted| RepeatableRead|Serializable) [o]"/> isolation-level="(None| ReadCommitted|ReadUncommitted| jdbc-uri="jdbc:derby:ofbiz;create=true" jdbc-username="ofbiz" jdbc-password="ofbiz" isolation-level="ReadCommitted" pool-minsize="2" pool-maxsize="20"/> Copyright © 2004-2007 HOTWAX MEDIA, INC. Service Configuration page 15
Service Config Service Config Example
[ofbiz/framework/service/config/serviceengine.xml] [1] [1] [0..*] xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/service-config.xsd"> [0..*] [0..*] ttl="18000000" wait-millis="750" jobs="10" min-threads="5" max-threads="15" [0..*] poll-enabled="true" poll-db-millis="20000"> [0..*] [0..*] [0..*] [0..*] purge-job-days="nonNegInt [0..1:30]" failed-retry-min="nonNegInt[0..1:30]" ttl="nonNegativeInteger [r]" wait-millis="nonNegativeInteger [r]" jobs="nonNegativeInteger [r]" min-threads="nonNegativeInteger [r]" max-threads="nonNegativeInteger [r]" poll-enabled="(true | false) [o]" poll-db-millis="nonNegInteger [r]"> [0..*] location="http://localhost:8080/webtools/control/httpService"/> location="http://localhost:8080/webtools/control/httpService"/> runtime-data-id="string [o]" run-in-pool="string [o]"/> location="string [r]"/> class="string [r]" prepend-env="string [o]" prefix="string [o]"/> location="string [r]"/> send-mode="(none | all | first- available | random | round-robin | least-load) [o]"> [1..*] jndi-server-name="string [r]" topic-queue="string [r]" type="(topic | queue) [r]" username="string [o]" password="string [o]" Mail-CA (MCA) Rules client-id="string [o]" listen="(true | false) [o]" [Root Element] listener-class="string [o]"/> [1..*] Start Choice [0..*] [1] [1] [1] End Choice [1..*] page 16 Other Configuration Copyright © 2004-2007 HOTWAX MEDIA, INC.
JNDI Servers JNDI Servers Example
[0..*] xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/jndi-config.xsd"> initial-context-factory="str [o]" url-pkg-prefixes="string [o]" security-principal="string [o]" security-credentials="str [o]"/> Component Load OFBiz Component
[1] [0..*] cache.file.store=data/utilcache [1] [0..*] default.maxSize=0 End Choice [0..*] default.expireTime=0 [0..*] default.useSoftReference=false [0..*] # in milliseconds, 0 means no limit component-name="string [o]" [0..*] # 30 min = 1800000 component-location="string [r]"/> my.cache.name.maxSize=1800000 parent-directory="string [r]"/> [/framework/base/config/component-load.xml] location="string [r]"/> force.http.host=dynamic.ofbiz.org loader="str [r]" location="str [r]" content.url.prefix.standard=http://akamai... cookie.domain=ofbiz.org {ofbiz.home}/hot-deploy"/> location="string [r]" type="(model|group|eca) [r]"/> Debug Properties # Using Avalon Exception Util title="str [o]" server="str [r]" # These top level switches are used before [1..*] calling Log4J , or if Log4J is not used location="string [r]" print.verbose=ftrue mount-point="string [o]" print.timing=true base-permission="string [o]"> print.important=true [0..*] [0..*] print.warning=true [0..*] print.error=true print.fatal=true value="string [o]"> # From here out standard log4j settings, see log4j documentation for more information [0..*] [0..1] value="string [r]"/> # Options: ALL, INFO, WARN, ERROR log4j.logger.NoModule=ALL Mixed log4j.logger.org.ofbiz=ALL log4j.logger.org.ofbiz.minerva=WARN Containers Example
Security XML [ofbiz/framework/base/config/ofbiz-containers.xml] class="com.mycompany.security.MySecurity"/>
Security Properties OFBiz Component Example security.context=default password.length.min=5 [ofbiz/applications/product/ofbiz-containers.xml] max.failed.logins=3 # if 0, then indefinate login.disable.minutes=30 login.disable.global.logout=false store.login.history.on.service.auth=false password.encrypt=true # options: SHA, MD5, etc password.accept.encrypted.and.plain=false username.lowercase=false password.lowercase=false Copyright © 2004-2007 HOTWAX MEDIA, INC. View-Request Flow Examples page 17
Very Simple Example Common Error Pattern Example
This is a main orderstatus request-map [no event] error form submission
This is a resonse : name success addordertocart [ShoppingCartEvents. addToCartFromOrder] This is a success view-map main
showcart
Multiplexer Style Flow Example Flow for User Process Example
ordercomplete
setBasicInfo error multiple successful requests enterShippingAddress processpayment
enterCreditCard success
finalizeOrder checkBlacklist [CheckOutEvents. failed finalizeOrderEntry] sales_order or work_order
customer processorder custsetting link shipping shipsetting checkoutreview
options success optionsetting validatePaymentMethods payment billsetting success
paysplit calcTax checkoutpayment success sales calcShipping
error finalizeOrderError [CheckOutEvents. failedBlacklist finalizeOrderEntryError]
checkouterror page 18 Artifact Reference Diagram Copyright © 2004-2007 HOTWAX MEDIA, INC. nition iew Actions .xml: response type .xml: Servlet Container web.xml: Control Servlet: V Screen Section Screen Section Widgets Control Servlet: Request Screen Widget: Defi Screen Section Condition nition controller controller *Screens.xml: *Forms.xml: Form Widget: Defi specifi eb Browser Cient W CS: Request: Event http://host/app/control/request CS: Request: Response event return value is response name when no event default is "success" emplate T
BSH Script FTL Rule nition nition guration triggered action Database entityengine.xml: secas*.xml: Entity Engine: Defi services*.xml: MiniLang: simple-method Service Engine: Defi entitymodel*.xml: Service Engine: ECA Entity Engine: Confi *Services.xml: triggers event Java Method