[jboss-user] [JBoss Seam] - Re: How to make a shared yes/no or ok/cancel page

petemuir do-not-reply at jboss.com
Tue Oct 3 13:19:52 EDT 2006


The faceelets reference manual gives the bare bones, 
https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-create-source
and unfortunately the facelets example have nothing on this.

So

yesNoButtons.xhtml
html xmlns="http://www.w3.org/1999/xhtml"
  |     xmlns:ui="http://java.sun.com/jsf/facelets"
  |     xmlns:h="http://java.sun.com/jsf/html">
  | <ui:composition>
  |     <h:commandButton value="Yes" action="#{yesBean[yesAction]}"/> <h:commandButton value="No" action="#{noBean[noAction]}"/>
  | </ui:composition>
  | </html>

examplePage.xhtml
...
  | xmlns:my="http://my.com/jsf/my"
  | ...
  | my:yesNoButtons yesBean="#{user}" yesAction="deleteUser" noBean="#{city}" noAction="deleteCity" />
  | ...

Wiring

my.taglib.xml

  | <!DOCTYPE facelet-taglib PUBLIC 
  |   "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
  |   "http://java.sun.com/dtd/faces-taglib_1_0.dtd">
  | 
  | <facelet-taglib>
  | 	<namespace>http://my.com/jsf/my</namespace>
  |         <tag>
  | 		<tag-name>yesNoButtons</tag-name>
  | 		<source>yesNoButtons.xhtml</source>
  | 	</tag>
  | </facelet-taglib>

web.xml
...
  |    <context-param>
  |         <param-name>facelets.LIBRARIES</param-name>
  |         <param-value>/WEB-INF/my.taglib.xml</param-value>
  |     </context-param>
  | ...

Pub my.taglib.xml and yesNoButtons.xhtml in WEB-INF

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975838#3975838

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975838



More information about the jboss-user mailing list