Facts and Questions

Facts and Questions
Does the ValueListHandler work on IE?
Yes, the ValueListHandler tag libraries produce HTML that works on all versions of IE.
Does the ValueListHandler work on Netscape?
Yes, the ValueListHandler tag libraries produce HTML that works on all versions of netscape.
How do I change the value printed if a column is null?

The property null.token in mlavwilson.properties.

The ValueListHandler doesn't do X!
Then put in a request or offer to help me out :)
I am trying to use the ValueList, but I keep getting ClassNotFoundException(s).
This is most likely caused by not having all the jars in the WEB-INF/lib directory that the ValueListHandler requires.

To use the ValueListHandler you need the following jars:

  • spring
  • commons-logging

To use the ValueListHandler taglibs you need the following jars:

  • commons-beanutils
  • commons-collections

Is Value List based on http://displaytag.sourceforge.net?
Most of the ValueList project was written before I discovered displaytag. Seeing displaytag and its ignorance of the data tier, I decided to put ValueList in the open-source area.
I am using Hibernate/Spring/DAO. Is the Hibernate20Adapter configuration is what I should be using?
That's a very good question! I have in the past when using Hibernate still used the DefaultDynclassAdapter or the DefaultDynaBeanAdapter. I choose this because my queries were too complex for Hibernate to handle. (example) However, if you have simple queries, I would use the HibernateAdapter, or write your own adapter that calls your DAO.
For the Hibernate20Adapter property "hsql" and "namedQuery" but the "hsql" states that it is required. I have some named queries, do I have to do both?
The properties "hsql" and "namedQuery" are not both required, one or the other is. With that said let me explain why you should use that "hsql" over the "namedQuery":

If you used hsql you can use the /~filterName: sql ~/ syntax to handle filtering and sorting. If you use the "namedQuery" you have no control over the query, you get just what you wrote in the mapping file. Therfore you can only use sorting if you use the hsql property.

I looked at displaytag and gave up on it because it was too constraining when it comes to "tweaking" the output. Displaytag seems to force columns to be a certain way. The output I have has embedded URLs, images, and Javascript pop-up links which did not seem to integrate well with displaytag. For my output I use EL for only the database data. Does ValueList have the same constraints?

I agree, that turned me off displaytag as well. I believe you will be pleased with how I handled this. You have two options.

If there is BodyContent in the vlh:column tag then the BodyContent is displayed instead of the property from the bean. So the following two jsp snippets would produce the same results:

<vlh:row bean="player">
  <vlh:column title="status" property="status" sortable="desc" />
<vlh:row bean="player">
  <vlh:column title="status" property="status" sortable="desc">
    <c:out value="player.status"/>

Or if you want total control use the vlh:header tag which just generates the row with sortable THs, and you use c:forEach to iterate the List. See example, click view jsp source.

Problem with UTF-8 decoding using Tomcat 5.

The ValueList's default configuration does UTF-8 encoding of url parameters that are passed in generated HREF's. But problem of decoding, especially URI parameters, should be very paintfull to resolve. It is not enought to set a

that will affect only a mutlipart body of http's request, not the uri params. The solution is to change default uri encoding in TOMCAT's config file: %TOMCAT_HOME%\conf\server.xml, Where you need to add an extra param:


<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
<Connector port="8080"   
URIEncoding="UTF-8" ...... />

For more detail see