Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=3468502
By: chriscw
Hi,
I use JSTL sql tag library to generate a result set (flst) based on the
following
SQL query:
select group_name from user_groups as c where c.login_id like 'xxx' order by
c.group_name
I use the following displaytag table to display result.
<display:table name="${flst.rows}" pagesize="25" defaultsort="1"
defaultorder="ascending" export="true">
<display:column property="group_name" title="Group Name"
sortable="true"/>
</display:table>
I'd like to add one more column after group_name that displays a HTML link based
on the group_name. I changed the table code into:
<display:table name="${flst.rows}" pagesize="25" defaultsort="1"
defaultorder="ascending" export="true"
decorator="org.displaytag.customize.Wrapper">
<display:column property="group_name" title="Group Name"
sortable="true"/>
<display:column property="groupFiles" title="Group Name" />
</display:table>
Below is the code I wrote for the wrapper.java program.
package org.displaytag.customize;
import org.displaytag.decorator.TableDecorator;
public class Wrapper
extends TableDecorator
{
public String group_name;
public String getGroupFiles()
{
Wrapper object = (Wrapper)getCurrentRowObject();
String groupName = object.getGroup_name();
return "<a href=\cfor.jsp?groupName=" + groupName +"\>Files
Owned</a>";
}
public String getGroup_name ()
{
return group_name;
}
public void setGroup_name (String value)
{
group_name = value;
}
}
I am getting the following errors:
javax.servlet.ServletException: Error looking up property "groupFiles" in object
type "org.displaytag.customize.Wrapper".
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl
.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j
ava:781)
org.apache.jsp.cur_jsp._jspService(org.apache.jsp.cur_jsp:260)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Obviously, I am kind of new to the Java and displaytag library. Can anyone here
point out what I did wrong?
Thanks,
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=249318
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user