Hi all,
I don't use Java in my day job, I have been playing with it at home
but unfortunately not recently due to real life intruding (=I'm
pretty ignorant of Java). I would appreciate it if my understanding
of how to use displaytag could be confirmed to make sure I am heading
in the right direction.
I have gotten displaytag running in a jsp page, producing output but
from looking at the source for ListObject and TestList I need to do
more processing to get the correct output. I'm getting the data from
a database (JSTL sql taglib), this is what I am doing to get it into
displaytag:
<c:set var="rows" value="${rs.rows}" />
<%
Object[] rows = (Object[]) pageContext.findAttribute("rows");
List testList = Arrays.asList(rows);
%>
<%
request.setAttribute( "testList", testList );
%>
<display:table name="testList" class="its" />
The output isn't pretty:
Please provide column tags
{lPartNumber=249, sPartDescrip=new partx}...
I assume I need a class that has getters and setters that match up to
the fields in the database to hold the data I want to display. I
would step through the results of the the query setting each variable
and then add the class to a List object that I pass to displaytag?
Is there a better way to do this?
Also, I have the source for ListObject and TestList in a directory
along with the jar for commons lang but when I try to compile
ListObject the compiler says it can't find org.apache... I tried
setting a classpath variable (win 2K) to the directory where these
files were located but it didn't help. I know this is very basic
Java but I would appreciate it too if somebody could tell me how to
set things up so I could compile these files (I'm just using
Ultraedit and command line javac compiling).
Thanks,
Eric
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user