667481 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

General J2EE General J2EE General J2EE Messages: 37 Messages: 37 Messages: 37 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

Value List Handler - looking for feedback

Posted by: Matthew Wilson on May 26, 2004 DIGG
Over the past few years of J2EE development I have tacked the same problems over and over. One such problem is retrieving data and displaying it in an html table. I have taken what I have learned and threw it in a project on sourceforge: http://valuelist.sourceforge.net. I am looking for some constructive criticism from all you J2EE experts out there.

Here are a few points to start the conversation.

1) Would you use this implementation of the ValueList pattern, over implementing your own for a given project?

2) I would like to have the ValueList project focus on just the backend services, but I cannot find any good set of custom tags to use for the view. So I wrote my own:( Does anyone know of a good library out there?

Threaded replies

·  Value List Handler - looking for feedback by Matthew Wilson on Wed May 26 12:47:15 EDT 2004
  ·  Value List Handler - looking for feedback by Ravindranath Mangalagiri on Wed May 26 15:29:38 EDT 2004
    ·  Value List Handler - looking for feedback by Matthew Wilson on Wed May 26 16:53:59 EDT 2004
      ·  I have been disappointed with the amount of feedback. by Matthew Wilson on Mon Jun 07 13:44:05 EDT 2004
        ·  I have been disappointed with the amount of feedback. by Ravindranath Mangalagiri on Mon Jun 07 17:32:14 EDT 2004
          ·  How are you using it? by Matthew Wilson on Wed Jun 16 13:48:02 EDT 2004
      ·  Web Standards Support by Kim Pepper on Wed Jul 07 01:42:25 EDT 2004
        ·  RE: Web Standards Support??? by Matthew Wilson on Thu Jul 15 08:41:24 EDT 2004
    ·  When Datasource is configured by the admin appserver ... by Chris Rob on Fri Aug 06 02:58:14 EDT 2004
      ·  When Datasource is configured by the admin appserver ... by Luke Groundwalker on Tue Aug 17 11:38:32 EDT 2004
    ·  Editable grid feature by kumar vishwanath on Thu Feb 10 18:08:57 EST 2005
    ·  Can you provide the latest source code zip for download by kumar vishwanath on Fri Feb 18 09:25:57 EST 2005
      ·  Can you provide the latest source code zip for download by Matthew Wilson on Wed Feb 23 13:43:37 EST 2005
  ·  valuelist.war in Tomcat-4.1.29 has error: net.mlw.vlh.adapter.fi by Wiwit Tjahajana on Thu Jul 15 11:35:31 EDT 2004
    ·  Just fixed that. by Matthew Wilson on Thu Jul 15 14:24:56 EDT 2004
      ·  Where are the docs? by Twice Tshwenyane on Thu Jul 22 07:59:02 EDT 2004
        ·  Start with the Overview by Matthew Wilson on Thu Jul 22 23:48:42 EDT 2004
          ·  Start with the Overview by Twice Tshwenyane on Fri Jul 23 03:14:53 EDT 2004
  ·  how about ibatis Adapter? by zhang long on Fri Jul 23 03:06:33 EDT 2004
    ·  how about ibatis Adapter? by Matthew Wilson on Wed Aug 04 10:33:54 EDT 2004
  ·  Some question by Marco Baraldi on Thu Aug 05 08:13:05 EDT 2004
    ·  Some question by Matthew Wilson on Mon Aug 16 18:01:58 EDT 2004
  ·  Value List Handler - looking for feedback by Gabriel Nascimento on Thu Aug 12 14:55:51 EDT 2004
    ·  Value List Handler - looking for feedback by Matthew Wilson on Mon Aug 16 18:04:46 EDT 2004
  ·  Is this vlh project independent from any framework? by esahu perez on Tue Jan 11 00:50:02 EST 2005
  ·  Is the ValueList good enough to handle 3000 or more records by kumar vishwanath on Thu Feb 10 18:23:59 EST 2005
  ·  valuelist and struts by richard tuquet laburre on Wed Mar 09 09:00:29 EST 2005
    ·  valuelist and struts by F. A. on Thu Apr 07 11:32:32 EDT 2005
      ·  vlh with struts... by Matthew Wilson on Thu Apr 14 15:50:15 EDT 2005
  ·  Need more documentation by Ben Shamsian on Mon Jul 11 04:32:04 EDT 2005
  ·  Lost in the "ValueList" by D E on Fri Aug 05 10:43:39 EDT 2005
    ·  Lost in the "ValueList" 2 by D E on Fri Aug 05 10:50:58 EDT 2005
  ·  VLH With WebLogic and iBatis - Pagination did not work by Venkat Nukala on Tue Sep 20 12:40:30 EDT 2005
  ·  Maintaining client state(page no) in web or data tier?? by Janardhana Rao Kotha on Fri Nov 04 22:45:13 EST 2005
    ·  cache by Matthew Wilson on Wed Mar 29 10:41:51 EST 2006
      ·  Display tag vs value list by Venu Thamodharan on Tue Oct 24 23:03:32 EDT 2006
        ·  Using Spring, Struts or similar Web MVC frameworks by Werner Keil on Mon Dec 18 13:00:46 EST 2006
  ·  Getting errors when deploying valuelist.war in tomcat 5.5 by robin bajaj on Sun Dec 10 23:40:23 EST 2006
  Message #123544 Post reply Post reply Post reply Go to top Go to top Go to top

Value List Handler - looking for feedback

Posted by: Ravindranath Mangalagiri on May 26, 2004 in response to Message #123514
I check VLH all this afternoon. Its pretty cool. GOOD JOB....
Now, thought I am working on Hibernate, I am using DefaultDynAdapter to display my asset list. Do you have any example of how to feed this DynaBean to Display tag ??


I am working on a prototype and need to be done by this week. I will update you regarding VLH, after the design review next week.


-ravi

  Message #123551 Post reply Post reply Post reply Go to top Go to top Go to top

Value List Handler - looking for feedback

Posted by: Matthew Wilson on May 26, 2004 in response to Message #123544
I check VLH all this afternoon. Its pretty cool. GOOD JOB....Now, thought I am working on Hibernate, I am using DefaultDynAdapter to display my asset list. Do you have any example of how to feed this DynaBean to Display tag ??I am working on a prototype and need to be done by this week. I will update you regarding VLH, after the design review next week.

-ravi
The valuelist.war has plenty of examples using the DefaultDynAdapter with my custom taglibs.

Here is one example:
  ...
  <% Calls the service. %>
  <vlh:retrieve name="nbaPlayers" value="list" />
  ...
  <% Displays the results. %>
  <table width="450" class="simple" cellspacing="0" cellpadding="0">
    <vlh:row value="list" url="?" bean="player">
      <vlh:column title="playerid" property="playerid" sortable="desc" />
      <vlh:column title="teamname" property="teamname" sortable="desc" />
      <vlh:column title="firstname" property="firstname" sortable="desc" />
      <vlh:column title="lastname" property="lastname" sortable="desc" />
      <vlh:column title="status" property="status" sortable="desc" />
      <vlh:column title="pos" property="pos" sortable="desc" />
    </vlh:row>
  </table>
  ...
See cvs for all the examples.

I did not relize I had no jsp example posted. I'll get one posted this evening.

-Matthew

  Message #124914 Post reply Post reply Post reply Go to top Go to top Go to top

I have been disappointed with the amount of feedback.

Posted by: Matthew Wilson on June 07, 2004 in response to Message #123551
:(

  Message #124959 Post reply Post reply Post reply Go to top Go to top Go to top

I have been disappointed with the amount of feedback.

Posted by: Ravindranath Mangalagiri on June 07, 2004 in response to Message #124914
I posted VLH link on www.javablogs.com

also please check http://jroller.com/page/m_ravi/20040607#matthew_wilson_s_value_list1


cheers
ravi

  Message #126230 Post reply Post reply Post reply Go to top Go to top Go to top

How are you using it?

Posted by: Matthew Wilson on June 16, 2004 in response to Message #124959
I posted VLH link on www.javablogs.comalso please check http://jroller.com/page/m_ravi/20040607#matthew_wilson_s_value_list1cheersravi
Thanks for the good post:) How did you use the ValueListHandler, and did it meet all your needs?

  Message #128874 Post reply Post reply Post reply Go to top Go to top Go to top

Web Standards Support

Posted by: Kim Pepper on July 07, 2004 in response to Message #123551
I would consider such a tag library being much more useful if it generated valid XHML. http://validator.w3.org/

  Message #130132 Post reply Post reply Post reply Go to top Go to top Go to top

RE: Web Standards Support???

Posted by: Matthew Wilson on July 15, 2004 in response to Message #128874
I get the following errors:
Line 45, column 43: general entity "pagingPage" not defined and no default entity.
Do you need to write urls like this?
nextPage.jsp?name=matt&amp;age=54
Line 45, column 152: there is no attribute "border"
There is no attribute "border" for image? How do you prevent IE from puting a border around your images?
Line 45, column 155: required attribute "alt" not specified
I will fix this. The img tag is missing the alt property.
Line 46, column 15: "nowrap" is not a member of a group specified for any attribute
Line 46, column 146: end tag for "img" omitted, but OMITTAG NO was specified
This I will fix. I have <img src="">, instead of <img src=""/>


Would this really be "much more useful" if the above where fixed? I usually code to html4,

Looking for feedback,
Matt

  Message #130155 Post reply Post reply Post reply Go to top Go to top Go to top

valuelist.war in Tomcat-4.1.29 has error: net.mlw.vlh.adapter.fi

Posted by: Wiwit Tjahajana on July 15, 2004 in response to Message #123514
Dear Matthew:

I deployed valuelist.war in Tomcat-4.1.29, and when browsing to index.jsp, I've got the following error. Do you mind giving me pointers on how to resolve it? The JDK is 1.4.2

Thank you.

wiwit



SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Error registerin
g bean with name '(inner bean definition)' defined in resource [/WEB-INF/classes
/applicationContext.xml] of ServletContext: Bean class [net.mlw.vlh.adapter.file
.FileSystemAdapter] not found; nested exception is java.lang.ClassNotFoundExcept
ion: net.mlw.vlh.adapter.file.FileSystemAdapter
java.lang.ClassNotFoundException: net.mlw.vlh.adapter.file.FileSystemAdapter
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1443)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1289)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
parseBeanDefinition(DefaultXmlBeanDefinitionParser.java:245)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
parsePropertySubelement(DefaultXmlBeanDefinitionParser.java:423)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
getMap(DefaultXmlBeanDefinitionParser.java:507)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
parsePropertySubelement(DefaultXmlBeanDefinitionParser.java:458)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
getPropertyValue(DefaultXmlBeanDefinitionParser.java:414)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
parsePropertyElement(DefaultXmlBeanDefinitionParser.java:386)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
getPropertyValueSubElements(DefaultXmlBeanDefinitionParser.java:334)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
parseBeanDefinition(DefaultXmlBeanDefinitionParser.java:238)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
loadBeanDefinition(DefaultXmlBeanDefinitionParser.java:200)
        at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.
registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:152)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe
rBeanDefinitions(XmlBeanDefinitionReader.java:161)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:127)
        at org.springframework.context.support.AbstractXmlApplicationContext.loa
dBeanDefinitions(AbstractXmlApplicationContext.java:123)
        at org.springframework.context.support.AbstractXmlApplicationContext.ref
reshBeanFactory(AbstractXmlApplicationContext.java:65)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:232)
        at org.springframework.web.context.support.XmlWebApplicationContext.refr
esh(XmlWebApplicationContext.java:131)
        at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:154)
        at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:95)
        at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:48)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3271)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
613)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:821)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)

        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:307)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:788)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492
)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400
)
        at org.apache.catalina.startup.HostConfig.run(HostConfig.java:851)
        at java.lang.Thread.run(Thread.java:534)

  Message #130194 Post reply Post reply Post reply Go to top Go to top Go to top

Just fixed that.

Posted by: Matthew Wilson on July 15, 2004 in response to Message #130155
I have a bug in my maven build process. Give it another try.

  Message #131121 Post reply Post reply Post reply Go to top Go to top Go to top

Where are the docs?

Posted by: Twice Tshwenyane on July 22, 2004 in response to Message #130194
I tried to look for decent docs on the site but couldn't find them, the tutorial also seems incomplete. Did i somehow miss them?. if i wanted to start where exactly would be the best place to start?

