Value List Handler
Tag column


Render a column of the iterated row.

Example

<vlh:column title="Id of Player" property="id" sortable="desc" emphasisPattern="1"/>


Tag Information
Tag Classnet.mlw.vlh.web.tag.DefaultColumnTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
sortablefalsetruejava.lang.StringEnable or disable sorting for this column.
  • asc
  • Column will be sorted ascending.
  • desc
  • The column will be sorted descending. When you ommit whole attribute, you disable option to sort this column.

    Example

    <vlh:column title="playerid" property="playerid" sortable="desc" emphasisPattern="100"/>
    propertyfalsetruejava.lang.StringThe javabean property name used to get property from bean, which has bean is retrieved in adapter.

    Usage

    <vlh:column title="Product" property="price" sortable="desc" />

    Note:To retrieve date from row javabean you can use expresion like "price.inEuro". For more details see org.apache.commons.beanutils.PropertyUtils.

    groupKeyfalsetruejava.lang.Stringtodo
    adapterPropertyfalsetruejava.lang.StringThe adapter property name used to retrieve data and also to generate sql (hql) script for the sorting.
    When is it not set or null, it is used the default property as the same as ordinary javabean property.

    Usage

    <vlh:column title="FirstAsString" property="firstNameAsString" adapterProperty="firstName" sortable="desc" />

    Example

    We would like to have an class Player, that would return firstname via getFirstName, and firstName + "As String" via getFirstNameAsString.

    The adapterProperty is used in a adapter to sort, e.g. like this:

      FROM Player ORDER BY Player.firstName asc
    But in the <vlh:column, that also generate row, use the property to retrieve data from the row's javabean, in this case it would be like this:
      Player.getFirstNameAsString()

    Note: When you are using Hibernate20Adapter, see for more details The Hibernate Query Language In this adpter is possible to write adapterProperty like "holidays['national day']", what will result in query like:

    From Calendar By Calendar.holidays['national day']
    formatfalsetruejava.lang.String

    IThe ValueList can format instance of number,java.util.date or Calendar, it using locale from web browser as default or in given locale.

    Example

  • <vlh:column format="#,###,##0.00" locale="ref to locale instance" .. >
  • Use your given locale.
  • <vlh:column format="#,###,##0.00"
  • Use browser locale.

    localefalsetruejava.util.LocaleLocale used for the formating of the colomn.

    Usage

  • <vlh:column title="Average" property="averageSalary" sortable="desc" format="#,###,##0.00" locale= <%= new Locale("sk")%> />
  • Which result in formatin numbers in slovak locale.
    titlefalsetruejava.lang.StringThe title of the column.
  • When all column's titles are not specified (null), row tag will skip generating of the header!
  • emphasisPatternfalsetruejava.lang.StringThe pattern to be emphasis displayed in the ordinary column cell.

    Usage

  • <vlh:column title="playerid" property="id" sortable="desc" emphasisPattern="30" />
  • 1230 will be emphased like this 1230.
    titleKeyfalsetruejava.lang.String

    Key used in a message sources specified in the configuration bean.

    Example

    <bean id="classicLook" singleton="true" class="net.mlw.vlh.web.ValueListConfigBean"> Omited content. <property name="messageSource"> <bean class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename"><value>classicLook</value></property> <property name="parentMessageSource"><ref bean="resourceI18nBundle" /></property> </bean> </property> </bean>

    sumfalsetruejava.lang.String

    Enable summing a column.

    Example

    <vlh:row bean="product"> <vlh:column title="Product price" property="price" sortable="desc" sum="totalPrice" /> </vlh:row>

    The summed column value (TotalPrice) you can retrieve using :
      <%=pageContext.getAttribute("TotalPrice")%>
    attributesfalsetruejava.lang.String

    Allow you to specify html tag attributes "inline"-without writing additinal vlh's tags.

    Example

    <vlh:column title="lastname" property="lastname" sortable="desc" attributes="width='150'"/>

    defaultfalsetruejava.lang.String

    Specify a string for the property's null token. When you set this attribute, you overide default null token from the configuration bean.

    Example

    <vlh:column title="lastname" property="lastname" sortable="desc" attributes="width='150'"/>

    toolTipfalsetruejava.lang.StringThe tooltip of the column's title (shown when a mouse is over the title).
    It's useful when you don't want a long title but still you'd like to provide to a user a more detailed info about the column.
    toolTipKeyfalsetruejava.lang.String

    Key of tooltip of the column's title (shown when a mouse is over the title). The key is used to look up the tooltip string in message sources specified in the configuration bean.
    It's useful when you don't want a long title but still you'd like to provide to a user a more detailed info about the column.

    Example

    <bean id="classicLook" singleton="true" class="net.mlw.vlh.web.ValueListConfigBean"> Omited content. <property name="messageSource"> <bean class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename"><value>classicLook</value></property> <property name="parentMessageSource"><ref bean="resourceI18nBundle" /></property> </bean> </property> </bean>


    Variables
    No Variables Defined.


    Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.