## Web Component Framework Tags (en)

Web Component Framework (WCF) tag library. A collection of reuseable JSP tags like tree, table, HTML form and XSL rendering. WCF uses the BeanUtils package as its expression language EL.

### Content

- calendar
- catedit
- charset
- confirm
- connect
- contentType
- evenOdd
- form
- formbutton
- ifRole
- imgbutton
- include
- linkAction
- linkParam
- logform
- pageStack
- paramLink
- paramLinkGroup
- paramPool
- paramSql
- paramSqlMapping
- pushbutton
- pushParam
- render
- renderParam
- scriptbutton
- scroller
- separator
- setParam
- sqlTable
- sqlTableOrderBy
- sqlTablePageNavigations
- sqlTableSortButton
- statusline
- table
- tablePropertiesForm
- token
- toolbar
- tree
- wizard

### calendar

Body Content | tagdependent
Description | Creates required javascript-modifications for the calendar-control in a wcf-form

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---

#### Example

    <wcf:calendar/>

### catedit

Body Content | EMPTY
Description | Creates a categoy editor component. This component does not produce visible output directly, it must be rendered via the WCF `render` tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
model | false | String | true | EL expression that resolves to a com.tonbeller.wcf.catedit.CategoryModel

#### Example

### charset

Body Content | empty
Description | prints the character encoding configured in the charset filter.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---

#### Example

    <meta http-equiv=Content-Type content="text/html; charset=<wcf:charset/>">

### confirm

Body Content | tagdependent
Description | A confirmation dialog. Used by other Components, not stand-alone

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | false | String | true | Name of the session attribute created by this tag. Defaults to "confirmForm"
xmlUri | false | String | true | URI of the form XML. Defaults to "/WEB-INF/wcf/confirm.xml"
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.

#### Example

    <wcf:confirm id="confirmForm"  xmlUri="/WEB-INF/wcf/confirm.xml" visible="false"/>

### connect

Body Content | EMPTY
Description | Deprecated. Use "validate" attribute of WCF components instead, which is more natural and will be sufficient most of the time. Connects different WCF Components. This makes the buttons of one form act on another form too. If a tree and a form are connected for example, pressing the OK button in the form will make the tree read its selection.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
form1 | true | String | true | Form 1
form2 | true | String | true | Form 2

#### Example

    <jsp:useBean id="testbean" class="com.tonbeller.wcf.form.TestBean" scope="session" />
    <wcf:form id="formcomp" xmlUri="/WEB-INF/formdemo.xml" model="#{testbean}"/>
    <wcf:tree id="tree01"/>
    <wcf:connect form1="#{formcomp}" form2="#{tree01}"/>

    <form action="formdemo.jsp" method="POST" id="form01">
      <wcf:render ref="#{formcomp}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>
      <wcf:render ref="#{tree01}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true">
        <wcf:renderParam name="border" value="1"/>
      </wcf:render>
    </form>

### contentType

Body Content | empty
Description | sets the content-type of the response and appends ";charset=xxx" where xxx is the charset that is configured in the CharsetFilter.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
type | true | String | true | mime type, e.g. "text/html"

#### Example

    <wcf:contentType type="text/html"/>
    will set the content-type to
      "text/hmtl; charset=UTF-8"
    if UTF-8 is configured in the CharsetFilter.

### evenOdd

Body Content | empty
Description | appends "-even" or "-odd" to its class attribute depending on the current loop status.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
clazz | false | String | true | Name of the CSS class prefix
even | false | String | true | if clazz == null: string printed on even rows
odd | false | String | true | if clazz == null: string printed on odd rows

#### Example

          <style>
            td.mytable-even { ... }
            td.mytable-odd { ... }
          </style>
          ...
          <c:forEach ...>
            <td class="<wcf:evenOdd clazz='mytable'/>">
            ...
            <!-- produces the same result as above -->
            <td class="<wcf:evenOdd even='mytable-even' odd='mytable-odd'/>">
          </c:forEach>

### form

Body Content | tagdependent
Description | Creates an HTML form that is defined by an XML file. This component does not produce visible output directly, it must be rendered via the WCF `render` tag. Structure of the XML File
    <xform style="twocolumn">
      <title value="Form Demo">
        <imgButton label="Cancel" .../>
      </title>
      <textField type="int" modelReference="intValue" label="Count" .../>
      <checkBox modelReference="nestedBean.boolValue" label="Check Me" .../>
    </xform>