thanx.

  Message #131294 Post reply Post reply Post reply Go to top Go to top Go to top

Start with the Overview

Posted by: Matthew Wilson on July 22, 2004 in response to Message #131121
Start with the
Overview
.

Then take a look at the samples.

The tutorial is a work in progress...

  Message #131313 Post reply Post reply Post reply Go to top Go to top Go to top

how about ibatis Adapter?

Posted by: zhang long on July 23, 2004 in response to Message #123514
how about to add ibatisApater?

ibatis can easily create dynamic SQL querys to replace the sql in applicationContext,so i can just use it with something like this:

 <entry key="nbaTeams">
          <bean class="net.mlw.vlh.adapter.ibatis.ibatisAdapter">
            <property name="dataSource"><ref bean="myDataSource"/></property>
            <property name="useName"><value>false</value></property>
            <property name="sqlMap">
              <value>
                       dynamicSql <!----which is just a string
              </value>
            </property>
          </bean>
        </entry>

so I can just easy test accoding db and vls!
I am just getting start to do this job,hope i can do this quickly!

by the way: I can't find the changelog in the web :(

sorry for my pool english!

  Message #131315 Post reply Post reply Post reply Go to top Go to top Go to top

Start with the Overview

Posted by: Twice Tshwenyane on July 23, 2004 in response to Message #131294
Start with the
Overview
.Then take a look at the samples.The tutorial is a work in progress...
Ok the overview looks interesting not forgetting the project itself. Thanks for the pointers.

  Message #132731 Post reply Post reply Post reply Go to top Go to top Go to top

how about ibatis Adapter?

Posted by: Matthew Wilson on August 04, 2004 in response to Message #131313
I am VERY intersted in getting an ibatis adapter in! Let me know how I can contact you to get net.mlw.vlh.adapter.ibatis.ibatisAdapter included.

  Message #132875 Post reply Post reply Post reply Go to top Go to top Go to top

Some question

Posted by: Marco Baraldi on August 05, 2004 in response to Message #123514
Hi, I have some question
1) Why no source code/ integration with controller layer?
I think that is a matter of controller interact with valuelist Pattern
2) why tag library included?
Is not possible to use yet another tag library?. I think that a jsp
have to work without knowledge of other layer so a collection in enough.
Regars
Marco

  Message #133025 Post reply Post reply Post reply Go to top Go to top Go to top

When Datasource is configured by the admin appserver ...

Posted by: Chris Rob on August 06, 2004 in response to Message #123544
Hello

I'd like to use your Value List Handler, but apparently, I have to configure my datasource in a specific config file.
What about if my datasource is configured by the admin appserver ?
Is it possible to tell to the VLH only the jndi name of my datasource ?

Thanks by advance for your answer

  Message #133932 Post reply Post reply Post reply Go to top Go to top Go to top

Value List Handler - looking for feedback

Posted by: Gabriel Nascimento on August 12, 2004 in response to Message #123514
Is thv Value List Handler of the Sun´s site, a good alternative when you want to paginate your results? I´m asking this because, in the implementation of the VLH you load all your database data you want, and then you control the paginating page with a bean calling nextPage(), currentPage()...

Isn´t better to load from your database only page by page??

Tnx!

  Message #134320 Post reply Post reply Post reply Go to top Go to top Go to top

Some question

