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

Peter Muir peter at bleepbleep.org.uk
Sat Jul 14 19:48:39 EDT 2007


  User: pmuir   
  Date: 07/07/14 19:48:39

  Added:       examples/seamdiscs/view               artists.page.xml
                        login.page.xml discs.xhtml login.xhtml
                        artist.page.xml index.html disc.xhtml home.xhtml
                        error.xhtml home.page.xml discs.page.xml
                        artists.xhtml disc.page.xml artist.xhtml
  Log:
  Move seamdiscs example, upgrade it to Trinidad 1.2.1
  
  Revision  Changes    Path
  1.3       +4 -4      jboss-seam/examples/seamdiscs/view/artists.page.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: artists.page.xml
  ===================================================================
  RCS file: artists.page.xml
  diff -N artists.page.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ artists.page.xml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,14 @@
  +<!DOCTYPE page PUBLIC
  +          "-//JBoss/Seam Pages Configuration DTD 2.0//EN"
  +          "http://jboss.com/products/seam/pages-2.0.dtd">
  +
  +<page>
  +   <param name="artistId" value="#{artistHome.id}" converterId="javax.faces.Integer"/>
  +   <param name="type" value="#{artistHome.type}"/> 
  +   <navigation>
  +   	<rule if-outcome="artist">
  +	   	<begin-conversation flush-mode="manual" join="true"/> 
  +   		<redirect view-id="/artist.xhtml"/>	
  +   	</rule>
  +   </navigation>
  +</page>
  
  
  
  1.3       +3 -3      jboss-seam/examples/seamdiscs/view/login.page.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: login.page.xml
  ===================================================================
  RCS file: login.page.xml
  diff -N login.page.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ login.page.xml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,11 @@
  +<!DOCTYPE page PUBLIC
  +          "-//JBoss/Seam Pages Configuration DTD 2.0//EN"
  +          "http://jboss.com/products/seam/pages-2.0.dtd">
  +
  +<page>
  +   <navigation from-action="#{identity.login}">
  +      <rule if="#{identity.loggedIn}">
  +         <redirect view-id="/home.xhtml"/>
  +      </rule>
  +   </navigation>
  +</page>
  
  
  
  1.3       +1 -3      jboss-seam/examples/seamdiscs/view/discs.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: discs.xhtml
  ===================================================================
  RCS file: discs.xhtml
  diff -N discs.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ discs.xhtml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,51 @@
  +<!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:s="http://jboss.com/products/seam/taglib"
  +                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:rich="http://richfaces.ajax4jsf.org/rich"
  +                xmlns:tr="http://myfaces.apache.org/trinidad"
  +                template="layout/template.xhtml">
  +
  +<ui:define name="body">
  +    
  +    <rich:panel>
  +    <f:facet name="header">Discs</f:facet>
  +    	<tr:panelPartialRoot>
  +	    	<tr:form>
  +		    	<tr:table value="#{discs.dataModel}" var="disc" rows="#{discs.maxResults}">
  +		    		<tr:column sortable="true" sortProperty="disc.name">
  +		    			<f:facet name="header">
  +		    				Name
  +		    			</f:facet>
  +		    			<s:link action="disc">
  +		    				<tr:outputText value="#{disc.name}" />
  +		    				<f:param name="discId" value="#{disc.id}" />
  +		    			</s:link>
  +		    		</tr:column>
  +		    		<tr:column>
  +		    			<f:facet name="header">
  +		    				Artist
  +		    			</f:facet>
  +		    			<tr:outputText value="#{disc.artist.name}" />
  +		    		</tr:column>
  +		    		<f:facet name="detailStamp">
  +		    			<s:div style="width: 200px">
  +			    			<s:formattedText value="#{disc.description}" rendered="#{not empty disc.description}"  />
  +			    			<tr:outputText value="None known" rendered="#{empty disc.description}" />
  +			    		</s:div>
  +		    		</f:facet>
  +		    	</tr:table>
  +		    	<tr:panelButtonBar rendered="#{identity.loggedIn}">
  +			    	<s:button action="disc" value="Add disc">
  +			    		<f:param name="discId" value="" />
  +		    		</s:button>
  +			    </tr:panelButtonBar>
  +	    	</tr:form>
  +    	</tr:panelPartialRoot>
  +    </rich:panel>
  +    
  +</ui:define> 
  +</ui:composition>
  
  
  
  1.3       +1 -3      jboss-seam/examples/seamdiscs/view/login.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: login.xhtml
  ===================================================================
  RCS file: login.xhtml
  diff -N login.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ login.xhtml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,43 @@
  +<!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:s="http://jboss.com/products/seam/taglib"
  +                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:rich="http://richfaces.ajax4jsf.org/rich"
  +                template="layout/template.xhtml">
  +
  +<ui:define name="body">
  +    
  +    <h:form id="login">
  +    
  +        <rich:panel>
  +            <f:facet name="header">Login</f:facet>
  +    
  +            <p>You can log in as administrator/administrator</p>
  +        
  +            <div class="dialog">
  +                <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
  +                    <h:outputLabel for="username">Username</h:outputLabel>
  +                    <h:inputText id="username" 
  +                              value="#{identity.username}"/>
  +                    <h:outputLabel for="password">Password</h:outputLabel>
  +                    <h:inputSecret id="password" 
  +                                value="#{identity.password}"/>
  +                    <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
  +                    <h:selectBooleanCheckbox id="rememberMe" 
  +                                          value="#{identity.rememberMe}"/>
  +                </h:panelGrid>
  +            </div>
  +                
  +        </rich:panel>
  +            
  +        <div class="actionButtons">
  +            <h:commandButton value="Login" action="#{identity.login}"/>
  +        </div>
  +          
  +    </h:form>
  +
  + </ui:define> 
  +</ui:composition>
  
  
  
  1.3       +3 -3      jboss-seam/examples/seamdiscs/view/artist.page.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: artist.page.xml
  ===================================================================
  RCS file: artist.page.xml
  diff -N artist.page.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ artist.page.xml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,21 @@
  +<!DOCTYPE page PUBLIC
  +          "-//JBoss/Seam Pages Configuration DTD 2.0//EN"
  +          "http://jboss.com/products/seam/pages-2.0.dtd">
  +
  +<page>
  +   <param name="artistId" value="#{artistHome.id}" converterId="javax.faces.Integer"/> 
  +   <navigation>
  +   		<rule if-outcome="cancel">
  +   			<end-conversation/>
  +   			<redirect view-id="/artists.xhtml" />
  +   		</rule>
  +   		<rule if-outcome="updated">
  +   			<end-conversation/>
  +   			<redirect view-id="/artists.xhtml" />
  +   		</rule>
  +   		<rule if-outcome="persisted">
  +   			<end-conversation/>
  +   			<redirect view-id="/artists.xhtml" />
  +   		</rule>
  +   </navigation>
  +</page>
  
  
  
  1.3       +0 -0      jboss-seam/examples/seamdiscs/view/index.html
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: index.html
  ===================================================================
  RCS file: index.html
  diff -N index.html
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ index.html	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,5 @@
  +<html>
  +<head>
  +  <meta http-equiv="Refresh" content="0; URL=home.seam">
  +</head>
  +</html>
  \ No newline at end of file
  
  
  
  1.3       +24 -26    jboss-seam/examples/seamdiscs/view/disc.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: disc.xhtml
  ===================================================================
  RCS file: disc.xhtml
  diff -N disc.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ disc.xhtml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,54 @@
  +<!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:s="http://jboss.com/products/seam/taglib"
  +                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:rich="http://richfaces.ajax4jsf.org/rich"
  +                xmlns:tr="http://myfaces.apache.org/trinidad"
  +                xmlns:a="https://ajax4jsf.dev.java.net/ajax"
  +                template="layout/template.xhtml">
  +
  +<ui:define name="body">
  +    
  +    <rich:panel>
  +    	<f:facet name="header">
  +    		<s:fragment rendered="#{disc.name ne null}">
  +		    	<i><tr:outputText value="#{disc.name}" /></i>
  +		    	<tr:outputText value=" by #{disc.artist.name}" />
  +		    </s:fragment>
  +		</f:facet>
  +    	<tr:panelPartialRoot>
  +	    	<tr:form>
  +	    		<s:validateAll>
  +			    	<tr:panelFormLayout>
  +			    		<tr:inputText label="Disc" value="#{disc.name}" readOnly="#{not identity.loggedIn}" required="true" />
  +			    		<tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2010" stepSize="1" readOnly="#{not identity.loggedIn}" />           
  +		    			<tr:selectOneChoice value="#{disc.artist}" label="Artist" required="true" readOnly="#{not identity.loggedIn}">
  +		    				<s:selectItems value="#{artists.resultList}" var="artist" label="#{artist.name}" noSelectionLabel="Please Select..." hideNoSelectionLabel="true" />
  +		    				<s:convertEntity />
  +		    			</tr:selectOneChoice>
  +		    			<tr:panelLabelAndMessage label="Details">
  +				    		<tr:inputText simple="true" value="#{disc.description}" rendered="#{identity.loggedIn}" rows="4" columns="60" id="description">
  +				    			 <a:support event="onkeyup" reRender="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
  +				    		</tr:inputText>
  +					    	<s:div style="width: 300px;" id="description_preview">
  +							   	<s:formattedText value="#{disc.description}" rendered="#{not empty disc.description}"  />
  +					    		<tr:outputText value="None known" rendered="#{empty disc.description}" />
  +							</s:div>
  +						</tr:panelLabelAndMessage>
  +		    		</tr:panelFormLayout>
  +		    	</s:validateAll>
  +		    	
  +		    	<tr:panelButtonBar rendered="#{identity.loggedIn}">
  +			    	<h:commandButton action="#{discHome.update}" value="Save" rendered="#{discHome.managed}" />
  +			    	<h:commandButton action="#{discHome.persist}" value="Save" rendered="#{not discHome.managed}" />
  +			    	<s:button action="cancel" value="Cancel" />
  +			    </tr:panelButtonBar>
  +	    	</tr:form>
  +    	</tr:panelPartialRoot>
  +    </rich:panel>
  +    
  +</ui:define> 
  +</ui:composition>
  
  
  
  1.4       +21 -65    jboss-seam/examples/seamdiscs/view/home.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: home.xhtml
  ===================================================================
  RCS file: home.xhtml
  diff -N home.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ home.xhtml	14 Jul 2007 23:48:39 -0000	1.4
  @@ -0,0 +1,59 @@
  +<!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:s="http://jboss.com/products/seam/taglib"
  +                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:rich="http://richfaces.ajax4jsf.org/rich"
  +                xmlns:tr="http://myfaces.apache.org/trinidad"
  +                template="layout/template.xhtml">
  +
  +<ui:define name="body">
  +    
  +    <rich:panel>
  +	    <f:facet name="header">Welcome to Seam Discs!</f:facet>
  +    	<p>This application allows you to catalogue your favourite
  +    	bands, and albums they've released. It uses:</p>
  +    	
  +    	<tr:panelList>
  +    		<h:outputText value="JBoss Seam" />
  +    		<h:outputText value="Apache MyFaces Trinidad" />
  +    		<h:outputText value="JBoss RichFaces" />
  +    		<h:outputText value="JBoss Ajax4jsf" />
  +    		<h:outputText value="EJB3/JPA" />
  +    		<h:outputText value="Facelets" />
  +    	</tr:panelList>
  +    	
  +    	<p>Use the links at the bottom of the screen to learn more about
  +    	the techniques used in creating this application.</p>
  +    	
  +    	<p>You can log in as <code>administrator</code>/<code>administrator</code>.</p>
  +    </rich:panel>
  +    <rich:panel>
  +	    <f:facet name="header">
  +	    	<tr:outputText value="Artists &amp; Discs" />
  +	    </f:facet>
  +	    <tr:panelPartialRoot>
  +	    	<tr:form>
  +		    	<tr:tree value="#{artistHome.tree}" var="var">
  +		    		<f:facet name="nodeStamp">
  +		    			<ui:fragment>
  +			    			<s:link action="disc" rendered="#{var.class.simpleName eq 'Disc'}">
  +				    			<tr:outputText value="#{var.name}" />
  +				    			<tr:outputText value=" (#{var.release})"  rendered="#{var.release ne null}"/>
  +				    			<f:param name="discId" value="#{var.id}" />
  +				    		</s:link>
  +				    		<s:link action="artist" rendered="#{var.class.simpleName eq 'Artist' or var.class.simpleName eq 'Band'}">
  +				    			<tr:outputText value="#{var.name}" />
  +				    			<f:param name="artistId" value="#{var.id}" />
  +				    		</s:link>
  +				    	</ui:fragment>
  +		    		</f:facet>
  +		    	</tr:tree>
  +	    	</tr:form>
  +    	</tr:panelPartialRoot>
  +    </rich:panel>
  +    
  +</ui:define> 
  +</ui:composition>
  
  
  
  1.3       +0 -2      jboss-seam/examples/seamdiscs/view/error.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: error.xhtml
  ===================================================================
  RCS file: error.xhtml
  diff -N error.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ error.xhtml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,16 @@
  +<!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:s="http://jboss.com/products/seam/taglib"
  +                xmlns:ui="http://java.sun.com/jsf/facelets"
  +                xmlns:f="http://java.sun.com/jsf/core"
  +                xmlns:h="http://java.sun.com/jsf/html"
  +                template="layout/template.xhtml">
  +
  +<ui:define name="body">
  +
  +    <h1>Error</h1>
  +    <p>Something bad happened :-(</p>
  +        
  +</ui:define> 
  +</ui:composition>
  
  
  
  1.3       +5 -5      jboss-seam/examples/seamdiscs/view/home.page.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: home.page.xml
  ===================================================================
  RCS file: home.page.xml
  diff -N home.page.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ home.page.xml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,18 @@
  +<!DOCTYPE page PUBLIC
  +          "-//JBoss/Seam Pages Configuration DTD 2.0//EN"
  +          "http://jboss.com/products/seam/pages-2.0.dtd">
  +
  +<page>
  +   <param name="artistId" value="#{artistHome.id}" converterId="javax.faces.Integer"/>
  +   <param name="discId" value="#{discHome.id}" converterId="javax.faces.Integer"/>
  +   <navigation>
  +   	<rule if-outcome="artist">
  +	   	<begin-conversation flush-mode="manual" join="true"/> 
  +   		<redirect view-id="/artist.xhtml"/>	
  +   	</rule>
  +   	<rule if-outcome="disc">
  +	   	<begin-conversation flush-mode="manual" join="true"/> 
  +   		<redirect view-id="/disc.xhtml"/>	
  +   	</rule>
  +   </navigation>
  +</page>
  
  
  
  1.3       +4 -4      jboss-seam/examples/seamdiscs/view/discs.page.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: discs.page.xml
  ===================================================================
  RCS file: discs.page.xml
  diff -N discs.page.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ discs.page.xml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,13 @@
  +<!DOCTYPE page PUBLIC
  +          "-//JBoss/Seam Pages Configuration DTD 2.0//EN"
  +          "http://jboss.com/products/seam/pages-2.0.dtd">
  +
  +<page>
  +   <param name="discId" value="#{discHome.id}" converterId="javax.faces.Integer"/>
  +   <navigation>
  +   	<rule if-outcome="disc">
  +	   	<begin-conversation flush-mode="manual" join="true"/> 
  +   		<redirect view-id="/disc.xhtml"/>	
  +   	</rule>
  +   </navigation>
  +</page>
  
  
  
  1.3       +4 -10     jboss-seam/examples/seamdiscs/view/artists.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: artists.xhtml
  ===================================================================
  RCS file: artists.xhtml
  diff -N artists.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ artists.xhtml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,60 @@
  +<!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:s="http://jboss.com/products/seam/taglib"
  +                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:rich="http://richfaces.ajax4jsf.org/rich"
  +                xmlns:tr="http://myfaces.apache.org/trinidad"
  +                template="layout/template.xhtml">
  +
  +<ui:define name="body">
  +    
  +    <rich:panel>
  +    <f:facet name="header">Artists</f:facet>
  +    	<tr:panelPartialRoot>
  +	    	<tr:form>
  +		    	<tr:table value="#{artists.dataModel}" var="artist" rows="#{artists.maxResults}">
  +		    		<tr:column sortable="true" sortProperty="artist.name">
  +		    			<f:facet name="header">
  +		    				Name
  +		    			</f:facet>
  +		    			<s:link action="artist">
  +		    				<tr:outputText value="#{artist.name}" />
  +		    				<f:param name="artistId" value="#{artist.id}" />
  +		    			</s:link>
  +		    		</tr:column>
  +		    		<tr:column>
  +		    			<f:facet name="header">
  +		    				Band Members
  +		    			</f:facet>
  +		    			<tr:outputText value="Solo performer" rendered="#{artist.class.simpleName eq 'Artist'}" />
  +		    			<tr:outputText value="None" rendered="#{artist.class.simpleName eq 'Band' and empty artist.bandMembers}" />
  +	    				<rich:dataList value="#{artist.bandMembers}" var="bandMember" rendered="#{artist.class.simpleName eq 'Band' and not empty artist.bandMembers}">
  +			    			<tr:outputText value="#{bandMember.name}" />
  +			    		</rich:dataList>
  +		    		</tr:column>
  +		    		<f:facet name="detailStamp">
  +		    			<s:div style="width: 200px">
  +			    			<s:formattedText value="#{artist.description}" rendered="#{not empty artist.description}" />
  +			    			<tr:outputText value="None known" rendered="#{empty artist.description}" />
  +			    		</s:div>
  +		    		</f:facet>
  +		    	</tr:table>
  +		    	<tr:panelButtonBar rendered="#{identity.loggedIn}">
  +			    	<s:button action="artist" value="Add artist">
  +			    		<f:param name="artistId" value="" />
  +			    		<f:param name="type" value="artist" />
  +		    		</s:button>
  +		    		<s:button action="artist" value="Add band">
  +		    			<f:param name="artistId" value="" />
  +			    		<f:param name="type" value="band" />	    	
  +			    	</s:button>
  +			    </tr:panelButtonBar>
  +	    	</tr:form>
  +    	</tr:panelPartialRoot>
  +    </rich:panel>
  +    
  +</ui:define> 
  +</ui:composition>
  
  
  
  1.3       +3 -3      jboss-seam/examples/seamdiscs/view/disc.page.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: disc.page.xml
  ===================================================================
  RCS file: disc.page.xml
  diff -N disc.page.xml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ disc.page.xml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,21 @@
  +<!DOCTYPE page PUBLIC
  +          "-//JBoss/Seam Pages Configuration DTD 2.0//EN"
  +          "http://jboss.com/products/seam/pages-2.0.dtd">
  +
  +<page>
  +   <param name="discId" value="#{discHome.id}" converterId="javax.faces.Integer"/> 
  +   <navigation>
  +   		<rule if-outcome="cancel">
  +   			<end-conversation/>
  +   			<redirect view-id="/discs.xhtml" />
  +   		</rule>
  +   		<rule if-outcome="updated">
  +   			<end-conversation/>
  +   			<redirect view-id="/discs.xhtml" />
  +   		</rule>
  +   		<rule if-outcome="persisted">
  +   			<end-conversation/>
  +   			<redirect view-id="/discs.xhtml" />
  +   		</rule>
  +   </navigation>
  +</page>
  
  
  
  1.3       +62 -63    jboss-seam/examples/seamdiscs/view/artist.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: artist.xhtml
  ===================================================================
  RCS file: artist.xhtml
  diff -N artist.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ artist.xhtml	14 Jul 2007 23:48:39 -0000	1.3
  @@ -0,0 +1,87 @@
  +<!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:s="http://jboss.com/products/seam/taglib"
  +                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:rich="http://richfaces.ajax4jsf.org/rich"
  +                xmlns:tr="http://myfaces.apache.org/trinidad"
  +                xmlns:a="https://ajax4jsf.dev.java.net/ajax"
  +                template="layout/template.xhtml">
  +
  +<ui:define name="body">
  +    
  +    <rich:panel>
  +    <f:facet name="header"><tr:outputText value="#{artist.name} (#{messages[artist.class.name]})" rendered="#{artist.name ne null}" /></f:facet>
  +    	<tr:panelPartialRoot>
  +	    	<h:form>
  +	    		<s:validateAll>
  +			    	<tr:panelFormLayout>
  +			    		<tr:inputText label="Artist" value="#{artist.name}" readOnly="#{not identity.loggedIn}" required="true"/>
  +			    		<tr:panelLabelAndMessage label="Band Members" rendered="#{artist.class.simpleName eq 'Band'}">
  +							<ul>
  +					    		<ui:repeat value="#{artist.bandMembers}" var="bandMember">
  +					    			<li>
  +					    				<tr:inputText simple="true" value="#{bandMember.name}" readOnly="#{not identity.loggedIn}" id="bandMember"/>
  +					    				<rich:suggestionbox for="bandMember" selfRendered="true" minChars="3" suggestionAction="#{bandMemberFinder.getBandMembers}" var="bandMember">
  +					    						<h:column>
  +					    							<h:outputText value="#{bandMember.name}" />
  +					    						</h:column>
  +					    				</rich:suggestionbox>
  +					    			</li>
  +					    		</ui:repeat>
  +							</ul>
  +				    		<f:facet name="end">
  +				    			<h:commandButton action="#{artistHome.addBandMember}" value="Add Band Member" rendered="#{identity.loggedIn}"/>
  +				    		</f:facet>
  +				    	</tr:panelLabelAndMessage>
  +				    	<tr:panelLabelAndMessage label="Details">
  +				    		<tr:inputText simple="true" value="#{artist.description}" rendered="#{identity.loggedIn}" rows="4" columns="60" id="description">
  +				    			 <a:support event="onkeyup" reRender="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
  +				    		</tr:inputText>
  +				    		<s:div style="width: 300px" id="description_preview">
  +					    	
  +							   	<s:formattedText value="#{artist.description}" rendered="#{not empty artist.description}" />
  +					    		<tr:outputText value="None known" rendered="#{empty artist.description}" />
  +							</s:div>
  +						</tr:panelLabelAndMessage>
  +				    	<tr:panelLabelAndMessage label="Discs">
  +				    		<tr:table value="#{artist.discs}" var="disc" rows="5" emptyText="None Known">
  +					    		<tr:column>
  +					    			<f:facet name="header">
  +					    				Disc
  +					    			</f:facet>
  +					    			<tr:inputText value="#{disc.name}" readOnly="#{not identity.loggedIn}"/>
  +					    		</tr:column>
  +					    		<tr:column>
  +					    			<f:facet name="header">
  +					    				Released
  +					    			</f:facet>
  +					    			<tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2010" stepSize="1" readOnly="#{not identity.loggedIn}" />           
  +					    		</tr:column>
  +					    		<f:facet name="detailStamp">
  +							    	<s:div style="width: 300px;">
  +									   	<s:formattedText value="#{disc.description}" rendered="#{not empty disc.description}"  />
  +							    		<tr:outputText value="None known" rendered="#{empty disc.description}" />
  +									</s:div>
  +						 		</f:facet>
  +					    	</tr:table>
  +					    	<f:facet name="end">
  +				    			<h:commandButton action="#{artistHome.addDisc}" value="Add Disc" rendered="#{identity.loggedIn}"/>
  +				    		</f:facet>
  +				    	</tr:panelLabelAndMessage>
  +			    	</tr:panelFormLayout>
  +		    	</s:validateAll>
  +		    	
  +		    	<tr:panelButtonBar rendered="#{identity.loggedIn}">
  +		    		<h:commandButton action="#{artistHome.update}" value="Save" rendered="#{artistHome.managed}" />
  +		    		<h:commandButton action="#{artistHome.persist}" value="Save" rendered="#{not artistHome.managed}" />
  +		    		<s:button action="cancel" value="Cancel" />
  +		    	</tr:panelButtonBar>
  +	    	</h:form>
  +    	</tr:panelPartialRoot>
  +    </rich:panel>
  +    
  +</ui:define> 
  +</ui:composition>
  
  
  



More information about the jboss-cvs-commits mailing list