Hello xsa lefter!
First thank you very much for your reply. I wonder though why you like to see the source code, since it is auto-generated. Anyway I post the code of the UserEdit.xhtml below. I use seamn with the eclipse ide (galileo Version: 3.5.2.R35x_v20100210-0800-9hEiFzmFst-TiEn9hNYgDWg1XN8ulH_JvCNGB Build id: M20100211-1343). There one can generate the code (xhtml and java) from the project context menu: "new-Seam generate Entities".
Thank you again!
Tarek
User.Edit.xhtml:
<!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:a="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
<h:form id="user" styleClass="edit">
<rich:panel>
<f:facet name="header">#{userHome.managed ? 'Edit' : 'Add'} User</f:facet>
<s:decorate id="uinField" template="layout/edit.xhtml">
<ui:define name="label">Uin</ui:define>
<h:inputTextarea id="uin"
cols="80"
rows="3"
value="#{userHome.instance.uin}"/>
</s:decorate>
<s:decorate id="birthdayField" template="layout/edit.xhtml">
<ui:define name="label">Birthday</ui:define>
<rich:calendar id="birthday"
value="#{userHome.instance.birthday}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="chiffreField" template="layout/edit.xhtml">
<ui:define name="label">Chiffre</ui:define>
<h:inputTextarea id="chiffre"
cols="80"
rows="3"
value="#{userHome.instance.chiffre}"/>
</s:decorate>
<s:decorate id="firstnameField" template="layout/edit.xhtml">
<ui:define name="label">Firstname</ui:define>
<h:inputTextarea id="firstname"
cols="80"
rows="3"
value="#{userHome.instance.firstname}"/>
</s:decorate>
<s:decorate id="foreignKeyField" template="layout/edit.xhtml">
<ui:define name="label">Foreign key</ui:define>
<h:inputText id="foreignKey"
size="32"
maxlength="32"
value="#{userHome.instance.foreignKey}">
<a:support event="onblur" reRender="foreignKeyField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="salutationField" template="layout/edit.xhtml">
<ui:define name="label">Salutation</ui:define>
<h:inputText id="salutation"
size="64"
maxlength="64"
value="#{userHome.instance.salutation}">
<a:support event="onblur" reRender="salutationField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="genderField" template="layout/edit.xhtml">
<ui:define name="label">Gender</ui:define>
<h:inputText id="gender"
size="2"
maxlength="2"
value="#{userHome.instance.gender}">
<a:support event="onblur" reRender="genderField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="hiddenField" template="layout/edit.xhtml">
<ui:define name="label">Hidden</ui:define>
<h:selectBooleanCheckbox id="hidden"
value="#{userHome.instance.hidden}"/>
</s:decorate>
<s:decorate id="lastnameField" template="layout/edit.xhtml">
<ui:define name="label">Lastname</ui:define>
<h:inputTextarea id="lastname"
cols="80"
rows="3"
value="#{userHome.instance.lastname}"/>
</s:decorate>
<s:decorate id="newsletterField" template="layout/edit.xhtml">
<ui:define name="label">Newsletter</ui:define>
<h:selectBooleanCheckbox id="newsletter"
value="#{userHome.instance.newsletter}"/>
</s:decorate>
<s:decorate id="nicknameField" template="layout/edit.xhtml">
<ui:define name="label">Nickname</ui:define>
<h:inputTextarea id="nickname"
cols="80"
rows="3"
value="#{userHome.instance.nickname}"/>
</s:decorate>
<s:decorate id="noipcheckField" template="layout/edit.xhtml">
<ui:define name="label">Noipcheck</ui:define>
<h:selectBooleanCheckbox id="noipcheck"
value="#{userHome.instance.noipcheck}"/>
</s:decorate>
<s:decorate id="passwordField" template="layout/edit.xhtml">
<ui:define name="label">Password</ui:define>
<h:inputTextarea id="password"
cols="80"
rows="3"
value="#{userHome.instance.password}"/>
</s:decorate>
<s:decorate id="permalinkField" template="layout/edit.xhtml">
<ui:define name="label">Permalink</ui:define>
<h:inputTextarea id="permalink"
cols="80"
rows="3"
value="#{userHome.instance.permalink}"/>
</s:decorate>
<s:decorate id="resumeField" template="layout/edit.xhtml">
<ui:define name="label">Resume</ui:define>
<h:inputTextarea id="resume"
cols="80"
rows="10"
value="#{userHome.instance.resume}"/>
</s:decorate>
<s:decorate id="titleField" template="layout/edit.xhtml">
<ui:define name="label">Title</ui:define>
<h:inputText id="title"
size="100"
maxlength="128"
value="#{userHome.instance.title}">
<a:support event="onblur" reRender="titleField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="tokenField" template="layout/edit.xhtml">
<ui:define name="label">Token</ui:define>
<h:inputTextarea id="token"
cols="80"
rows="3"
value="#{userHome.instance.token}"/>
</s:decorate>
<s:decorate id="admintypeField" template="layout/edit.xhtml">
<ui:define name="label">Admintype</ui:define>
<h:inputText id="admintype"
size="3"
maxlength="3"
value="#{userHome.instance.admintype}">
<a:support event="onblur" reRender="admintypeField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="languageIdField" template="layout/edit.xhtml">
<ui:define name="label">Language id</ui:define>
<h:inputText id="languageId"
value="#{userHome.instance.languageId}">
<a:support event="onblur" reRender="languageIdField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="creationDateField" template="layout/edit.xhtml">
<ui:define name="label">Creation date</ui:define>
<rich:calendar id="creationDate"
value="#{userHome.instance.creationDate}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="firstLoginField" template="layout/edit.xhtml">
<ui:define name="label">First login</ui:define>
<rich:calendar id="firstLogin"
value="#{userHome.instance.firstLogin}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="fullSalutationField" template="layout/edit.xhtml">
<ui:define name="label">Full salutation</ui:define>
<h:inputTextarea id="fullSalutation"
cols="80"
rows="3"
value="#{userHome.instance.fullSalutation}"/>
</s:decorate>
<s:decorate id="lastLoginField" template="layout/edit.xhtml">
<ui:define name="label">Last login</ui:define>
<rich:calendar id="lastLogin"
value="#{userHome.instance.lastLogin}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="lastNewsletterField" template="layout/edit.xhtml">
<ui:define name="label">Last newsletter</ui:define>
<rich:calendar id="lastNewsletter"
value="#{userHome.instance.lastNewsletter}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="loginCounterField" template="layout/edit.xhtml">
<ui:define name="label">Login counter</ui:define>
<h:inputText id="loginCounter"
value="#{userHome.instance.loginCounter}">
<a:support event="onblur" reRender="loginCounterField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="loginNameField" template="layout/edit.xhtml">
<ui:define name="label">Login name</ui:define>
<h:inputTextarea id="loginName"
cols="80"
rows="3"
value="#{userHome.instance.loginName}"/>
</s:decorate>
<s:decorate id="passwordExpiresField" template="layout/edit.xhtml">
<ui:define name="label">Password expires</ui:define>
<rich:calendar id="passwordExpires"
value="#{userHome.instance.passwordExpires}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="primaryEmailField" template="layout/edit.xhtml">
<ui:define name="label">Primary email</ui:define>
<h:inputTextarea id="primaryEmail"
cols="80"
rows="3"
value="#{userHome.instance.primaryEmail}"/>
</s:decorate>
<s:decorate id="profileLastReviewField" template="layout/edit.xhtml">
<ui:define name="label">Profile last review</ui:define>
<rich:calendar id="profileLastReview"
value="#{userHome.instance.profileLastReview}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="profileRevReminderCntField" template="layout/edit.xhtml">
<ui:define name="label">Profile rev reminder cnt</ui:define>
<h:inputText id="profileRevReminderCnt"
value="#{userHome.instance.profileRevReminderCnt}">
<a:support event="onblur" reRender="profileRevReminderCntField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="profileRevReminderSentField" template="layout/edit.xhtml">
<ui:define name="label">Profile rev reminder sent</ui:define>
<rich:calendar id="profileRevReminderSent"
value="#{userHome.instance.profileRevReminderSent}" datePattern="MM/dd/yyyy hh:mm a"/>
</s:decorate>
<s:decorate id="profileReviewReminderField" template="layout/edit.xhtml">
<ui:define name="label">Profile review reminder</ui:define>
<h:inputText id="profileReviewReminder"
value="#{userHome.instance.profileReviewReminder}">
<a:support event="onblur" reRender="profileReviewReminderField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="regOption1Field" template="layout/edit.xhtml">
<ui:define name="label">Reg option1</ui:define>
<h:inputText id="regOption1"
value="#{userHome.instance.regOption1}">
<a:support event="onblur" reRender="regOption1Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="regOption2Field" template="layout/edit.xhtml">
<ui:define name="label">Reg option2</ui:define>
<h:inputText id="regOption2"
value="#{userHome.instance.regOption2}">
<a:support event="onblur" reRender="regOption2Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="regOption3Field" template="layout/edit.xhtml">
<ui:define name="label">Reg option3</ui:define>
<h:inputText id="regOption3"
value="#{userHome.instance.regOption3}">
<a:support event="onblur" reRender="regOption3Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="regOption4Field" template="layout/edit.xhtml">
<ui:define name="label">Reg option4</ui:define>
<h:inputText id="regOption4"
value="#{userHome.instance.regOption4}">
<a:support event="onblur" reRender="regOption4Field" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="showBirthdayField" template="layout/edit.xhtml">
<ui:define name="label">Show birthday</ui:define>
<h:selectBooleanCheckbox id="showBirthday"
value="#{userHome.instance.showBirthday}"/>
</s:decorate>
<s:decorate id="showEmailField" template="layout/edit.xhtml">
<ui:define name="label">Show email</ui:define>
<h:selectBooleanCheckbox id="showEmail"
value="#{userHome.instance.showEmail}"/>
</s:decorate>
<s:decorate id="showNameField" template="layout/edit.xhtml">
<ui:define name="label">Show name</ui:define>
<h:selectBooleanCheckbox id="showName"
value="#{userHome.instance.showName}"/>
</s:decorate>
<s:decorate id="newsletterLanguageIdField" template="layout/edit.xhtml">
<ui:define name="label">Newsletter language id</ui:define>
<h:inputText id="newsletterLanguageId"
value="#{userHome.instance.newsletterLanguageId}">
<a:support event="onblur" reRender="newsletterLanguageIdField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<s:decorate id="idCommunityField" template="layout/edit.xhtml">
<ui:define name="label">Id community</ui:define>
<h:inputText id="idCommunity"
value="#{userHome.instance.idCommunity}">
<a:support event="onblur" reRender="idCommunityField" bypassUpdates="true" ajaxSingle="true"/>
</h:inputText>
</s:decorate>
<div style="clear:both">
<span class="required">*</span>
required fields
</div>
</rich:panel>
<div class="actionButtons">
<h:commandButton id="save"
value="Save"
action="#{userHome.persist}"
disabled="#{!userHome.wired}"
rendered="#{!userHome.managed}"/>
<h:commandButton id="update"
value="Save"
action="#{userHome.update}"
rendered="#{userHome.managed}"/>
<h:commandButton id="delete"
value="Delete"
action="#{userHome.remove}"
immediate="true"
rendered="#{userHome.managed}"/>
<s:button id="cancelEdit"
value="Cancel"
propagation="end"
view="/User.xhtml"
rendered="#{userHome.managed}"/>
<s:button id="cancelAdd"
value="Cancel"
propagation="end"
view="/#{empty userFrom ? 'UserList' : userFrom}.xhtml"
rendered="#{!userHome.managed}"/>
</div>
</h:form>
</ui:define>
</ui:composition>