You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2006/05/11 16:25:50 UTC

[Myfaces Wiki] Update of "Use Facelets with Tomahawk" by AlekseiValikov

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by AlekseiValikov:
http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk

The comment on the change is:
  

------------------------------------------------------------------------------
  </tag>
  }}}
  Use as standalone or add these to the taglib that is posted on Facelets wiki(link at the top of the page).
+ ----
+ If you want to use {{{<t:updateActionListener/>}}}, first get the [http://sourceforge.net/project/showfiles.php?group_id=137466&package_id=188954 TagHandlers] library from [http://jsf-comp.sourceforge.net jsf-comp]. With this library, you'll be able to use the {{{updateActionListener}}} tag with the {{{http://jsf-comp.sourceforge.net/tomahawk-taghandlers}}} namespace.
+ If you want to use the good old {{{http://myfaces.apache.org/tomahawk}}} namespace, add the following tag definition to your {{{tomahawk.taglib.xml}}}:
  
+ {{{
+ <tag>
+ 	<tag-name>updateActionListener</tag-name>
+ 	<handler-class>net.sf.jsfcomp.facelets.taghandlers.tomahawk.UpdateActionListenerHandler</handler-class>
+ </tag>
+ }}}
+ 
+ Here's an example of using the tag:
+ {{{
+ <html 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:t="http://myfaces.apache.org/tomahawk"
+ 	xmlns:c="http://java.sun.com/jstl/core">
+ 
+ ...
+ 
+ 	<ui:repeat value="#{recordTemplateBrowserBean.recordTemplateDao.recordTemplateDescriptions}" 
+ 		var="recordTemplateDescription">
+ 		<li>
+ 			<h:commandLink 
+ 				value="#{recordTemplateDescription.name}" 
+ 				action="#{recordTemplateActionBean.loadRecordTemplate}">
+ 				<t:updateActionListener property="#{recordTemplateActionBean.id}" value="#{recordTemplateDescription.id}" />
+ 			</h:commandLink>
+ 		</li>
+ 	</ui:repeat>
+ ...
+ </html>
+ }}}
+ Aleksei Valikov
+