can someone tell me how to override the content of a JSF rich dataTable with another content.. I have a commandLink, which redirects me to another page when clicking on a name. The destinationPage I want to appear instead of the table witch has the commandLink in it.
in list.xhtml(welcome file) I have something like:
<ui:define name="content">
<h2>Auction List</h2>
<ui:fragment>
<a:auctionList auctions="#{auctionManager.all}" />
</ui:fragment>
<ui:fragment rendered="#{auctionManager.page eq 'detail'}">
<ui:include src="detailEnglishType.xhtml" />
</ui:fragment>
</ui:define>
the page is set througt this method:
public void init()
{
if(currentAuction==null)
{
Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String id = params.get("auctionId");
long longId = Long.parseLong((id));
this.currentAuction = em.find(Auction.class, longId);
}
this.setPage("detail"); //++ getters,setters
}
method "init" is called in a commandLink:
<rich:column sortBy="#{auct.name}" sortOrder="ascending" >
<h:commandLink value="#{auct.name}" action="#{auctionManager.init()}">
<f:param name="auctionId" value="#{auct.id}"/></h:commandLink>
</rich:column>
all I want is: <ui:define name="content">
to be replaced by another <ui:define name="content">
defined in destinatin page
Thanks in advance