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?
-
Value List Handler - looking for feedback (37 messages)
- Posted by: Matthew Wilson
- Posted on: May 26 2004 12:47 EDT
Threaded Messages (37)
- Value List Handler - looking for feedback by Ravindranath Mangalagiri on May 26 2004 15:29 EDT
- Value List Handler - looking for feedback by Matthew Wilson on May 26 2004 16:53 EDT
-
I have been disappointed with the amount of feedback. by Matthew Wilson on June 07 2004 01:44 EDT
-
I have been disappointed with the amount of feedback. by Ravindranath Mangalagiri on June 07 2004 05:32 EDT
- How are you using it? by Matthew Wilson on June 16 2004 01:48 EDT
-
I have been disappointed with the amount of feedback. by Ravindranath Mangalagiri on June 07 2004 05:32 EDT
-
Web Standards Support by Kim Pepper on July 07 2004 01:42 EDT
- RE: Web Standards Support??? by Matthew Wilson on July 15 2004 08:41 EDT
-
I have been disappointed with the amount of feedback. by Matthew Wilson on June 07 2004 01:44 EDT
- When Datasource is configured by the admin appserver ... by Chris Rob on August 06 2004 02:58 EDT
- When Datasource is configured by the admin appserver ... by Luke Groundwalker on August 17 2004 11:38 EDT
- Editable grid feature by kumar vishwanath on February 10 2005 18:08 EST
- Can you provide the latest source code zip for download by kumar vishwanath on February 18 2005 09:25 EST
- Can you provide the latest source code zip for download by Matthew Wilson on February 23 2005 01:43 EST
- Value List Handler - looking for feedback by Matthew Wilson on May 26 2004 16:53 EDT
- valuelist.war in Tomcat-4.1.29 has error: net.mlw.vlh.adapter.fi by Wiwit Tjahjana on July 15 2004 11:35 EDT
- Just fixed that. by Matthew Wilson on July 15 2004 14:24 EDT
-
Where are the docs? by Twice Tshwenyane on July 22 2004 07:59 EDT
-
Start with the Overview by Matthew Wilson on July 22 2004 11:48 EDT
- Start with the Overview by Twice Tshwenyane on July 23 2004 03:14 EDT
-
Start with the Overview by Matthew Wilson on July 22 2004 11:48 EDT
-
Where are the docs? by Twice Tshwenyane on July 22 2004 07:59 EDT
- Just fixed that. by Matthew Wilson on July 15 2004 14:24 EDT
- how about ibatis Adapter? by zhang long on July 23 2004 03:06 EDT
- how about ibatis Adapter? by Matthew Wilson on August 04 2004 10:33 EDT
- Some question by Marco Baraldi on August 05 2004 08:13 EDT
- Some question by Matthew Wilson on August 16 2004 18:01 EDT
- Value List Handler - looking for feedback by Gabriel Nascimento on August 12 2004 14:55 EDT
- Value List Handler - looking for feedback by Matthew Wilson on August 16 2004 18:04 EDT
- Is this vlh project independent from any framework? by esahu perez on January 11 2005 00:50 EST
- Is the ValueList good enough to handle 3000 or more records by kumar vishwanath on February 10 2005 18:23 EST
- valuelist and struts by richard tuquet laburre on March 09 2005 09:00 EST
- valuelist and struts by F. A. on April 07 2005 11:32 EDT
- vlh with struts... by Matthew Wilson on April 14 2005 03:50 EDT
- valuelist and struts by F. A. on April 07 2005 11:32 EDT
- Need more documentation by Ben Shamsian on July 11 2005 04:32 EDT
- Lost in the "ValueList" by D E on August 05 2005 10:43 EDT
- Lost in the "ValueList" 2 by D E on August 05 2005 10:50 EDT
- VLH With WebLogic and iBatis - Pagination did not work by Venkat Nukala on September 20 2005 12:40 EDT
- Maintaining client state(page no) in web or data tier?? by Janardhana Rao Kotha on November 04 2005 22:45 EST
- cache by Matthew Wilson on March 29 2006 10:41 EST
-
Display tag vs value list by Venu Thamodharan on October 24 2006 11:03 EDT
- Using Spring, Struts or similar Web MVC frameworks by Werner Keil on December 18 2006 01:00 EST
-
Display tag vs value list by Venu Thamodharan on October 24 2006 11:03 EDT
- cache by Matthew Wilson on March 29 2006 10:41 EST
- Getting errors when deploying valuelist.war in tomcat 5.5 by robin bajaj on December 10 2006 23:40 EST
-
Value List Handler - looking for feedback[ Go to top ]
- Posted by: Ravindranath Mangalagiri
- Posted on: May 26 2004 15:29 EDT
- in response to Matthew Wilson
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 -
Value List Handler - looking for feedback[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: May 26 2004 16:53 EDT
- in response to Ravindranath Mangalagiri
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.
The valuelist.war has plenty of examples using the DefaultDynAdapter with my custom taglibs.
-ravi
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 -
I have been disappointed with the amount of feedback.[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: June 07 2004 13:44 EDT
- in response to Matthew Wilson
:( -
I have been disappointed with the amount of feedback.[ Go to top ]
- Posted by: Ravindranath Mangalagiri
- Posted on: June 07 2004 17:32 EDT
- in response to Matthew Wilson
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 -
How are you using it?[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: June 16 2004 13:48 EDT
- in response to Ravindranath Mangalagiri
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? -
Web Standards Support[ Go to top ]
- Posted by: Kim Pepper
- Posted on: July 07 2004 01:42 EDT
- in response to Matthew Wilson
I would consider such a tag library being much more useful if it generated valid XHML. http://validator.w3.org/ -
RE: Web Standards Support???[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: July 15 2004 08:41 EDT
- in response to Kim Pepper
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&age=54Line 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 -
When Datasource is configured by the admin appserver ...[ Go to top ]
- Posted by: Chris Rob
- Posted on: August 06 2004 02:58 EDT
- in response to Ravindranath Mangalagiri
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 -
When Datasource is configured by the admin appserver ...[ Go to top ]
- Posted by: Luke Groundwalker
- Posted on: August 17 2004 11:38 EDT
- in response to Chris Rob
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. -
Editable grid feature[ Go to top ]
- Posted by: kumar vishwanath
- Posted on: February 10 2005 18:08 EST
- in response to Ravindranath Mangalagiri
Hi Wilson,
(1) How do you implement editable grids?And save the records using hibernate in one batch
Regards
KumarV -
Can you provide the latest source code zip for download[ Go to top ]
- Posted by: kumar vishwanath
- Posted on: February 18 2005 09:25 EST
- in response to Ravindranath Mangalagiri
Can you provide the latest source code zip for download -
Can you provide the latest source code zip for download[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: February 23 2005 13:43 EST
- in response to kumar vishwanath
its in cvs at valuelist.sourceforge.net -
valuelist.war in Tomcat-4.1.29 has error: net.mlw.vlh.adapter.fi[ Go to top ]
- Posted by: Wiwit Tjahjana
- Posted on: July 15 2004 11:35 EDT
- in response to Matthew Wilson
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) -
Just fixed that.[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: July 15 2004 14:24 EDT
- in response to Wiwit Tjahjana
I have a bug in my maven build process. Give it another try. -
Where are the docs?[ Go to top ]
- Posted by: Twice Tshwenyane
- Posted on: July 22 2004 07:59 EDT
- in response to Matthew Wilson
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. -
Start with the Overview[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: July 22 2004 23:48 EDT
- in response to Twice Tshwenyane
-
Start with the Overview[ Go to top ]
- Posted by: Twice Tshwenyane
- Posted on: July 23 2004 03:14 EDT
- in response to Matthew Wilson
-
how about ibatis Adapter?[ Go to top ]
- Posted by: zhang long
- Posted on: July 23 2004 03:06 EDT
- in response to Matthew Wilson
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! -
how about ibatis Adapter?[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: August 04 2004 10:33 EDT
- in response to zhang long
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. -
Some question[ Go to top ]
- Posted by: Marco Baraldi
- Posted on: August 05 2004 08:13 EDT
- in response to Matthew Wilson
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 -
Some question[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: August 16 2004 18:01 EDT
- in response to Marco Baraldi
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
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!
collection in enough.RegarsMarco -
Value List Handler - looking for feedback[ Go to top ]
- Posted by: Gabriel Nascimento
- Posted on: August 12 2004 14:55 EDT
- in response to Matthew Wilson
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! -
Value List Handler - looking for feedback[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: August 16 2004 18:04 EDT
- in response to Gabriel Nascimento
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? -
Is this vlh project independent from any framework?[ Go to top ]
- Posted by: esahu perez
- Posted on: January 11 2005 00:50 EST
- in response to Matthew Wilson
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? -
Is the ValueList good enough to handle 3000 or more records[ Go to top ]
- Posted by: kumar vishwanath
- Posted on: February 10 2005 18:23 EST
- in response to Matthew Wilson
(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? -
valuelist and struts[ Go to top ]
- Posted by: richard tuquet laburre
- Posted on: March 09 2005 09:00 EST
- in response to Matthew Wilson
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) -
valuelist and struts[ Go to top ]
- Posted by: F. A.
- Posted on: April 07 2005 11:32 EDT
- in response to richard tuquet laburre
Did you ever figure out how to do it? -
vlh with struts...[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: April 14 2005 15:50 EDT
- in response to F. A.
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. -
Need more documentation[ Go to top ]
- Posted by: Ben Shamsian
- Posted on: July 11 2005 04:32 EDT
- in response to Matthew Wilson
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. -
Lost in the "ValueList"[ Go to top ]
- Posted by: D E
- Posted on: August 05 2005 10:43 EDT
- in response to Matthew Wilson
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ɭ</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" %>
<jsp:include page="entete.jsp"/>
<h2>Liste des articles</h2>
<table border="1">
<tr>
<th>NOM</th><th>PRIX</th>
</tr>
<c:forEach var="article" items="${listarticles}">
<tr>
<td><c:out value="${article.nom}"/></td>
<td><c:out value="${article.prix}"/></td>
<td><a href="<c:out value="infos.do?id=${article.id}"/>">Infos</a></td>
</tr>
</c:forEach>
</table>
<p>
<c:out value="$null"/>
<p>
<vlh:root value="list" url="?" includeParameters="">
<vlh:retrieve name="playerRank"/>
<table width="95%">
<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>
</table>
</vlh:root>
</body>
</html>
If someone can help, i'm really lost in my webapp...
I really like to use valuelist.
thanks for the answer. -
Lost in the "ValueList" 2[ Go to top ]
- Posted by: D E
- Posted on: August 05 2005 10:50 EDT
- in response to D E
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. -
VLH With WebLogic and iBatis - Pagination did not work[ Go to top ]
- Posted by: Venkat Nukala
- Posted on: September 20 2005 12:40 EDT
- in response to Matthew Wilson
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? -
Maintaining client state(page no) in web or data tier??[ Go to top ]
- Posted by: Janardhana Rao Kotha
- Posted on: November 04 2005 22:45 EST
- in response to Matthew Wilson
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. -
cache[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: March 29 2006 10:41 EST
- in response to Janardhana Rao Kotha
All the included adapters go to the database every time. You could write an adapter that does cache if needed. -
Display tag vs value list[ Go to top ]
- Posted by: Venu Thamodharan
- Posted on: October 24 2006 23:03 EDT
- in response to Matthew Wilson
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 -
Using Spring, Struts or similar Web MVC frameworks[ Go to top ]
- Posted by: Werner Keil
- Posted on: December 18 2006 13:00 EST
- in response to Venu Thamodharan
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 ;-) -
Getting errors when deploying valuelist.war in tomcat 5.5[ Go to top ]
- Posted by: robin bajaj
- Posted on: December 10 2006 23:40 EST
- in response to Matthew Wilson
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