creates a Form with a title, a close button in the upper right corner, a text input field and a check box. Data binding The form component is associated with a JavaBean. The input elements of the HTML form are bound to the bean properties via the `modelReference` attribute. The bean in the above example has an int property with the name `intValue` that can be modified by the `<textField ...>`. As shown in the check box example, the `modelReference` may contain an EL (JSTL Expression Language) expression. Valid type attribute values: boolean string date int posint - integer >= 0 double email Element IDs The names of the HTTP parameters are generated by random. If this is not desired, you can use the `id` attribute.
    <xform style="twocolumn">
      <textField id="field1" .../>
      <checkBox id="$id.field2" .../>
    </xform>
creates two HTML input fields, the first with `name="field1"`, the second with `name="myform.field2"`, where `myform` is the `id` attribute of this form tag. Form Elements The elements are rendered via `/WEB-INF/wcf/controls.xsl`. Please look there for details. label textField textArea password checkBox radioButton listBox1 listBoxN imgButton button Use `disabled="true"` to make elements read-only. Use `required="true"` if user input is required. Form Buttons Buttons must have either a "handler" or an "actionReference" attribute. "handler" specifies a class that implements the NodeHandler interface which may handle requests, change button label etc. Use of "actionReference" is much easier and recommended, "actionReference" is the name of a method in the bean, that takes a single argument of type RequestContext. This method is invoked when the user presses the button. action="revert" - calls revert() on the `Form`, i.e. reads the bean properties and formats the data for presentation. action="validate" - calls validate() on the `Form`, i.e. parses user input and writes the values to the bean properties forward="/some/page.jsp" - if validation succeeds forwards to another page. Paramers make sense here. hide="true" - if validation succeeds hides the component successAttr="name-of-request-attribute" - if validation succeeds a request attribute with value `true` is created. handler="fully.qualified.ClassName" - name of a class that implements NodeHandler and is responsible for this node actionReference="methodName" the name of a method that takes an RequestContext as its argument. Bookmark support see com.tonbeller.wcf.bookmark. The content of the editable bean properties can be collected and restored via the Bookmarkable interface. To enable this, the tag attribute "bookmarkable" must be set to true. Examples See working examples in /WEB-INF

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
xmlUri | true | String | true | Path of an XML config file that describes the HTML form, relative to the application context. There may be different form descriptions for different Locales, the stylesheet will be choosen upon similar rules to ResourceBundle. Example: `xmlUri='/WEB-INF/myform.xml'`. For a german Browser WCF will try to load `/WEB-INF/myform_de.xml`. If this fails, it will load `/WEB-INF/myform.xml`.
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
bundle | false | String | true | ResourceBundle for i18n replacements. If a text- or attributenode in xml starts with 'fmt:' the remaining text will be interpreted as key into the resource bundle.
model | true | String | true | EL expression that resolves to the bean that shall be edited
bookmarkable | false | boolean | true | true|false indicating whether this form shall save its beans state. Default is false
finishButton | false | boolean | true | true|false indicating whether this form supports finish if it is not the last page of a wizard. Default is true

#### Example

    <jsp:useBean id="testbean" class="com.tonbeller.wcf.form.TestBean" scope="session" />
    <wcf:form id="formcomp" xmlUri="/WEB-INF/formdemo.xml" model="#{testbean}"/>
    <form action="formdemo.jsp" method="POST" id="form01">
      <wcf:render ref="#{formcomp}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>
    </form>

