• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF2, facelets and custom tag.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want do do something like this:

Define custom facelets tag in xhtml file:

myDatatable.xhtml

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"

<p:dataTable id="datatable" var="user" value="#{datamodel}" rows="10" lazy="true" rowsPerPageTemplate="10,15,50">

!!!???!!!

</p:dataTable>

</ui:composition


and i want to use my tag like this: (name of tag in definition is myDatatable) and it was definied on page as customTag

page using my myDatatable tag
<customTag:myDatatable datamodel="#{userListDataModel}">

<p:column>
<f:facet name="header">
<h:outputText value="Username" />
</f:facet>

<h:link value="#{user.username}" outcome="userDetails.jsf" >
<f:param name="userId" value="#{user.id}" />
</h:link>

</p:column>

<p:column>
<f:facet name="header">
<h:outputText value="email" />
</f:facet>
<h:outputText value="#{user.email}" />
</p:column>



</customTag:myDatatable>

My question is what can I put into !!!???!!! line of my custome tag to process/redered body of my customTag:myDatatable
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"jsf begginer",

We don't have many rules here at the JavaRanch, but we do insist that you use your Real Name and not some sort of "handle" or obvious alias. If you're not sure about this, see
http://www.javaranch.com/name.jsp .
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic