1 <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   3 <ui:composition xmlns="http://www.w3.org/1999/xhtml"
   4     xmlns:s="http://jboss.com/products/seam/taglib"
   5     xmlns:ui="http://java.sun.com/jsf/facelets"
   6     xmlns:f="http://java.sun.com/jsf/core"
   7     xmlns:h="http://java.sun.com/jsf/html"
   8     xmlns:rich="http://richfaces.org/rich"
   9     template="layout/template.xhtml">
  10 
  11 <ui:define name="body">
  12 
  13     <h:form id="myEntityForm">
  14 
  15         <rich:panel>
  16             <f:facet name="header">myEntity</f:facet>
  17 
  18             <s:decorate id="nameField" template="layout/edit.xhtml">
  19                 <ui:define name="label">Name</ui:define>
  20                 <h:inputText id="name" required="true"
  21                              value="#{myEntityHome.instance.name}"/>
  22             </s:decorate>
  23 
  24             <div style="clear:both"/>
  25 
  26         </rich:panel>
  27 
  28         <div class="actionButtons">
  29             <h:commandButton id="save"
  30                           value="Save"
  31                          action="#{myEntityHome.persist}"
  32                        rendered="#{!myEntityHome.managed}"/>
  33             <h:commandButton id="update"
  34                           value="Save"
  35                          action="#{myEntityHome.update}"
  36                        rendered="#{myEntityHome.managed}"/>
  37             <h:commandButton id="delete"
  38                           value="Delete"
  39                          action="#{myEntityHome.remove}"
  40                       immediate="true"
  41                        rendered="#{myEntityHome.managed}"/>
  42             <s:button propagation="end"
  43                                id="cancel"
  44                             value="Cancel"
  45                              view="/myEntityList.xhtml"/>
  46         </div>
  47 
  48     </h:form>
  49 
  50 </ui:define>
  51 
  52 </ui:composition>