[jboss-cvs] jboss-seam/examples/ui/view ...

Peter Muir peter at bleepbleep.org.uk
Wed Mar 28 08:52:13 EDT 2007


  User: pmuir   
  Date: 07/03/28 08:52:13

  Modified:    examples/ui/view    template.xhtml
  Added:       examples/ui/view    cache.xhtml linkAndButton.xhtml
  Log:
  More ui examples, better ant integration for cdk, lots of fixes to button and link
  
  Revision  Changes    Path
  1.3       +6 -3      jboss-seam/examples/ui/view/template.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: template.xhtml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/ui/view/template.xhtml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- template.xhtml	23 Mar 2007 20:25:34 -0000	1.2
  +++ template.xhtml	28 Mar 2007 12:52:13 -0000	1.3
  @@ -61,7 +61,6 @@
   		<li><s:link view="/selectItems.xhtml" propagation="join">
   			<code>s:selectItems</code>
   			<f:param name="personId" value="1" />
  -			<s:conversationPropagation type="join" />
   		</s:link></li>
   		<li><s:link view="/fragment.xhtml" propagation="none">
   			<code>s:fragment</code>
  @@ -69,12 +68,16 @@
   		<li><s:link view="/formattedText.xhtml" propagation="join">
   			<code>s:formattedText</code>
   			<f:param name="personId" value="1" />
  -			<s:conversationPropagation type="join" />
   		</s:link></li>
   		<li><s:link view="/fileUpload.xhtml" propagation="join">
   			<code>s:fileUpload</code>
   			<f:param name="personId" value="1" />
  -			<s:conversationPropagation type="join" />
  +		</s:link></li>
  +		<li><s:link view="/linkAndButton.xhtml" propagation="none">
  +			<code>s:button</code> and <code>s:link</code>
  +		</s:link></li>
  +		<li><s:link view="/cache.xhtml" propagation="none">
  +			<code>s:cache</code>
   		</s:link></li>
   	</ul>
   </s:div>
  
  
  
  1.1      date: 2007/03/28 12:52:13;  author: pmuir;  state: Exp;jboss-seam/examples/ui/view/cache.xhtml
  
  Index: cache.xhtml
  ===================================================================
  <!DOCTYPE html 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:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:s="http://jboss.com/products/seam/taglib"
        template="template.xhtml"
        >
  	<ui:param name="tagName" value="s:cache" />
  	<ui:define name="body">
  		<p>Cache the rendered page fragment using JBoss Cache. Note that s:cache actually uses the instance of JBoss Cache managed by the built-in pojoCache component.</p>	
  		<s:cache key="example">Some cached text</s:cache>
  	</ui:define>
  </ui:composition>
  
  
  1.1      date: 2007/03/28 12:52:13;  author: pmuir;  state: Exp;jboss-seam/examples/ui/view/linkAndButton.xhtml
  
  Index: linkAndButton.xhtml
  ===================================================================
  <!DOCTYPE html 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:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:s="http://jboss.com/products/seam/taglib"
        template="template.xhtml"
        >
  	<ui:param name="tagName" value="s:link/s:button" />
  	<ui:define name="body">
  		<p>A link/button that supports invocation of an action with control over conversation propagation. <i>Does not submit the form.</i></p>
  		<p>Some of the things you can do with a s:link or s:button:</p>
  		<h:panelGrid columns="3">
  			<h:outputText value="Jump to a fragment on a view" />
  			<s:link view="/linkAndButton.xhtml" fragment="fragment" value="Jump" />
  			<s:button view="/linkAndButton.xhtml" fragment="fragment" value="Jump" />
  			
  			<h:outputText value="Link on children" />
  			<s:link view="/linkAndButton.xhtml">Link</s:link>
  			<h:outputText value="N/A" />
  			
  			<h:outputText value="Do an action" />
  			<s:link action="#{buttonLink.simpleAction}" value="Do action" />
  			<s:button action="#{buttonLink.simpleAction}" value="Do action" />
  			
  			<h:outputText value="Disabled" />
  			<s:link action="#{buttonLink.simpleAction}" value="Do action" disabled="true"/>
  			<s:button action="#{buttonLink.simpleAction}" value="Do action" disabled="true"/>
  			
  			<h:outputText value="Conversation Propagation" />
  			<s:link view="/linkAndButton.xhtml" value="Begin conversation" propagation="begin" />
  			<s:button view="/linkAndButton.xhtml" value="End conversation">
  				<s:conversationPropagation type="end" />
  			</s:button>
  			
  			<h:outputText value="Page parameters" />
  			<s:link view="/linkAndButton.xhtml" value="Add a page parameter">
  				<f:param name="foo" value="bar" />
  			</s:link>
  			<s:button action="#{buttonLink.simpleAction}" value="Add a page parameter">
  				<f:param name="foo" value="bar" />
  			</s:button>
  		</h:panelGrid>
  		<p>You can also start a pageflow or start/resume a task - this isn't demonstrated here.</p>
  		<p><a name="fragment">A fragment to jump to</a></p>
  	</ui:define>
  </ui:composition>
  
  



More information about the jboss-cvs-commits mailing list