File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes displaytag decorator problem in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "displaytag decorator problem in struts" Watch "displaytag decorator problem in struts" New topic

displaytag decorator problem in struts

rodgers tang

Joined: Mar 11, 2005
Posts: 7
Hi all,

I use displaytag decorator to link table. After creating getLink() class, I start this web page. But this page become blank.I do not why.

Thanks for help.

H Tang
Ann Maria

Joined: Sep 09, 2005
Posts: 27
Please forward the <display:table> code,getLink() code and the action from you get the data to display tag..
rodgers tang

Joined: Mar 11, 2005
Posts: 7
Hi ann,

Following is some code:

jsp page:
<display:table name="requestScope.rowSet.rows" id="testit"
requestURI="" sort="list" pagesize="12" defaultsort="3" align="center" width="945" decorator="rain.TableLink" >
<display:column sortable="true" property="server" title="Server" headerClass="sortable" />
<display:column sortable="true" property="outage_type" title="Outage Type" headerClass="sortable" /> // outage_type is database col name.
<display:column sortable="true" property="outage_start" title="Outage start" />

TableLink java Code:
public class TableLink extends TableDecorator {

/** Creates a new instance of TableLink */
public TableLink() {
RowSetDynaClass obj=null;
public String getOutage_type(){

UserDAOBean map1 = (UserDAOBean)getCurrentRowObject();
String aa=map1.getOutageType();

return "<a href=\"tableLinks.jsp?id= "+ aa + "&action=view\" /a>";


Action form code:
public class SubmitFISReportFormAction extends Action {

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {

try {
String outageType=(String)PropertyUtils.getSimpleProperty(form,"outageType"); //get form value
String serverName=(String)PropertyUtils.getSimpleProperty(form,"serverName");
String startDate=(String)PropertyUtils.getSimpleProperty(form,"startDate");
String endDate=(String)PropertyUtils.getSimpleProperty(form,"endDate");

UserDAOBean bean = new UserDAOBean(serverName,outageType,startDate,endDate);
RowSetDynaClass rowSet= bean.getUsersRowSet();
request.setAttribute("rowSet", rowSet);
catch(Exception ex) {


return mapping.findForward("success");

If I do not use decorator, outputing table is fine.

Thanks for help.

H tang
I agree. Here's the link:
subject: displaytag decorator problem in struts
It's not a secret anymore!