[jboss-cvs] jboss-seam/examples/ui/view ...
Peter Muir
peter at bleepbleep.org.uk
Wed Jun 13 07:43:17 EDT 2007
User: pmuir
Date: 07/06/13 07:43:17
Modified: examples/ui/view selectItems.xhtml template.xhtml
Log:
Improvements to ui example
Revision Changes Path
1.17 +19 -13 jboss-seam/examples/ui/view/selectItems.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: selectItems.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/ui/view/selectItems.xhtml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- selectItems.xhtml 28 May 2007 01:22:01 -0000 1.16
+++ selectItems.xhtml 13 Jun 2007 11:43:17 -0000 1.17
@@ -28,13 +28,7 @@
</h:selectOneMenu>
</s:decorate>
- <s:decorate template="decorateField.xhtml">
- <ui:define name="label">Roles</ui:define>
- <h:selectManyCheckbox value="#{person.roles}" required="true">
- <s:selectItems value="#{roles}" var="role" label="#{role.name}"/>
- <s:convertEnum />
- </h:selectManyCheckbox>
- </s:decorate>
+
<s:decorate template="decorateField.xhtml">
<ui:define name="label">Name</ui:define>
@@ -50,7 +44,7 @@
</h:selectOneMenu>
</s:decorate>
- <s:decorate template="decorateField.xhtml" id="countryDecorate">
+ <s:decorate template="decorateField.xhtml">
<ui:define name="label">Country of Birth</ui:define>
<h:selectOneRadio value="#{personHome.instance.country}" required="true" disabled="#{empty person.continent}">
<s:selectItems value="#{personHome.instance.continent.countries}" var="country" label="#{country.name} (#{country.continent.name})" noSelectionLabel="Please Select..." hideNoSelectionLabel="true"/>
@@ -59,6 +53,14 @@
</s:decorate>
<s:decorate template="decorateField.xhtml">
+ <ui:define name="label">Roles</ui:define>
+ <h:selectManyCheckbox value="#{person.roles}" required="true">
+ <s:selectItems value="#{roles}" var="role" label="#{role.name}"/>
+ <s:convertEnum />
+ </h:selectManyCheckbox>
+ </s:decorate>
+
+ <s:decorate template="decorateField.xhtml">
<ui:define name="label">Age</ui:define>
<ui:define name="description">The age list is an array of primitives</ui:define>
<h:selectOneMenu value="#{person.age}">
@@ -68,6 +70,14 @@
</s:decorate>
<s:decorate template="decorateField.xhtml">
+ <ui:define name="label">Pet</ui:define>
+ <ui:define name="description">The animal list is a list of Strings</ui:define>
+ <h:selectOneMenu value="#{person.pet}">
+ <s:selectItems value="#{animals}" var="animal" label="#{animal}" noSelectionLabel="Select your pet"/>
+ </h:selectOneMenu>
+ </s:decorate>
+
+ <s:decorate template="decorateField.xhtml">
<ui:define name="label">Favourite Colours</ui:define>
<ui:define name="description">A colour is an entity</ui:define>
<h:selectManyListbox value="#{personHome.instance.favouriteColours}" >
@@ -84,14 +94,10 @@
<s:convertEntity />
</h:selectOneListbox>
</s:decorate>
-
<h:commandButton value="Apply" action="#{personHome.update}">
<s:conversationPropagation type="join" />
</h:commandButton>
- <h:messages globalOnly="true" />
- <p><s:link view="/index.xhtml" propagation="end">Back to index</s:link></p>
-
</h:form>
</ui:define>
</ui:composition>
\ No newline at end of file
1.5 +19 -12 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.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- template.xhtml 3 Apr 2007 18:34:00 -0000 1.4
+++ template.xhtml 13 Jun 2007 11:43:17 -0000 1.5
@@ -1,3 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
@@ -35,28 +36,34 @@
float: left;
padding-right: 5px;
font-weight: bold;
- width: 150px;
+ width: 250px;
text-align: right;
}
-.entry .output {
- width: 360px;
- padding-top: 10px;
- text-align: left;
-}
+
.entry .input {
- width: 360px;
+ width: 560px;
text-align: left;
}
.entry .error {
- width: 360px;
+ width: 560px;
text-align: left;
}
+
+.menu {
+ width: 200px;
+ float: left;
+ padding: 10px;
+}
+
+.content {
+ margin-left: 200px;
+}
</style>
<ui:debug id="debug" />
</head>
<body>
-<s:div style="width: 200px; float: left; padding: 10px; height: 100%">
+<s:div styleClass="menu">
<ul>
<li><s:link view="/selectItems.xhtml" propagation="join">
<code>s:selectItems</code>
@@ -85,7 +92,7 @@
</s:link></li>
</ul>
</s:div>
-<s:div>
+<s:div styleClass="content">
<h1><code><h:outputText value="#{tagName}" /></code></h1>
<ui:insert name="body" />
<h:messages />
More information about the jboss-cvs-commits
mailing list