#### Example

    <xform style="twocolumn">
      <title value="fmt:fetch.title.from.resource.bundle">
        <imgButton id="cancel" src="wcf/form/cancel.png" action="revert" label="Cancel" forward="tabledemo.jsp" handler="com.tonbeller.wcf.form.ButtonHandler"/>
      </title>

      <!-- Text control -->
      <textField id="string" type="string" modelReference="stringValue" label="Text:"    value="" title="please enter some text"/>
      <textField id="int"    type="int"    modelReference="intValue"    label="Integer:" value="" title="please enter an integer"/>
      <textField id="double" type="double" modelReference="doubleValue" label="Decimal number:"    value="" title="please enter a decimal number"/>
      <textField id="date"   type="date"   modelReference="dateValue"   label="Date:"    value="" title="please enter a date"/>
      <textField id="dateTime" type="dateTime"   modelReference="dateTimeValue"   label="Date/Time:"    value="" title="please enter a date/time"/>

      <!-- Password control -->
      <password id="password" type="string" modelReference="password" label="Password:" value=""/>

      <!-- Text area -->
      <textArea id="textarea" rows="7" cols="40" type="string" modelReference="textArea" label="Text area:" value="This is a text area"/>

      <checkBox id="checkbox1" modelReference="checkBox1" label="check box 1"/>
      <checkBox id="checkbox2" modelReference="checkBox2" label="check box 2"/>

      <!-- ListBox, single selection -->
      <listBox1 id="list1" type="int" modelReference="list1" label="List, single selection:">
        <listItem id="list1.1" value="1" label="list item 1"/>
        <listItem id="list1.2" value="2" label="list item 2"/>
        <listItem id="list1.3" value="3" label="list item 3"/>
        <listItem id="list1.4" value="4" label="list item 4"/>
      </listBox1>

      <!-- ListBox, multiple selection -->
      <listBoxN id="listN" type="int" modelReference="listN" label="List, multiple selection:">
        <listItem id="listN.1" value="1" label="list item 1"/>
        <listItem id="listN.2" value="2" label="list item 2"/>
        <listItem id="listN.3" value="3" label="list item 3"/>
        <listItem id="listN.4" value="4" label="list item 4"/>
      </listBoxN>

      <!-- ListBox, single selection, dynamic item list -->
      <listBox1 id="listbox" type="int" modelReference="dynList" label="List, dynamic content:" handler="com.tonbeller.wcf.form.TestItems"/>

      <label label="This is a label" value="value attribute goes here"/>
      <label label="Dynamic label (content from TextArea)" modelReference="textArea"/>

      <radioButton id="radio1" modelReference="radioButton1" group-id="group1" label="radio button 1"/>
      <radioButton id="radio2" modelReference="radioButton2" group-id="group1" label="radio button 2"/>

      <buttons>
        <button id="cancel" action="revert" label="Cancel" forward="tabledemo.jsp" handler="com.tonbeller.wcf.form.ButtonHandler"/>
        <button id="revert" action="revert" label="Revert" handler="com.tonbeller.wcf.form.ButtonHandler"/>
        <button id="validate" action="validate" label="Validate" handler="com.tonbeller.wcf.form.ButtonHandler"/>
        <button id="ok" action="validate" label="OK" forward="tabledemo.jsp" handler="com.tonbeller.wcf.form.ButtonHandler"/>
      </buttons>

    </xform>

### formbutton

Body Content | empty
Description | Submit button for a WCF form

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | ID of the button. The button may be accessed in EL as `TOOLBAR_ID.buttons.BUTTON_ID`
img | true | String | true | Name of the image to use. The generated URLs are `APPCONTEXT/wcf/toolbar/IMG-up.png` and `APPCONTEXT/wcf/toolbar/IMG-down.png`
radioGroup | false | String | true | Name of a radio group. At most one button of a group may be pressed.
tooltip | false | String | true | name of the tooltip in the toolbars ResourceBundle
visibleRef | false | String | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The button will be visible only, if that property is true
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
action | false | String | true | either "revert" or "validate"
forward | true | String | true | URI of the JSP to display if validation succeeds
form | true | String | true | EL expression that evaluates to the form to validate

#### Example

    <jsp:useBean id="testbean" class="com.tonbeller.wcf.form.TestBean" scope="session" />
    <wcf:form id="formcomp" xmlUri="/WEB-INF/formdemo.xml" model="#{testbean}"/>
    <wcf:toolbar id="toolbar01" bundle="com.tonbeller.wcf.toolbar.resources">
      <wcf:formbutton ... action="validate" forward="newpage.jsp" form="#{formcomp.form}"/>
    </wcf:toolbar>

### ifRole

Body Content | JSP
Description | A conditional tag that tests if the user holds some role.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.

#### Example

    <wcf:ifRole role="tomcat">
      <h1>Hi, Tomcat</h1>
    </wcf:ifRole>

### imgbutton

Body Content | empty
Description | A toolbar button with a static hyperlink

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | ID of the button. The button may be accessed in EL as `TOOLBAR_ID.buttons.BUTTON_ID`
img | true | String | true | Name of the image to use. The generated URLs are `APPCONTEXT/wcf/toolbar/IMG-up.png` and `APPCONTEXT/wcf/toolbar/IMG-down.png`
tooltip | false | String | true | name of the tooltip in the toolbars ResourceBundle
visibleRef | false | String | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The button will be visible only, if that property is true
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
href | true | String | true | the `href` attribute of the hyperlink. "{0}" is replaced with the context, "{1}" with a random string.
target | false | String | true | the `target` attribute of the hyperlink

#### Example

    <wcf:imgbutton  id="button5" img="button" href="/some/path" visibleRef="#{toolbean.checkBox1}"/>

### include

Body Content | EMPTY
Description | Includes a JSP page if a certain HTTP parameter is present. The name of the file is prefix + paremeter + suffix. For example, if `prefix="/WEB-INF/mypages/"`, `httpParam="page"` and `suffix=".jsp"`, then the URL `?page=page20` will include the file `/WEB-INF/mypages/page20.jsp`. If the parameter `page` is not present in the HTTP request, no page will be included.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
httpParam | true | String | true | name of the HTTP parameter
prefix | false | String | true | Prefix
suffix | false | String | true | Suffix