Posted by: Matthew Wilson on August 16, 2004 in response to Message #132875
1) Why no source code/ integration with controller layer? I think that is a matter of controller interact with valuelist Pattern
There is a sample controller for Spring. But generally this is so simple i decided not to attempt to cover all the MVCs out there. Look at the User Guide for an example of the controller code. Or look at the Struts example in the sample.war.
Pattern2) why tag library included?Is not possible to use yet another tag library?. I think that a jsp have to work without knowledge of other layer so a
collection in enough.RegarsMarco
A Collection is not enough because you need to know the paging and sorting information as well (if you want to do sorting and paging outside the web tier). The ValueList interface contains a List and a PagingInfo bean. All the other "table tags" do sorting and paging in the web tier:( It was not my intent to spend so much time on the taglibs! I just could not find an existing set of taglibs that worked!

  Message #134321 Post reply Post reply Post reply Go to top Go to top Go to top

Value List Handler - looking for feedback

Posted by: Matthew Wilson on August 16, 2004 in response to Message #133932
Is thv Value List Handler of the Sun´s site, a good alternative when you want to paginate your results? I´m asking this because, in the implementation of the VLH you load all your database data you want, and then you control the paginating page with a bean calling nextPage(), currentPage()...Isn´t better to load from your database only page by page??Tnx!
This is good for small datasets, but what if you have 1,000 rows, or 100,000 rows?

  Message #134442 Post reply Post reply Post reply Go to top Go to top Go to top

When Datasource is configured by the admin appserver ...

Posted by: Luke Groundwalker on August 17, 2004 in response to Message #133025
HelloI'd like to use your Value List Handler, but apparently, I have to configure my datasource in a specific config file. What about if my datasource is configured by the admin appserver ?Is it possible to tell to the VLH only the jndi name of my datasource ?Thanks by advance for your answer
Spring is used to bind the DataSource to the adapter. You could extend the adapter and then pull the dataqsource from the jndi tree. Or maybe Sring can access the jndi tree, that would be a question for the dpring team.

  Message #152271 Post reply Post reply Post reply Go to top Go to top Go to top

Is this vlh project independent from any framework?

Posted by: esahu perez on January 11, 2005 in response to Message #123514
I have seen the page tutorial and this does not tell me too much. What do I need if want to implement this project without ibatis and spring and anyother framework.

Where do I have to start?. What do I have to config in order to get it working? is it compulsory to work under a database framework like ibatis or whatever it were?

  Message #156496 Post reply Post reply Post reply Go to top Go to top Go to top

Editable grid feature

Posted by: kumar vishwanath on February 10, 2005 in response to Message #123544
Hi Wilson,

(1) How do you implement editable grids?And save the records using hibernate in one batch

Regards
KumarV

  Message #156498 Post reply Post reply Post reply Go to top Go to top Go to top

Is the ValueList good enough to handle 3000 or more records

Posted by: kumar vishwanath on February 10, 2005 in response to Message #123514
(1) Does the value retrieve record page by page. The HibernateAdapter should be able to pull data from hibernate qry page by page as hibernate provides this feature?

  Message #157446 Post reply Post reply Post reply Go to top Go to top Go to top

Can you provide the latest source code zip for download

Posted by: kumar vishwanath on February 18, 2005 in response to Message #123544
Can you provide the latest source code zip for download

  Message #158234 Post reply Post reply Post reply Go to top Go to top Go to top

Can you provide the latest source code zip for download

Posted by: Matthew Wilson on February 23, 2005 in response to Message #157446
its in cvs at valuelist.sourceforge.net

  Message #160534 Post reply Post reply Post reply Go to top Go to top Go to top

valuelist and struts

Posted by: richard tuquet laburre on March 09, 2005 in response to Message #123514
I use displaytag in struts projects (with iBatis dao / sqlmaps) ; now i want to replace displaytag by valuelist and ibatis sqlmaps by hibernate

But i cannot find "real-life" examples on how i can use valuelist with struts without spring

Is somebody have examples like that ?

Thank you for answer and sorry for my poor english (i am french)

  Message #165212 Post reply Post reply Post reply Go to top Go to top Go to top

valuelist and struts

Posted by: F. A. on April 07, 2005 in response to Message #160534
Did you ever figure out how to do it?

  Message #166266 Post reply Post reply Post reply Go to top Go to top Go to top

vlh with struts...

Posted by: Matthew Wilson on April 14, 2005 in response to Message #165212
Take a look at the valuelist.war. It has a few struts examples. But remeber ValueList needs to have spring, but not nessesarly spring-web.

  Message #177436 Post reply Post reply Post reply Go to top Go to top Go to top

Need more documentation

Posted by: Ben Shamsian on July 11, 2005 in response to Message #123514
I've just came across valuelist. For the past two weeks I've been evaluating displaytag and I am concerned about its data handling. The one comment I would like to make about valuelist is that it is not as well documented as displaytag. In addition the links to the samples pages do not work. ValueList maybe a great product but without good documentation and samples it is worthless to me. I want to use a tag library to help me do my work faster but if it takes too long to figure out then I just write my own or use jsp. So please spend some time and provide detailed documentation and Samples.

  Message #180471 Post reply Post reply Post reply Go to top Go to top Go to top

Lost in the "ValueList"

Posted by: D E on August 05, 2005 in response to Message #123514
The concept of valuelist is great. Some tutorials are made but the problem is that these tutorials give us solution when all parameters are set(bean, controller...). I think that for the developpers with an experience, there is no problems to understand the tag library, and configure files like applicationcontext.xml, web.xml. And examples like valuelist.war, report.war don't work...
I want to use this technologie with spring(without Struts) only. I thought it was simple, and i'm going to go on another techno if i can't use it.

My applicationcontext.xml(I work with tomcat 4.1):
...
&#60bean id="myDataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource"&#62
&#60property name="driverClassName"&#62
&#60value&#62com.mysql.jdbc.Driver&#60/value&#62
&#60/property&#62
&#60property name="url"&#62
&#60value&#62jdbc:mysql://localhost:3306/dbarticles&#60/value&#62
&#60/property&#62
&#60property name="username"&#62
&#60value&#62root&#60/value&#62
&#60/property&#62
&#60property name="password"&#62
&#60value&#62&#60/value&#62
&#60/property&#62
&#60/bean&#62
&#60bean id="valueListHandler" singleton="true" class="net.mlw.vlh.DefaultValueListHandlerImpl"&#62
&#60property name="config.adapters"&#62
&#60map&#62
&#60entry key="playerRank"&#62
&#60bean class="net.mlw.vlh.adapter.jdbc.dynabean.DefaultDynaBeanAdapter"&#62
&#60property name="dataSource"&#62
&#60ref bean="myDataSource"/&#62
&#60/property&#62
&#60property name="defaultNumberPerPage"&#62
&#60value&#621&#60/value&#62
&#60/property&#62
&#60property name="defaultSortColumn"&#62
&#60value&#62nom&#60/value&#62
&#60/property&#62
&#60property name="defaultSortDirection"&#62
&#60value&#62desc&#60/value&#62
&#60/property&#62
&#60property name="sql"&#62
&#60value&#62
SELECT NOM as nom, PRIX as prix, STOCKACTUEL as stock
FROM articles
/~sortColumn: ORDER BY [sortColumn] [sortDirection]~/
&#60/value&#62
&#60/property&#62
&#60/bean&#62
&#60/entry&#62
&#60/map&#62
&#60/property&#62
&#60/bean&#62
...

my web.xml :
...
&#60taglib&#62
     &#60taglib-uri&#62valuelist.tld&#60/taglib-uri&#62
     &#60taglib-location&#62/WEB-INF/tld/valuelist.tld&#60/taglib-location&#62
&#60/taglib&#62
&#60taglib&#62
     &#60taglib-uri&#62c.tld&#60/taglib-uri&#62
     &#60taglib-location&#62/WEB-INF/c.tld&#60/taglib-location&#62
&#60/taglib&#62
...

my jsp :
&#60%@ page language="java" %&#62
&#60%@ taglib uri="/WEB-INF/c.tld" prefix="c" %&#62
&#60%@ taglib prefix="vlh" uri="valuelist.tld" %&#62

&#60jsp:include page="entete.jsp"/&#62
&#60h2&#62Liste des articles&#60/h2&#62
&#60table border="1"&#62
&#60tr&#62
&#60th&#62NOM&#60/th&#62&#60th&#62PRIX&#60/th&#62
&#60/tr&#62
&#60c:forEach var="article" items="${listarticles}"&#62
&#60tr&#62
&#60td&#62&#60c:out value="${article.nom}"/&#62&#60/td&#62
&#60td&#62&#60c:out value="${article.prix}"/&#62&#60/td&#62
&#60td&#62&#60a href="&#60c:out value="infos.do?id=${article.id}"/&#62"&#62Infos&#60/a&#62&#60/td&#62
&#60/tr&#62
&#60/c:forEach&#62
&#60/table&#62
&#60p&#62
&#60c:out value="${message}"/&#62
&#60p&#62
&#60vlh:root value="list" url="?" includeParameters=""&#62
&#60vlh:retrieve name="playerRank"/&#62
&#60table width="95%"&#62
&#60vlh:row bean="article"&#62
&#60vlh:column title="Nom" property="nom" sortable="desc"/&#62
&#60vlh:column title="Prix" property="prix" sortable="desc"/&#62
&#60vlh:column title="Stock" property="stock" sortable="desc"/&#62
&#60/vlh:row&#62
&#60/table&#62
&#60/vlh:root&#62
&#60/body&#62
&#60/html&#62

If someone can help, i'm really lost in my webapp...
I really like to use valuelist.
 thanks for the answer.

  Message #180473 Post reply Post reply Post reply Go to top Go to top Go to top

Lost in the "ValueList" 2

Posted by: D E on August 05, 2005 in response to Message #180471
The concept of valuelist is great. Some tutorials are made but the problem is that these tutorials give us solution when all parameters are set(bean, controller...). I think that for the developpers with an experience, there is no problems to understand the tag library, and configure files like applicationcontext.xml, web.xml. And examples like valuelist.war, report.war don't work...
I want to use this technologie with spring(without Struts) only. I thought it was simple, and i'm going to go on another techno if i can't use it.

My applicationcontext.xml(I work with tomcat 4.1):
...
<bean id="myDataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://localhost:3306/dbarticles</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
<bean id="valueListHandler" singleton="true" class="net.mlw.vlh.DefaultValueListHandlerImpl">
<property name="config.adapters">
<map>
<entry key="playerRank">
<bean class="net.mlw.vlh.adapter.jdbc.dynabean.DefaultDynaBeanAdapter">
<property name="dataSource">
<ref bean="myDataSource"/>
</property>
<property name="defaultNumberPerPage">
<value>1</value>
</property>
<property name="defaultSortColumn">
<value>nom</value>
</property>
<property name="defaultSortDirection">
<value>desc</value>
</property>
<property name="sql">
<value>
SELECT NOM as nom, PRIX as prix, STOCKACTUEL as stock
FROM articles
/~sortColumn: ORDER BY [sortColumn] [sortDirection]~/
</value>
</property>
</bean>
</entry>
</map>
</property>
</bean>
...

my web.xml :
...
<taglib>
     <taglib-uri>valuelist.tld</taglib-uri>
     <taglib-location>/WEB-INF/tld/valuelist.tld</taglib-location>
</taglib>
<taglib>
     <taglib-uri>c.tld</taglib-uri>
     <taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
...

my jsp :
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib prefix="vlh" uri="valuelist.tld" %>

<vlh:root value="list" url="?" includeParameters="">
<vlh:retrieve name="playerRank"/>

<vlh:row bean="article">
<vlh:column title="Nom" property="nom" sortable="desc"/>
<vlh:column title="Prix" property="prix" sortable="desc"/>
<vlh:column title="Stock" property="stock" sortable="desc"/>
</vlh:row>

</vlh:root>

If someone can help, i'm really lost in my webapp...
I really like to use valuelist.
 thanks for the answer.

  Message #185169 Post reply Post reply Post reply Go to top Go to top Go to top

VLH With WebLogic and iBatis - Pagination did not work

Posted by: Venkat Nukala on September 20, 2005 in response to Message #123514
I tried Value List Handler with WebLogic 8.1 and iBatis. I was looking for automatic pagination. At the beginning I was not able to run the example war file. I was getting null pointer exception. Fixed that by adding a check for null in ValueListSpaceTag. I was not getting images shown and the problem was with having a context prepended to them. I started with my query in iBatis but for some reason the iBatis adapter is not supporting pagination. Does any body have any idea on why I could not get pagination working? Am I supposed to take care of that in my query?

  Message #190264 Post reply Post reply Post reply Go to top Go to top Go to top

Maintaining client state(page no) in web or data tier??

Posted by: Janardhana Rao Kotha on November 04, 2005 in response to Message #123514
I am wondering whether this adapter executes query everytime or it executes once and cache the data and return to the client when the client requests?? do you keep the client state(page no) in web/data tier?? In case if you are executing the query everytime, the data might change when the user is going to next page after he executed the search, how do you take care of this?? Appreciate any help in this regard.

-Kotha.

  Message #204890 Post reply Post reply Post reply Go to top Go to top Go to top

cache

Posted by: Matthew Wilson on March 29, 2006 in response to Message #190264
All the included adapters go to the database every time. You could write an adapter that does cache if needed.

  Message #220861 Post reply Post reply Post reply Go to top Go to top Go to top

Display tag vs value list

Posted by: Venu Thamodharan on October 24, 2006 in response to Message #204890
I am using display tag extensively and am quite impressed with it, it has pdf, excel, rtf exports, something to consider here. This requirement is definitely something I myself have seen many times in my 11 years in IT development, I wrote something similar 4 years ago with taglibs and pagination but displaytag is very good and takes away the software engineering work so I can focus on my customer's needs.

"Question every line of code that does not make your company money" Ben Hale - Interface 21 Spring instructor

Venu

  Message #223658 Post reply Post reply Post reply Go to top Go to top Go to top

Getting errors when deploying valuelist.war in tomcat 5.5

Posted by: robin bajaj on December 10, 2006 in response to Message #123514
Hi All,

I am trying to deploy the valuelist.war file in tomcat 5.5 server. I just dropped the v 0.1.8 war file in the webapps dir.

After the server starts up, it tries to run the following scripts and keeps trying again and again...

INFO: Running: /net/mlw/data/CreateTestTable.sql
Dec 10, 2006 11:29:55 PM net.mlw.util.sql.ScriptRunner executeScript
INFO: Running: /net/mlw/data/CreateTestData.sql


and eventually gets an java.lang.outOfMemory Error.

What seems to be the problem? . Is there some README.txt file that I forgot to read. Since there were no explicit setup instructions for this .war file I just dropped it in Webapps dir and assumed that it will work but it doesnt seem to be working in this case.

a) do i need to have some database product *(mySql etc.) installed on my machine before I drop this .war file in the webApps dir.

