1 Reply Latest reply on Oct 31, 2007 1:29 PM by John Smith

    ui:include with dynamic s:link

    John Smith Newbie

      Trying to use a ui:include but I need to generate dynamic s:links, not even sure it's possible, something like this:
      Page that has the ui:include

      <ui:include src="/include/pagination.xhtml">
       <ui:param name="next" value="#{listCompaniesService.next}"/>
      <ui:param name="itemCount" value="#{listCompaniesService.itemCount}"/>
       <ui:param name="batchSize" value="#{listCompaniesService.batchSize}"/> <ui:param name="firstItem" value="#{listCompaniesService.firstItem}"/> </ui:include>
      


        • 1. Re: ui:include with dynamic s:link
          John Smith Newbie

          And the page to include:

          <ui:composition xmlns="http://www.w3.org/1999/xhtml"
           xmlns:s="http://jboss.com/products/seam/taglib"
           xmlns:ui="http://java.sun.com/jsf/facelets"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:h="http://java.sun.com/jsf/html">
           <!-- FIRST -->
           <s:div id="tabcontainer" rendered="#{firstItem &lt; batchSize}">
           <s:div styleClass="pageresults" rendered="#{itemCount &gt; 0}">
           <div class="middle_highlight">
           <h:outputText value="#{firstItem + 1} ... #{itemCount &lt; firstItem + batchSize ? itemCount : firstItem + batchSize}"/>
           </div>
           </s:div>
           <s:div styleClass="pageresults" rendered="#{itemCount &gt; batchSize}">
           <s:link styleClass="middle" action="#{next}" value="#{firstItem + batchSize + 1} ... #{itemCount &lt;= firstItem + (batchSize * 2) ? itemCount : firstItem + (batchSize * 2)}"></s:link>
           </s:div>
          ......


          To sum up, the dynamic s:link is:

          <s:link styleClass="middle" action="#{next}" value...

          can it be done?