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>
|
with 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 <
batchSize}">
| <s:div styleClass="pageresults" rendered="#{itemCount >
0}">
| <div class="middle_highlight">
| <h:outputText value="#{firstItem + 1} ... #{itemCount
< firstItem + batchSize ? itemCount : firstItem + batchSize}"/>
| </div>
| </s:div>
| <s:div styleClass="pageresults" rendered="#{itemCount >
batchSize}">
| <s:link styleClass="middle" action="#{next}"
value="#{firstItem + batchSize + 1} ... #{itemCount <= firstItem + (batchSize *
2) ? itemCount : firstItem + (batchSize * 2)}"></s:link>
| </s:div>
| <s:div styleClass="pageresults" rendered="#{itemCount >
(batchSize * 2)}">
| <s:link styleClass="middle" action="#{next}"
value="#{firstItem + 21} ... #{itemCount <= firstItem + 30 ? itemCount :
firstItem + batchSize + (batchSize * 2)}"></s:link>
| </s:div>
| </s:div>
| ....
|
the dynamic s:link is found at :
<s:link styleClass="middle" action="#{next}" ...
In my head I think it won't be possible, unless maybe constructing a <a href
manually, but anyone done it?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100792#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...