b) Is there some .xml file that has the setup information that I need to change to point to my local environment..

I am a Spring newbie so I might be missing something obvious, but some pointers would be most appreciated.

thanks ,
robin

  Message #224196 Post reply Post reply Post reply Go to top Go to top Go to top

Using Spring, Struts or similar Web MVC frameworks

Posted by: Werner Keil on December 18, 2006 in response to Message #220861
I knew Display Tags for quite a while also because they are using Maven (and I came across it when researching some "Powered By" projects for a Maven presentation I did)

Which they have in common with ValueList.

Although DisplayTags are a bit more simple to use in your own web app, I came across 2 major issues.

The first one seems acceptable, if the user's expectations cope with it. Which is, DisplayTags sorts data only within each page rather than the entire list, when paging of long lists is used. ValueList always seems to sort the entire list, even if it spreads across multiple pages.

The second one is more severe, at least in applications with massive use of Spring (or similar MVC frameworks) or also within Portlets. If you use a JSP as a View for Spring pages (should be similar for Struts ".do" actions) and use DisplayTag's paging there, it composes a URL for navigation from the underlying JSP rather than the View/Action. So an MVC application, which uses something like "list.do" backed by a "list.jsp" file faces a navigation url pointing to "list.jsp", even if that JSP should be hidden in a folder like WEB-INF/...
And this makes such an Action setup unusable!

