1 Reply Latest reply on May 14, 2007 12:21 PM by Ian Ouzounov

    StyleSheet not Working in DisplayTag Library

    Andre Gustavo Lomonaco Newbie

      Hi,

      I'm trying to use a simple example using DisplayTag but the stylesheet is
      not working.

      Here the Example Live

      http://ipplus.dyndns.org:8080/portal/portal/default/DisplayTagPortlet

      What I did so far:

      The Steps

      1) Installed jboss-portal-2.6-CR1-bundled.zip
      2) Download displaytag-1.1-bin.zip
      3) Copy displaytag-1.1.jar to my WEB-INF/lib Portlet
      4) Copy the following Libraries to $JBOSS_HOME/server/default/lib
      commons-lang
      commons-beanutils
      itext
      displaytag-export-poi.jar
      poi.jar

      5) Put displaytag-portlet-1.1.jar inside WEB-INF/lib

      6) Create the displaytag.properties file in WEB-INF directory

      
      #sort.behavior=list
      #sort.amount=list
      #basic.empty.showtable=true
      #basic.msg.empty_list=No results matched your criteria.
      #paging.banner.placement=top
      #paging.banner.onepage=<span class="pagelinks"></span>
      export.types=csv excel xml pdf rtf
      export.excel=true
      export.csv=true
      export.xml=true
      export.pdf=true
      export.rtf=true
      export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
      export.pdf.class=org.displaytag.export.DefaultPdfExportView
      export.rtf.class=org.displaytag.export.DefaultRtfExportView
      factory.requestHelper=org.displaytag.util.DefaultRequestHelperFactory
      factory.requestHelper=org.displaytag.portlet.PortletRequestHelperFactory
      # if set, file is downloaded instead of opened in the browser window
      #export.[mymedia].filename=
      
      


      7) Create the following JSP Page

      <jsp:directive.page import="org.displaytag.sample.*" />
      <%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
      <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
      
      <portlet:defineObjects/>
      
      <% request.setAttribute( "test", new TestList(10, false) ); %>
      <display:table name="test"/>
      
      


      8) Importing CSS

      Copy the ccs directory from the displaytag example to the root of my portlet

      9) Change the jboss-portlet.xml file

      <portlet-app>
       <portlet>
       <portlet-name>PortletName</portlet-name>
       <header-content>
      <link type='text/css' rel='stylesheet' href='css/teststyles.css'/>
      <link type='text/css' rel='stylesheet' href='css/site.css'/>
      <link type='text/css' rel='stylesheet' href='css/screen.css'/>
      <link type='text/css' rel='stylesheet' href='css/print.css'/>
      <link type='text/css' rel='stylesheet' href='css/displaytag.css'/>
      <link type='text/css' rel='stylesheet' href='css/alternative.css'/>
       </header-content>
       </portlet>
      </portlet-app>
      


      Any Help or tip ?

      Thanks in Advanced

      Andre Lomonaco