Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Displays a properly formatted localized string from a field in the entity in the specified attribute. The prefix and suffix attribute contents will print before/after if the field is not null or empty.

Attribute NameRequired?ExprVal?Description
attributeYNThe name of the attribute that contains the entity that contains the field to print.
fieldYNThe name of the field to print in the named entity.
typeNNOptionally specifies the type of the field to print. Can be "currency" or any of the Java field types. If not specified the tag will automatically determine the Java type AND get additional type information from the Entity Engine field definition for this field. With that information currency will automatically be formatted as currency.
defaultNYThe default value to print if the specified field is not found.
prefixNNIf the resulting message is not empty this string will be printed before the field value.
suffixNNIf the resulting message is not empty this string will be printed after the field value.

ofbiz:inputvalue

Outputs a string for an input box from either an entity field or a request parameter. Decides which to use by checking to see if the entityAttr exists and using the specified field if it does.

If the Boolean object referred to by the tryEntityAttr attribute is false, always tries to use the request parameter and ignores the entity field.

Formatting is done with a very simple toString.

The Object found by looking up the context attribute with the name specified by entityAttr can be either a GenericValue object, or any implementation of the Map interface.

Attribute NameRequired?ExprVal?Description
fieldYNThe name of the field to print in the named entity.
paramNNThe name of the URL parameter that corresponds to this value. If null or empty param will be the same as field.
entityAttrYNThe name of the attribute that contains the entity that contains the field to print.
tryEntityAttrYNThe name of an context attribute that contains a Boolean which specifies whether or not to even try using the named entity. If false the request parameter value will be used, if true the entity field value will be used.
defaultNYThe default value to print if the specified entity field or parameter is not found.
fullattrsNNIf fullattrs is set to true then [name="{param}" value="{value}"] will be output instead of just [value]. By default fullattrs is false.

Internationalization Tags

ofbiz:i18nBundle

Used to specify and load an internationalized message bundle. The bundle will be referred to by the id attribute value if specified. By default all messages will be retreived from the bundle specified by their parent i18nBundle tag, in other words the i18nMessage tags will be nested inside the bundle tag.

Attribute NameRequired?ExprVal?Description
idNYAn ID that can be used later in the bundleId attribute of the i18nMessage tag to refer to this bundle.
baseNameYYThe resource base name of the message bundle. Generally the name of a .properties file, but specified without the .properties extension.

ofbiz:i18nMessage

Prints an internationalized message from the parent or specified bundle identified by the given key. Accepts message arguments using nested i18nMessageArgument tags.

Attribute NameRequired?ExprVal?Description
keyYYThe key or ID of the message within the bundle.
bundleIdNYThe ID of the bundle to get the message from. If not specified looks for the parent i18nBundle tag and uses that bundle.

ofbiz:i18nMessageArgument

Specifies an agrument for the parent i18nMessage tag. The arguments will be numbered in the order they are specified.

Attribute NameRequired?ExprVal?Description
valueYYThe value of the argument to insert into the message. Can use the <%=...%> syntax to use Java method context variables.

Service Tags