If there are fixes/updates for DisplayTag, I'd appreciate that. However, assuming that this is not the case for the current version, I had to investigate more into ValueList at the moment. Also because its examples for multiple editable elements in a page are unique and probably only otherwise available with some of Apache's TagLibs, or commercial offerings...

The ValueList tutorial app is based on Spring (and Apache Tiles) itself, so that should answer the question, if this works for the ValueList tags ;-)

Recent active threads Recent active threads Recent active threads More More More
Need help for login page using java servlet
Stateful Webservice in java
SAP Asks Sun/Oracle to Let Java Be Free
Registration for TheServerSide Java Symposium Las Vegas now open
Use Sun SPOTs as your build canary
AspectJ In Action Published; Sample Chapters Posted on TSS
WSO2 goes all RESTy
Return to previous view after user action
Return to previous view after action
Mule Data Integrator released for graphical data transformation
More active threads »
Top posters of the weekTop posters of the weekTop posters of the week
This list contains the members who have made the most posts in all forums over the last 7 days:
  1. Dan Evans
  2. James Watson
  3. William Louth
  4. sara foster
  5. Chief Thrall
Hot threads Hot threads Hot threads More hot threads More hot threads More hot threads

Object pooling is now a serious performance loss

Brian Goetz continues to lift the lid and peak into the inner workings of Java in Java Urban Performance Legends. In this article he exposes the fallacy behind some of the more common performance myths found in the annals of the JVM.
(93 comments, last posted February 06, 2009)

Beyond Java

Bruce Tate, author of Better, Faster Lighter Java and Bitter EJB has come out with a new book called Beyond Java. Bruce has an epiphany about the future of software development. Does it include Java?
(770 comments, last posted September 23, 2009)

Three forms of AJAX: solid, liquid and gas.

Looks like today AJAX concept have several interpretations. We can distinguish different approaches of AJAX integration. Can they co-exist within the same application? Can we talk about layered AJAX integration?
(68 comments, last posted May 08, 2008)

Design-Time API Promises to make Java more like VB

Artima has published a short article describing the Design-Time API for JavaBeans, which was recently approved as JSR 273. This API promises to bring VB-like ease to Java development, but may face a cultural bias among Java developers who tend to think more in terms of class libraries than components.
(225 comments, last posted November 19, 2009)

Will Sun be that target of a management buyout?

There is plenty of speculation today regarding a potential buyout of Sun Microsystems by Scott McNealy and Silver Lake Partners. How would privatization of Sun affect Java?
(16 comments, last posted May 15, 2009)
More hot threads »

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy      Powered by JIVE
Site Map