#### Example

    <wcf:include id="include01" httpParam="query" prefix="/WEB-INF/queries/" suffix=".jsp"/>

### linkAction

Body Content | JSP
Description | when the user clicks on the link, a method in the target bean is invoked.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
target | true | String | true | EL that evaluates to the target bean
method | true | String | true | name of the method. The method must have the signature `void methodName(RequestContext context) throws Exception;`

#### Example

          <paramLinkGroup id="myParam">
            ...
            <wcf:paramLink page="/customer.jsp">
              click here!!
              <wcf:linkParam
                name="CUSTOMERID"
                sqlValue="${result.customerId}"/>
              <wcf:linkAction
                target="${customerViewHelper}"
                method="onClick"/>
            </wcf:paramLink>
            ...
          </paramLinkGroup>

### linkParam

Body Content | JSP
Description | adds another SessionParam to a paramLink tag. Must be nested inside a paramLink tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
paramName | true | String | true | Name of the SessionParam
displayName | false | String | true | visible name of the SessionParam
displayValue | false | String | true | visible value of the SessionParam
sqlValue | false | String | true | SQL value of the SessionParam
mdxValue | false | String | true | MDX value of the SessionParam
textValue | false | String | true | Text constant as value of the SessionParam

#### Example

          <paramLinkGroup id="myParam">
            ...
            <!-- single parameter -->
            <wcf:paramLink
              page="/customer.jsp"
              name="CUSTOMERID"
              sqlValue="${result.customerId}">
              click here!!
            </wcf:paramLink>
            ...
            <!-- multiple parameters -->
            <wcf:paramLink page="/customer.jsp">
              click here!!
              <wcf:linkParam
                name="CUSTOMERID"
                sqlValue="${result.customerId}"/>
              <wcf:linkParam
                name="SCOREID"
                sqlValue="${result.scoreId}"/>
            </wcf:paramLink>
            ...
          </paramLinkGroup>

### logform

Body Content | JSP
Description | An HTML form that allows to set logging options for Apache log4j

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
xmlUri | true | String | true | Path of an XML config file that describes the HTML form, relative to the application context. There may be different form descriptions for different Locales, the stylesheet will be choosen upon similar rules to ResourceBundle. Example: `xmlUri='/WEB-INF/myform.xml'`. For a german Browser WCF will try to load `/WEB-INF/myform_de.xml`. If this fails, it will load `/WEB-INF/myform.xml`.
logDir | true | String | true | Name of a directory relative to `user.home` or - in case of missing write permissions - relative to `java.io.tmpdir`. This directory contains the configuration files for log4j, default configuration files are created.

#### Example

    <wcf:logform id="logdemo" xmlUri="/WEB-INF/logdemo.xml" logDir=".wcf/logging"/>
    <form action="logdemo.jsp" method="POST" id="logform">
      <wcf:render ref="logdemo" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>
    </form>

### pageStack

