View Element Reference

< field  />

This element specifies a column of data within the enclosing control. When it is a direct child of the <dataSource> element, the field can be viewed as forming the retrieving query’s SELECT clause. When the element is a direct child of a <panel> element, the field indicate which of the retrieved data is available in the user interface. A <field> element may be used in a panel context to present controls such as buttons via the controlType="button" attribute, verbatim HTML via an enclosed <html> element (See "Creating Custom HTML Form Fields"), or to place hidden data into the page for use by JavaScript code.

   <table name="wr" />
   <field table="wr" name="rm_id"/>
   <field table="wr" name="description"/>

<panel type="form" columns="2">
    <field table="wr" name="wr_id"/>
    <field id="user_email" controlType="text" value="${}">
        <title translatable="false">${} Email</title>
    <field table="wr" name="status" readOnly="${!user.isMemberOfGroup('FIM')}"/>

<panel type="grid">
    <field controlType="button" enabled="${record['project.status'] == 'CREATED'}" onclick="requestProject">
        <title translatable="true">Request</title>
    <field table="project" name="project_id" controlType="link">
        <command type="showPanel" panelId="project_details">

Note: Setting the default value for an enumerated field in a view using <field value=”xxx”> will not work UNLESS the default value for the field is the same as the first value in the enumeration list. Thus, you must re-order the values in an enumeration list to make the default value the first value in the list.

Enclosing Element: This tag is a direct child of a <dataSource> or <panel> element.
Encloses: When used within the <panel> element, this tag may enclose <title>, <action>, and <command> child elements.