I keep getting this error message saying:

org.apache.jasper.JasperException:
/web/registration_and_attendance_record_maintenance/find_and_list_registration.jsp(177,13)
According to TLD or attribute directive in tag file, attribute items
does not accept any expressions

I'm calling the tag like this (this is what line 177 in this JSP has):

<datagrid-ui:dataGrid items="${result.rows}" var="row" name="datagrid1" cellPadding="0" 
cellSpacing="0">

I start in this page by calling the sql query like this:

<sql:query dataSource="${utrad_db_data}" var="registrationList" scope="session">

SELECT *, registration_and_attendance.id AS registrationId FROM classes, bureaus, registration_and_attendance WHERE registration_and_attendance.id LIKE ? AND class_id LIKE ?
AND bureau_id LIKE ?
AND firstname LIKE ?
...
...

Why do I get this error message. It appears that items="${result.rows}" is not providing the kind of data the tag is expecting...


Ferindo


Néstor Boscán wrote:

Hi Ferindo

It depends on what you are using to query the database.
For example if you're using the sql:query tag from the JSTL library you just
set the query result in the "items" attribute like this:
items="${result.rows}".
If you're using JDBC directly you need to store each row in a java bean or a
map object. You put your objects in a Collection and then pass the
Collection in the "items" attribute.

Hope this helps

Regards,

Néstor Boscán

-----Mensaje original-----
De: Ferindo Middleton Jr [mailto:[EMAIL PROTECTED] Enviado el: Tuesday, August 02, 2005 9:28 PM
Para: Tag Libraries Users List
Asunto: how do you Show data from sql query result using datagrid taglib

I have installed the datagrid 1.2 taglib and have read the documentation and
looked at the examples but none of these two sources specifically show how
to use the datagrid taglib for showing the results of a database query.
Can anyone give an example of how to tie the datagrid into showing database
query/result records. I've been doing this the manual way using simple
tables and looping through query results to regular html tables fields to
populate the results of my sql queries for my application... using datagrid seems like a cleaner tool...
Also, this taglib seems to be just for viewing data but not editing it...
any one one if setting up the fields for editing is possible with this
taglib or if it is in the works wit h the developers or whether there is
another taglib  out there  that's better for this  at any rate.

Ferindo

--
Ferindo Middleton
Chief Architect
Sleekcollar.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Ferindo Middleton
Chief Architect
Sleekcollar.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to