Body Content | JSP
Description | shows the current position to the user, e.g. you are here: Page 1 : Page 2

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
var | false | String | true | Name of the loop variable which is of type com.tonbeller.wcf.pagestack.Page
page | false | String | true | url of the current page
pageId | false | String | true | identifies this entry. If not set, the page attribute is taken. This way one JSP can be replaced with another.
title | false | String | true | title of the current page
key | false | String | true | fetches the title for this page from the current JSTL resource bundle (same as JSTL's <fmt:message../> for example)
clear | false | boolean | true | clears the stack before adding this page
varStatus | false | String | true | Name of the JSTL LoopTagStatus Object. See details in JSTL documentation
bundle | false | String | true | ResourceBundle for i18n replacements

#### Example

          <div class="pagestack">
            You are here:
            <wcf:pageStack var="p" varStatus="status" page="thispage.jsp" title="This Page Title">
              <c:if test="${not status.first}">
                &gt;
              </c:if>
              <a href="<c:out value='${p.page}'/>"><c:out value="${p.title}"/></a>
            </wcf:pageStack>
          </div>

### paramLink

Body Content | JSP
Description | Outputs an <a href="..."> hyperlink. Stores a List of SessionParam's and Actions. If the user clicks on the hyperlink, the SessionParam instances will be activated, i.e. they will be set into the SessionParamPool. Then the actions are executed. Finally it forwards to the target page. A single parameter may be specified through attributes of this tag, if multiple parameters are required, nested linkParam tags may be used. The generated URL is "secure" because it contains a random number only. Users can not change it in the browsers location field for example.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
page | false | String | true | target page
target | false | String | true | HTML target base
token | false | boolean | true | Set to "true" to enerate a token into the URL to prevent the user from using the browser's back button. Defaults to "false".
paramName | false | String | true | Name of the SessionParam
displayName | false | String | true | visible name of the SessionParam
displayValue | false | String | true | visible value of the SessionParam
sqlValue | false | String | true | SQL value of the SessionParam
mdxValue | false | String | true | MDX value of the SessionParam
textValue | false | String | true | Text constant as value of the SessionParam

#### Example

          <paramLinkGroup id="myParam">
            ...
            <!-- single parameter -->
            <wcf:paramLink
              page="/customer.jsp"
              target="_blank"
              paramName="CUSTOMERID"
              sqlValue="${result.customerId}">
              click here!!
            </wcf:paramLink>
            ...
            <!-- multiple parameters -->
            <wcf:paramLink page="/customer.jsp">
              click here!!
              <wcf:linkParam
                paramName="CUSTOMERID"
                sqlValue="${result.customerId}"/>
              <wcf:linkParam
                paramName="PRODUCTID"
                sqlValue="${result.productId}"/>
            </wcf:paramLink>

            ...
          </paramLinkGroup>

### paramLinkGroup

Body Content | JSP
Description | groups a set of paramLink tags. When the start tag is executed, the links generated on previous pages are invalidated.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
hideIf | false | String | true | EL expression. If the EL returns true, no links will be rendererd.

#### Example

    <wcf:paramLinkGroup id="mylinks"...>
      <wcf:paramLink .../>
      <wcf:paramLink .../>
    </wcf:paramLinkGroup/>

#### Example

    <wcf:paramLinkGroup id="mylinks" hideIf="#{mybean.printMode}">
      <wcf:paramLink .../>
      <wcf:paramLink .../>
    </wcf:paramLinkGroup/>

### paramPool

Body Content | JSP
Description | ensures the SessionParamPool exists in the session with id="paramPool". Similar to jsp:useBean

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---

#### Example

    <wcf:paramPool/>

### paramSql

Body Content | JSP
Description | outputs SQL syntax for the named session parameter. May contain nested paramSqlMapping tags

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
param | false | String | true | Name of the SessionParam
qname | false | String | true | qualified name of the default column. This is used if parameter expression does not contain its own column id's

#### Example

          <wcf:paramLink
            page="/customer.jsp"
            name="CUSTOMERID"
            sqlValue="${result.customerId}">
            click here!!
          </wcf:paramLink>
          ...
          <sql:query>
            SELECT ...
            FROM CUSTOMERS T1, ...
            WHERE <wcf:paramSql param="CUSTOMERID" qname="T1.CUSTOMER_PK"/>
            AND ...
          </sql:query>

### paramSqlMapping

Body Content | JSP
Description | Maps column IDs from SQL Expressions to column alias names. For example, if a SQL Parameter contains the expression `CUSTOMERID = 123 AND PRODUCTID = 'ABC'`, then in a concrete SQL you may want to generate `T1.CUSTOMER_PK = 123 AND T2.PRODUCT_FK = 'ABC'"`. You can do this by mapping `CUSTOMERID` to `T1.CUSTOMER_PK` and `PRODUCTID` to `T2.PRODUCT_FK`. Complex conditions that need mappings usually are created by application code.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
column | true | String | true | name of the column in the SQL expression
qname | true | String | true | qualified name in the generated SQL

#### Example

          <sql:query>
            SELECT ...
            FROM CUSTOMERS T1, LINE_ITEMS T2, ...
            WHERE
              <wcf:paramSql param="COMPLEX_CONDITION">
                <wcf:paramSqlMapping column="CUSTOMERID" qname="T1.CUSTOMER_PK"/>
                <wcf:paramSqlMapping column="PRODUCTID" qname="T2.PRODUTCT_FK"/>
              </wcf:paramSql>
            AND ...
          </sql:query>

### pushbutton

Body Content | empty
Description | A toolbar button with builtin boolean property `pressed` that reflects its state.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | ID of the button. The button may be accessed in EL as `TOOLBAR_ID.buttons.BUTTON_ID`
img | true | String | true | Name of the image to use. The generated URLs are `APPCONTEXT/wcf/toolbar/IMG-up.png` and `APPCONTEXT/wcf/toolbar/IMG-down.png`
radioGroup | false | String | true | Name of a radio group. At most one button of a group may be pressed.
tooltip | false | String | true | name of the tooltip in the toolbars ResourceBundle
visibleRef | false | String | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The button will be visible only, if that property is true
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
pressed | false | String | true | inital state

#### Example

    <wcf:toolbar id="toolbar01" bundle="com.tonbeller.wcf.toolbar.resources">
      <wcf:pushbutton id="button4" img="button"/>
      ...
    </wcf:toolbar>
    ...
    <c:if test="${toolbar01.buttons.button4.pressed">
      <h1>Button Pressed!!</h1>
    </c:if>

### pushParam

Body Content | JSP
Description | replaces the attributes of a session parameter when the start tag is processed and restores it when the end tag is processed.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
paramName | true | String | true | Name of the SessionParam
displayName | false | String | true | visible name of the SessionParam
displayValue | false | String | true | visible value of the SessionParam
sqlValue | false | String | true | SQL value of the SessionParam
mdxValue | false | String | true | MDX value of the SessionParam
textValue | false | String | true | Text constant as value of the SessionParam

#### Example

          CUSTOMER_ID = 999
          <wcf:pushParam name="CUSTOMER_ID" value="#{bean.myProperty}">
            render page as if CUSTOMER_ID was bean.getMyProperty()
          </wcf:pushParam>
          now is back to CUSTOMER_ID = 999

### render

Body Content | JSP
Description | WCF components produce XML Documents (DOM) internally which is transformed via XSLT into the outputformat by this tag. The output format will be HTML most of the time, but may be any other text format like CSV for example. The render tag will not produce any output for components that are not visible. The body may contain renderParam tags that supply parameters for rendering. The following stylesheet parameters are provided automatically (w/o nested parameter tag): `renderId` - contains the id of this tag. If not set the modelReference is taken `context` - the context path of the application for building URLs Parameters may occur in xsl (via standard <xsl:param .. >) and in the `DOM`. The render tag searches for <param name=".."/> elements in the `DOM` and creates a corresponding attribute in its parent. For example, the following `DOM`
          <myelem>
            <param name="abc" attr="bcd"/>
          </myelem>
it will become
          <myelem bcd="efg">
            <param name="abc" attr="bcd"/>
          </myelem>
where `efg` is the value of the `abc` parameter that was supplied by the JSP author. If the parameter named `abc` does not exsist, the attribute `bcd` is removed. This may be used to configure the page flow from a jsp, e.g.
            <button label="OK" action="validate" handler="...">
              <param name="successPage" attr="forward"/>
            </button>
will create a forward attribute to the button element whose value is supplied by the jsp author via the renderParam tag, e.g.
            <wcf:renderParam name="successPage" value="/somepage.jsp"/>

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | false | String | true | der renderId Stylesheet Parameter
ref | true | Component | true | Name of the Session Attribute that contains the Component to be rendered.
xslUri | true | String | true | Path of the XSLT stylesheet to use, relative to the application context. There may be different stylesheets for different Locales, the stylesheet will be choosen upon similar rules to ResourceBundle. Example: `xslUri="/WEB-INF/mystyle.xsl"`. For a german Browser WCF will try to load `/WEB-INF/mystyle_de.xsl`. If this fails, it will load `/WEB-INF/mystyle.xsl`.
xslCache | false | boolean | true | true, if the stylesheet shall be compiled once and then reused. This gives better performance but makes it difficult to develop the stylesheets. Use `true` for production and `false` for development

#### Example

    <wcf:tree id="tree01"/>
    <wcf:render ref="#{tree01}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true">
      <wcf:renderParam name="border" value="1"/>
    </wcf:render>

### renderParam

Body Content | tagdependent
Description | Adds an XSL parameter for the the render tag. If used inside a render tag, the parameter is local to that transformation. Otherwise the scope attribute specifies the scope of the parameter. The value may be provided as literal, or as expression (starting with "#{"). Exactly one of the attributes name or test must be set.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
name | false | String | true | Name of the parameter
value | false | String | true | Value of the parameter. If value starts with '#{' its interpreted as EL expression, otherwise its taken literally
scope | false | String | true | The scope of the parameter, one of 'request' (default), 'session', 'application'.
test | false | String | true | if present, the tag evaluates its body only if the parameter is set

#### Example

    <wcf:renderParam name="language" value="en" scope="session"/>
    <wcf:render ...>
      <wcf:renderParam name="border" value="0"/>
    </wcf:render>
    <wcf:renderParam test="language" value="en">
      This is english.
    </wcf:renderParam>
    <wcf:renderParam test="language" value="!en">
      This is not english.
    </wcf:renderParam>

### scriptbutton

Body Content | empty
Description | A toolbar button that is bound to a boolean bean property

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | ID of the button. The button may be accessed in EL as `TOOLBAR_ID.buttons.BUTTON_ID`
img | true | String | true | Name of the image to use. The generated URLs are `APPCONTEXT/wcf/toolbar/IMG-up.png` and `APPCONTEXT/wcf/toolbar/IMG-down.png`
radioGroup | false | String | true | Name of a radio group. At most one button of a group may be pressed.
tooltip | false | String | true | name of the tooltip in the toolbars ResourceBundle
visibleRef | false | String | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The button will be visible only, if that property is true
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
model | true | String | true | EL expression that evaluates to a boolean property

#### Example

    <wcf:scriptbutton id="button2" img="button" model="#{toolbean.radioButton1}" radioGroup="radio1" visibleRef="#{toolbean.checkBox1}"/>

### scroller

Body Content | JSP
Description | Adds java script code to the page that ensures that the browser keeps the scroll position when a user is navigating

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---

### separator

Body Content | empty
Description | Adds space between toolbar buttons

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
size | false | String | true | width in pixel
visibleRef | false | String | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The button will be visible only, if that property is true
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.

#### Example

    <wcf:separator/>

### setParam

Body Content | JSP
Description | replaces the attributes of a session parameter.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
paramName | true | String | true | Name of the SessionParam
displayName | false | String | true | visible name of the SessionParam
displayValue | false | String | true | visible value of the SessionParam
sqlValue | false | String | true | SQL value of the SessionParam
mdxValue | false | String | true | MDX value of the SessionParam
textValue | false | String | true | Text constant as value of the SessionParam

#### Example

          CUSTOMER_ID = 999
          <wcf:setParam name="CUSTOMER_ID" value="#{bean.myProperty}"/>
          now CUSTOMER_ID is bean.getMyProperty()

### sqlTable

Body Content | JSP
Description | A table that allows sorting and paging of a JSTL sql:query result. Sorting and paging are done by the database, so very large result sets are possible.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
maxRows | false | int | true | number or rows per page
orderBy | false | String | true | Name of the column to order by
nestedOrderBy | false | String | true | Name of an additional column to order by
descending | false | boolean | true | Initial order by direction

#### Example

    <form action="my.jsp" method="POST">
      <wcf:sqlTable id="mytable" maxRows="200" orderBy="CUSTOMER" descending="true">
        <sql:query var="result" maxRows="${mytable.maxRows}" startRow="${mytable.startRow}">
          SELECT   ...
          FROM ...
          WHERE ...
          <wcf:sqlTableOrderBy />
        </sql:query>
        <table border="1" cellspacing="0" cellpadding="2">
          <tr>
            <th><wcf:sqlTableSortButton column="CUSTOMER"/>&nbsp;Customer</th>
            ... more column headings ...
          </tr>
          <c:forEach var="row" items="${result.rows}">
            <tr>
              <td>
                <c:out value="${row.CUSTOMER}"/>
              </td>
              ... more columns ...
            </tr>
          </c:forEach>
          <tr>
            <td colspan="7">
              <wcf:sqlTablePageNavigations result="${result}"/>
            </td>
          </tr>
        </table>
      </wcf:sqlTable>
    </form>

### sqlTableOrderBy

Body Content | empty
Description | emits the "ORDER BY [column-name]" for the SQL query. Used inside <sql:query> tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---

### sqlTablePageNavigations

Body Content | empty
Description | creates a dialog that allows the user to see different pages

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
result | true | String | true | the sql result to scroll

### sqlTableSortButton

Body Content | empty
Description | creates a sort button

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
column | true | String | true | Name of the column to sort by

### statusline

Body Content | JSP
Description | Displays messages and errors. The body content is the default content that is displayed if there are no errors or messages to display. In case of errors a stack trace will be printed into the generated html - it will be commented out and thus not visible, but you will see it if you choose "view source" in your browser.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
format | false | String | true | output format: either "html" or "text" (default = "html")
clear | false | boolean | true | clears the status line after output (default = true!)

#### Example

    <wcf:statusline/>

### table

Body Content | JSP
Description | Creates a table component. This component does not produce visible output directly, it must be rendered via the WCF `render` tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
model | false | String | true | EL expression that resolves to a com.tonbeller.wcf.table.TableModel
selmode | false | String | true | Row selection mode: href, single, multi or none
closable | false | boolean | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The close button will be visible only, if that property is true
editable | false | boolean | true | "true" if the user shall hide columns etc
sortable | false | boolean | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The sorting function will be activated, if that property is true
pagable | false | boolean | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. The paging function will be activated, if that property is true
colHeaders | false | boolean | true | Either `true`, `false` or an EL expression that evaluates to a boolean property. Column headers will be shown, if that property is true
pagesize | false | int | true | Maximum row count which will be displayed for a single page. The paging function must be active (pagable=true)
editForm | false | String | true | DEPRECATED - use editable. set to context relative URI the XML file describing the table properties form to allow users to hide columns

#### Example

    <wcf:table id="t1" model="#{tmodel}" selmode="multi" closable="false" sortable="false" pageable="true" pagesize="10"/>
    <wcf:render ref="#{t1}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>

### tablePropertiesForm

Body Content | JSP
Description | Creates a table component. This component does not produce visible output directly, it must be rendered via the WCF `render` tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
xmlUri | true | String | true | Path of an XML config file that describes the HTML form, relative to the application context. There may be different form descriptions for different Locales, the stylesheet will be choosen upon similar rules to ResourceBundle. Example: `xmlUri='/WEB-INF/myform.xml'`. For a german Browser WCF will try to load `/WEB-INF/myform_de.xml`. If this fails, it will load `/WEB-INF/myform.xml`.
closable | false | boolean | true | set to `true` make the component closeable
table | true | String | true | EL expression that resolves to a <wcf:table ...>

#### Example

    <wcf:table id="t1" model="#{tmodel}" selmode="multi" closable="false" sortable="false" pageable="true" pagesize="10"/>
    <wcf:tablePropertiesForm id="t1properties" table="#{t1}"/>
    ...
    <!-- render the table -->
    <wcf:render ref="#{t1}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>
    <!-- render the properties form -->
    <wcf:render ref="#{t1properties}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>

### token

Body Content | EMPTY
Description | Creates a hidden field to synchronize the page flow. Should be used together with the TokenFilter

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
clear | false | boolean | true | Instead of producing the HTML hidden field, the token is cleared and browser back button is allowed (once!)

#### Example

    <form ...>
      <wcf:token/>
    </form>
    or w/o form
      <!-- allow browser back once -->
      <wcf:token clear="true"/>

### toolbar

Body Content | JSP
Description | Creates a toolbar component. Buttons are defined via nested Elements: formbutton pushbutton scriptbutton imgbutton separator This component does not produce visible output directly, it must be rendered via the WCF `render` tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
bundle | false | String | true | ResourceBundle for tooltips
globalButtonIds | false | boolean | true | @DEPRECATED - do not use. Workaround for a bug in earlier versions that prevented multiple toolbars to have buttons with the same id @DEPRECATED - do not use. Workaround for a bug in earlier versions that prevented multiple toolbars to have buttons with the same id

#### Example

    <wcf:toolbar id="toolbar01" bundle="com.tonbeller.wcf.toolbar.resources">
      <wcf:scriptbutton id="button1" tooltip="testlabel" img="button" model="#{toolbean.checkBox1}"/>
      <wcf:separator/>
      <wcf:scriptbutton id="button2" img="button" model="#{toolbean.radioButton1}" radioGroup="radio1" visibleRef="#{toolbean.checkBox1}"/>
      <wcf:scriptbutton id="button3" img="button" model="#{toolbean.radioButton2}" radioGroup="radio1" visibleRef="#{toolbean.checkBox1}"/>
      <wcf:separator/>
      <wcf:pushbutton id="button4" img="button" visibleRef="#{toolbean.checkBox1}"/>
      <wcf:imgbutton  id="button5" img="button" href="/some/path" visibleRef="#{toolbean.checkBox1}"/>
    </wcf:toolbar>

### tree

Body Content | EMPTY
Description | Creates a tree component. This component does not produce visible output directly, it must be rendered via the WCF `render` tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.
model | false | String | true | EL expression that resolves to a com.tonbeller.wcf.tree.TreeModel
selectionModel | false | String | true | EL expression that resolves to a com.tonbeller.wcf.selection.SelectionModel

#### Example

    <wcf:tree id="tree01"/>
    <wcf:render ref="#{tree01}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true">
      <wcf:renderParam name="border" value="1"/>
    </wcf:render>

### wizard

Body Content | JSP
Description | Creates a wizard component. This component does not produce visible output directly, it must be rendered via the WCF `render` tag.

Attribute | Required | Type | rtexpr | Description
--- | --- | --- | --- | ---
id | true | String | true | Name of the Session Attribute that is created by this tag
visible | false | boolean | true | Sets the visible property of the component. The WCF Render tag will not show a component whose visible flag is false
validate | false | boolean | true | if set to true, then user input will be automatically verified, even if the button of another component was pressed. Both components must be part of the same HTML form element to make this work.
role | false | String | true | Name of a role, optionally prefixed by '!'. Example: role='tomcat' allows members of the role tomcat to access this component, role='!tomcat' grants access to everybody except tomcat members.

#### Example

    <wcf:wizard id="wizard01">
      <wcf:form .../>
      <wcf:form .../>
      <wcf:form .../>
    </wcf:wizard>

    <wcf:render ref="#{wizard01}" xslUri="/WEB-INF/wcf/wcf.xsl" xslCache="true"/>