Menu

using JSF commandLinks in column values

Help
Brian
2006-04-06
2012-10-09
  • Brian

    Brian - 2006-04-06

    I am attempting to overcome the problem with integrating JSF <h:commandLink> tags into my table values. Has anyone successfully implemented this?

    I have seen a code example from Matt Raible in numerous places on the web, but I cannot manage to get my code working from his example.

    Any ideas?

     
    • Brian

      Brian - 2006-04-07

      Aside from all the setup info on the displayTag site, these are the two key things that helped get us using the library in our JSF app.

      1. In order to pull in your data, you should insert a dummy JSF dataTable prior to your displayTag table. Set the style to "display:none" so that this table is not rendered. It's only there to pull in the data from the JSF bean manager.

      2. In order to get your column sorting working properly, you need to correctly set the requestURI attribute for the table to be the current page in your faces world.

      Apologies if this is misleading. I'm a newbie web and JSF developer. Hopefully this small code snippet formats properly...

      <h:dataTable var="foo" value="#{sessionDetails.sessions}" style="display:none" />

      <display:table name="sessionScope.sessionDetails.sessions" class="dataTable" requestURI="/jsp/SessionDetails.faces">
      <display:column property="sessionId" sortable="true"/>
      <display:column property="sessName"/>
      .....
      </display:table>

       
      • djcorerk

        djcorerk - 2007-08-21

        Hi Brain

        Can you guys post some more Links for using Display Tags with JSF

        Thanks

         
    • Brian

      Brian - 2006-04-06

      Forgot to mention that, aside from this particular issue, I am happily and successfully using displayTag (including sorting and paging) in my JSF-based app. The problem now is turning some of those static data entries into drilldowns that pass control along to the JSF controller.

       
      • feroz

        feroz - 2006-04-07

        hi brian,
        i am trying to get displaytag working with JSF as well. i was hoping to get some help from you since you have managed to get it working. if you could send some useful links that will be very helpful of you.

        thanks in advance and i am happy to hear displaytag works with JSF.

         
    • Brian

      Brian - 2006-04-07

      Aside from all the setup info on the displayTag site, these are the two key things that helped get us using the library in our JSF app.

      1. In order to pull in your data, you should insert a dummy JSF dataTable prior to your displayTag table.

      <h:dataTable var="foo" value="#{sessionDetails.sessions}" style="display:none" />

      <display:table name="sessionScope.sessionDetails.sessions" class="dataTable" requestURI="/jsp/SessionDetails.faces">
      <display:column property="sessionId" titleKey="publi.sessionId" sortable="true"/>

       

Log in to post a comment.