You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/03/18 09:28:14 UTC
svn commit: r1735546 - in
/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main:
java/org/apache/myfaces/tobago/example/demo/
webapp/content/20-component/020-output/10-out/
webapp/content/20-component/020-output/20-label/ we...
Author: lofwyr
Date: Fri Mar 18 08:28:13 2016
New Revision: 1735546
URL: http://svn.apache.org/viewvc?rev=1735546&view=rev
Log:
TOBAGO-1544: Revise Demo Application for Tobago 3.0
[developed by hnoeth]
Added:
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/image/alps.png (with props)
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectBooleanCheckboxController.java
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/10-out/out.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/40-image/image.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/select.xhtml
myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectBooleanCheckboxController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectBooleanCheckboxController.java?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectBooleanCheckboxController.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectBooleanCheckboxController.java Fri Mar 18 08:28:13 2016
@@ -27,23 +27,62 @@ import java.io.Serializable;
@Named
public class SelectBooleanCheckboxController implements Serializable {
- private String onOffString = "on";
- private boolean normalBoolean = true;
+ private boolean a;
+ private boolean b;
+ private boolean c;
+ private boolean d;
+ private boolean e;
+ private boolean f;
- public String getOnOffString() {
- return onOffString;
+ public boolean isA() {
+ return a;
}
- public void setOnOffString(final String onOffString) {
- this.onOffString = onOffString;
+ public void setA(boolean a) {
+ this.a = a;
}
- public boolean isNormalBoolean() {
- return normalBoolean;
+ public boolean isB() {
+ return b;
}
- public void setNormalBoolean(final boolean normalBoolean) {
- this.normalBoolean = normalBoolean;
+ public void setB(boolean b) {
+ this.b = b;
}
+ public boolean isC() {
+ return c;
+ }
+
+ public void setC(boolean c) {
+ this.c = c;
+ }
+
+ public boolean isD() {
+ return d;
+ }
+
+ public void setD(boolean d) {
+ this.d = d;
+ }
+
+ public boolean isE() {
+ return e;
+ }
+
+ public void setE(boolean e) {
+ this.e = e;
+ }
+
+ public boolean isF() {
+ return f;
+ }
+
+ public void setF(boolean f) {
+ this.f = f;
+ }
+
+ public String getSelectedItems() {
+ return (a ? "A " : "") + (b ? "B " : "") + (c ? "C " : "");
+ }
}
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java?rev=1735546&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneChoiceController.java Fri Mar 18 08:28:13 2016
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.tobago.example.demo;
+
+import org.apache.myfaces.tobago.model.SelectItem;
+
+import javax.enterprise.context.SessionScoped;
+import javax.inject.Named;
+import java.io.Serializable;
+
+@SessionScoped
+@Named
+public class SelectOneChoiceController implements Serializable {
+ private SelectItem[] planets;
+ private SelectItem[] earthmoons;
+ private SelectItem[] marsmoons;
+ private SelectItem[] jupitermoons;
+ private int planet;
+ private String person;
+
+ public SelectOneChoiceController() {
+ planets = new SelectItem[]{
+ new SelectItem(0, "Earth"),
+ new SelectItem(1, "Mars"),
+ new SelectItem(2, "Jupiter")};
+ earthmoons = new SelectItem[]{
+ new SelectItem(0, "Moon")
+ };
+ marsmoons = new SelectItem[]{
+ new SelectItem(0, "Phobos"),
+ new SelectItem(1, "Deimos")
+ };
+ jupitermoons = new SelectItem[]{
+ new SelectItem(0, "Europa"),
+ new SelectItem(1, "Ganymed"),
+ new SelectItem(2, "Io"),
+ new SelectItem(3, "Kallisto")
+ };
+ }
+
+ public SelectItem[] getPlanets() {
+ return planets;
+ }
+
+ public int getPlanet() {
+ return planet;
+ }
+
+ public void setPlanet(int planet) {
+ this.planet = planet;
+ }
+
+ public SelectItem[] getMoons() {
+ switch (planet) {
+ case 0:
+ return earthmoons;
+ case 1:
+ return marsmoons;
+ case 2:
+ return jupitermoons;
+ default:
+ return new SelectItem[0];
+ }
+ }
+
+ public String getPerson() {
+ return person;
+ }
+
+ public void setPerson(String person) {
+ this.person = person;
+ }
+}
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java?rev=1735546&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SelectOneRadioController.java Fri Mar 18 08:28:13 2016
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.tobago.example.demo;
+
+import org.apache.myfaces.tobago.model.SelectItem;
+
+import javax.enterprise.context.SessionScoped;
+import javax.inject.Named;
+import java.io.Serializable;
+
+@SessionScoped
+@Named
+public class SelectOneRadioController implements Serializable {
+
+ private int numberOne;
+ private int numberTwo;
+ private int result;
+ private SelectItem[] planets;
+ private SelectItem[] earthmoons;
+ private SelectItem[] marsmoons;
+ private SelectItem[] jupitermoons;
+ private int planet;
+
+ public SelectOneRadioController() {
+ planets = new SelectItem[]{
+ new SelectItem(0, "Earth"),
+ new SelectItem(1, "Mars"),
+ new SelectItem(2, "Jupiter")};
+ earthmoons = new SelectItem[]{
+ new SelectItem(0, "Moon")
+ };
+ marsmoons = new SelectItem[]{
+ new SelectItem(0, "Phobos"),
+ new SelectItem(1, "Deimos")
+ };
+ jupitermoons = new SelectItem[]{
+ new SelectItem(0, "Europa"),
+ new SelectItem(1, "Ganymed"),
+ new SelectItem(2, "Io"),
+ new SelectItem(3, "Kallisto")
+ };
+ }
+
+ public int getNumberOne() {
+ return numberOne;
+ }
+
+ public void setNumberOne(int numberOne) {
+ this.numberOne = numberOne;
+ }
+
+ public int getNumberTwo() {
+ return numberTwo;
+ }
+
+ public void setNumberTwo(int numberTwo) {
+ this.numberTwo = numberTwo;
+ }
+
+ public void add() {
+ result = numberOne + numberTwo;
+ }
+
+ public void subtract() {
+ result = numberOne - numberTwo;
+ }
+
+ public int getResult() {
+ return result;
+ }
+
+ public SelectItem[] getPlanets() {
+ return planets;
+ }
+
+ public int getPlanet() {
+ return planet;
+ }
+
+ public void setPlanet(int planet) {
+ this.planet = planet;
+ }
+
+ public SelectItem[] getMoons() {
+ switch (planet) {
+ case 0:
+ return earthmoons;
+ case 1:
+ return marsmoons;
+ case 2:
+ return jupitermoons;
+ default:
+ return new SelectItem[0];
+ }
+ }
+}
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/10-out/out.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/10-out/out.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/10-out/out.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/10-out/out.xhtml Fri Mar 18 08:28:13 2016
@@ -40,13 +40,15 @@
<tc:section label="Escape off">
<p>Although the HTML code is not escaped, you can see, that the text is not colored.
This is, because the code is sanitzed (see next section).</p>
- <pre><code class="language-markup"><tc:out label="Escape off" escape="false" value="\#{outController.html}"/></code></pre>
+ <pre><code
+ class="language-markup"><tc:out label="Escape off" escape="false" value="\#{outController.html}"/></code></pre>
<tc:out id="o4" label="Escape off" escape="false" value="#{outController.html}"/>
</tc:section>
</tc:section>
<tc:section label="Sanitize">
<p>Sanitize remove HTML/XML-Tags from a given string, if not escaped. It can be configured in the tobago-config.xml.
- If you want to write your own sanitizer, you have to implement <code>org.apache.myfaces.tobago.sanitizer.Sanitizer</code>.</p>
+ If you want to write your own sanitizer, you have to implement
+ <code>org.apache.myfaces.tobago.sanitizer.Sanitizer</code>.</p>
<p>Sanitzing can be deactivated for a component using the <code>sanitize</code> attribute.
But be careful, because of XSS vulnerability.</p>
<pre><code
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/20-label/label.xhtml Fri Mar 18 08:28:13 2016
@@ -30,13 +30,15 @@
</tc:section>
<tc:section label="Input Field">
- <pre><code class="language-markup"><tc:flexLayout columns="*;200px">
- <tc:in placeholder="Inputfield"/>
- <tc:label id="l2" value="Label after inputfield"/>
-</tc:flexLayout></code></pre>
- <tc:flexLayout columns="*;200px">
+ <pre><code class="language-markup"><tc:flexLayout columns="250px;*;200px">
+ <tc:label value="Label in front of inputfield"/>
+ <tc:in placeholder="Inputfield"/>
+ <tc:label value="Label after inputfield"/>
+</tc:flexLayout></code></pre>
+ <tc:flexLayout columns="250px;*;200px">
+ <tc:label id="l2" value="Label in front of inputfield"/>
<tc:in id="i1" placeholder="Inputfield"/>
- <tc:label id="l2" value="Label after inputfield"/>
+ <tc:label id="l3" value="Label after inputfield"/>
</tc:flexLayout>
</tc:section>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/40-image/image.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/40-image/image.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/40-image/image.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/40-image/image.xhtml Fri Mar 18 08:28:13 2016
@@ -23,9 +23,10 @@
<ui:param name="title" value="#{overviewBundle.image} <tc:image>"/>
<p>Create an image with <code class="language-markup"><tc:image/></code></p>
<p>link to attribute-doku</p>
+ <tc:link label="Generated Documentation" link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/link.html"/>
<tc:section label="Basics">
- <pre><code class="language-markup"><tc:image disabled="true" value="image/tobago_head.png"/></code></pre>
- <tc:image id="i1" disabled="true" value="image/tobago_head.png"/>
+ <pre><code class="language-markup"><tc:image value="image/tobago_head.png"/></code></pre>
+ <tc:image id="i1" value="image/tobago_head.png"/>
</tc:section>
<tc:section label="Set width">
<p>To set the size of an image, <code><tc:style/></code> can be used.</p>
@@ -36,4 +37,16 @@
<tc:style width="20%"/>
</tc:image>
</tc:section>
+ <tc:section label="Disable">
+ <p>The <code>disabled</code> attribute can be used, to let the picture look more 'disabled'.</p>
+ <tc:section label="Disabled off">
+ <p>Disabled is 'false' by default.</p>
+ <pre><code class="language-markup"><tc:image disabled="false" value="image/alps.png"/></code></pre>
+ <tc:image id="i3" disabled="false" value="image/alps.png"/>
+ </tc:section>
+ <tc:section label="Disabled on">
+ <pre><code class="language-markup"><tc:image disabled="true" value="image/alps.png"/></code></pre>
+ <tc:image id="i4" disabled="true" value="image/alps.png"/>
+ </tc:section>
+ </tc:section>
</ui:composition>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/60-object/object.xhtml Fri Mar 18 08:28:13 2016
@@ -21,36 +21,97 @@
xmlns:tc="http://myfaces.apache.org/tobago/component"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
- <ui:param name="title" value="#{overviewBundle.object}"/>
+ <ui:param name="title" value="#{overviewBundle.object} <tc:object>"/>
<tc:script file="content/20-component/020-output/60-object/object.js"/>
- <tc:out id="o1"
- value="External objects can be included, when CSP is activated. You may add a frame-src policy to the 'tobago-config.xml'."/>
-
- <p>
- <tc:object id="tobagomap" src="https://www.google.com/maps/@11.249123,-60.687103,31489m/data=!3m1!1e3?hl=de"/>
- </p>
-
- <p>
- <tc:object src="http://www.apache.org/"/>
- </p>
-
- <tc:out id="o11"
- value="External objects can be included, when CSP is activated. You may add a frame-src policy to the 'tobago-config.xml'."/>
-
- <tc:toolBar iconSize="off">
- <tc:toolBarCommand label="Show Tobago" omit="true">
- <tc:dataAttribute name="maps-position" value="11.249123,-60.687103"/>
- <tc:dataAttribute name="maps-zoom" value="12"/>
- <tc:dataAttribute name="maps-target" value="page:map"/>
- </tc:toolBarCommand>
- <tc:toolBarCommand label="Show World" omit="true">
- <tc:dataAttribute name="maps-target" value="page:map"/>
- </tc:toolBarCommand>
- </tc:toolBar>
-
- <p>
- <tc:object id="map"/>
- </p>
-
+ <p>The <code><tc:object></code> tag create an iframe.
+ External objects can be included, when Content Security Policy is activated.
+ You may add a frame-src policy to the 'tobago-config.xml'.</p>
+ <tc:link label="Generated Documentation" link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/object.html"/>
+ <tc:section label="Basics">
+ <pre><code class="language-markup"><tc:object src="https://www.google.com/maps/..."/></code></pre>
+ <tc:object id="o1"
+ src="https://www.google.com/maps/embed?pb=!1m10!1m8!1m3!1d137123.69440217633!2d-60.687103!3d11.249123!3m2!1i1024!2i768!4f13.1!5e1!3m2!1sde!2sus!4v1458208065829"/>
+ </tc:section>
+ <tc:section label="Style">
+ <pre><code class="language-markup"><tc:object src="https://www.google.com/maps/...">
+ <tc:style width="100%"/>
+ </tc:object></code></pre>
+ <tc:object id="o2"
+ src="https://www.google.com/maps/embed?pb=!1m13!1m11!1m3!1d99967845.2048925!2d-60.68710300000001!3d11.249123!2m2!1f0!2f0!3m2!1i1024!2i768!4f13.1!5e1!3m2!1sde!2sus!4v1458208366973">
+ <tc:style width="100%"/>
+ </tc:object>
+ </tc:section>
+ <tc:section label="Toolbar">
+ <p>In this example, the object would be reloaded, after hitting a button.</p>
+ <pre><code class="language-markup"><tc:toolBar iconSize="off">
+ <tc:toolBarCommand label="Show Tobago" omit="true">
+ <tc:dataAttribute name="maps-position" value="11.249123,-60.687103"/>
+ <tc:dataAttribute name="maps-zoom" value="12"/>
+ <tc:dataAttribute name="maps-target" value="page:map"/>
+ </tc:toolBarCommand>
+ <tc:toolBarCommand label="Show World" omit="true">
+ <tc:dataAttribute name="maps-target" value="page:map"/>
+ </tc:toolBarCommand>
+</tc:toolBar>
+
+<tc:object id="map">
+ <tc:style width="100%" height="500px"/>
+</tc:object></code></pre>
+
+ <pre><code class="language-javascript">(function ($) {
+ $.widget("demo.maps", {
+ options: {
+ position: "11.249123,-60.687103", // tobago
+ zoom: 2 // global
+ },
+ _create: function () {
+ this._on({
+ click: function (event) {
+ var position = this.element.data("maps-position");
+ if (position == null) {
+ position = this.options.position;
+ }
+ var zoom = this.element.data("maps-zoom");
+ if (zoom == null) {
+ zoom = this.options.zoom;
+ }
+ var target = this.element.data("maps-target");
+ var url = 'https://maps.google.com/maps?'
+ + 'ie=UTF8&ll=' + position + '&t=h&z='
+ + zoom + '&output=embed&f=q&cd=1';
+ jQuery(Tobago.Utils.escapeClientId(target)).attr('src', url);
+ }
+ });
+ },
+ _setOption: function (key, value) {
+ },
+ _destroy: function () {
+ }
+ });
+}(jQuery));
+
+var initMaps = function () {
+ jQuery("[data-maps-target]")
+ .maps()
+ .first()
+ .click();
+};
+
+Tobago.registerListener(initMaps, Tobago.Phase.DOCUMENT_READY);</code></pre>
+
+ <tc:toolBar iconSize="off">
+ <tc:toolBarCommand label="Show Tobago" omit="true">
+ <tc:dataAttribute name="maps-position" value="11.249123,-60.687103"/>
+ <tc:dataAttribute name="maps-zoom" value="12"/>
+ <tc:dataAttribute name="maps-target" value="page:map"/>
+ </tc:toolBarCommand>
+ <tc:toolBarCommand label="Show World" omit="true">
+ <tc:dataAttribute name="maps-target" value="page:map"/>
+ </tc:toolBarCommand>
+ </tc:toolBar>
+ <tc:object id="map">
+ <tc:style width="100%" height="500px"/>
+ </tc:object>
+ </tc:section>
</ui:composition>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/10-selectBooleanCheckbox/selectBooleanCheckbox.xhtml Fri Mar 18 08:28:13 2016
@@ -22,33 +22,58 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
- <ui:param name="title" value="#{overviewBundle.selectBooleanCheckbox}"/>
- <tc:tabGroup id="tabGroup1">
- <tc:tab label="Basics">
- <tc:selectBooleanCheckbox value="#{selectBoolean.a}" label="A" id="a"/>
- <tc:selectBooleanCheckbox value="#{selectBoolean.b}" label="B" id="b"/>
- <tc:selectBooleanCheckbox value="#{selectBoolean.c}" label="C" id="c"/>
+ <ui:param name="title" value="#{overviewBundle.selectBooleanCheckbox} <tc:selectBooleanCheckbox>"/>
+ <p>The tag <tc:selectBooleanCheckbox/> generate a classic boolean checkbox.</p>
+ <tc:link label="Generated Documentation"
+ link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/selectBooleanCheckbox.html"/>
+ <tc:section label="Basics">
+ <pre><code class="language-markup"><tc:selectBooleanCheckbox label="Checkbox" value="true"/></code></pre>
+ <tc:selectBooleanCheckbox id="s1" label="Checkbox" value="true"/>
+ <tc:selectBooleanCheckbox id="s2" label="Read Only" readonly="true" value="true"/>
+ <tc:selectBooleanCheckbox id="s3" label="Disabled" disabled="true" value="true"/>
+ </tc:section>
- <tc:flowLayout>
- <tc:style textAlign="right"/>
- <tc:button label="Submit" defaultCommand="true" action="#{selectBoolean.submit}"/>
- </tc:flowLayout>
- </tc:tab>
- <tc:tab label="Ajax">
- <tc:selectBooleanCheckbox value="#{selectBoolean.d}" label="D" id="d">
- <f:ajax render="ajax :page:messages" listener="#{selectBoolean.action}"/>
- </tc:selectBooleanCheckbox>
- <tc:out label="Value is" value="#{selectBoolean.d}"/>
+ <tc:section label="Simple Usage">
+ <p>In this example, the selected items are displayed in an outputfield after the submit-button is pressed.</p>
+ <pre><code
+ class="language-markup"><tc:selectBooleanCheckbox label="A" value="\#{selectBooleanCheckboxController.a}"/>
+<tc:selectBooleanCheckbox label="B" value="\#{selectBooleanCheckboxController.b}"/>
+<tc:selectBooleanCheckbox label="C" value="\#{selectBooleanCheckboxController.c}"/>
+<tc:out label="Selected items: " value="\#{selectBooleanCheckboxController.selectedItems}"/>
+<tc:button label="Submit"/></code></pre>
+ <tc:selectBooleanCheckbox id="s4" label="A" value="#{selectBooleanCheckboxController.a}"/>
+ <tc:selectBooleanCheckbox id="s5" label="B" value="#{selectBooleanCheckboxController.b}"/>
+ <tc:selectBooleanCheckbox id="s6" label="C" value="#{selectBooleanCheckboxController.c}"/>
+ <tc:out id="o1" label="Selected items: " value="#{selectBooleanCheckboxController.selectedItems}"/>
+ <tc:button id="b1" label="Submit"/>
+ </tc:section>
- <tc:selectBooleanCheckbox value="#{selectBoolean.e}" label="E" id="e">
- <f:ajax render="ajax"/>
- </tc:selectBooleanCheckbox>
- <tc:out label="Value is" value="#{selectBoolean.e}"/>
-
- <tc:selectBooleanCheckbox value="#{selectBoolean.f}" label="F" id="f">
- <f:ajax render="ajax"/>
- </tc:selectBooleanCheckbox>
- <tc:out label="Value is" value="#{selectBoolean.f}"/>
- </tc:tab>
- </tc:tabGroup>
+ <tc:section label="Ajax">
+ <p>The outputfields always shows the current value of the checkbox.</p>
+ <pre><code class="language-markup"><tc:selectBooleanCheckbox id="s5" label="D" value="#{selectBooleanCheckboxController.d}">
+ <f:ajax render="outputD"/>
+</tc:selectBooleanCheckbox>
+<tc:out id="outputD" label="Value is" value="#{selectBooleanCheckboxController.d}"/>
+<tc:selectBooleanCheckbox id="s6" label="E" value="#{selectBooleanCheckboxController.e}">
+ <f:ajax render="outputE"/>
+</tc:selectBooleanCheckbox>
+<tc:out id="outputE" label="Value is" value="#{selectBooleanCheckboxController.e}"/>
+<tc:selectBooleanCheckbox id="s7" label="F" value="#{selectBooleanCheckboxController.f}">
+ <f:ajax render="outputF"/>
+</tc:selectBooleanCheckbox>
+<tc:out id="outputF" label="Value is" value="#{selectBooleanCheckboxController.f}"/>
+ </code></pre>
+ <tc:selectBooleanCheckbox id="s7" label="D" value="#{selectBooleanCheckboxController.d}">
+ <f:ajax render="outputD"/>
+ </tc:selectBooleanCheckbox>
+ <tc:out id="outputD" label="Value is" value="#{selectBooleanCheckboxController.d}"/>
+ <tc:selectBooleanCheckbox id="s8" label="E" value="#{selectBooleanCheckboxController.e}">
+ <f:ajax render="outputE"/>
+ </tc:selectBooleanCheckbox>
+ <tc:out id="outputE" label="Value is" value="#{selectBooleanCheckboxController.e}"/>
+ <tc:selectBooleanCheckbox id="s9" label="F" value="#{selectBooleanCheckboxController.f}">
+ <f:ajax render="outputF"/>
+ </tc:selectBooleanCheckbox>
+ <tc:out id="outputF" label="Value is" value="#{selectBooleanCheckboxController.f}"/>
+ </tc:section>
</ui:composition>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/20-selectOneChoice/selectOneChoice.xhtml Fri Mar 18 08:28:13 2016
@@ -21,18 +21,66 @@
xmlns:tc="http://myfaces.apache.org/tobago/component"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
- <ui:param name="title" value="Select One Choice: <tc:selectOneChoice>"/>
+ <ui:param name="title" value="#{overviewBundle.selectOneChoice} <tc:selectOneChoice>"/>
+ <p><code class="language-markup"><tc:selectOneChoice/></code> create a dropdownbox.
+ Static entries could be created via <code class="language-markup"><tc:selectItem/></code>.
+ For a list from a controller, use <code
+ class="language-markup"><tc:selectItems value="\#{controller.list}"/></code>.</p>
+ <tc:link label="Generated Documentation"
+ link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/selectOneChoice.html"/>
+
+ <tc:section label="Basics">
+ <p>Dropdown Box with hardcoded items. The second item is disabled.</p>
+ <pre><code class="language-markup"><tc:selectOneChoice label="Dropdown Box">
+ <tc:selectItem itemLabel="Item One" itemValue="one"/>
+ <tc:selectItem itemLabel="Item Two" itemValue="two" itemDisabled="true"/>
+</tc:selectOneChoice></code></pre>
+ <tc:selectOneChoice id="s1" label="Dropdown Box">
+ <tc:selectItem itemLabel="Item One" itemValue="one"/>
+ <tc:selectItem itemLabel="Item Two" itemValue="two" itemDisabled="true"/>
+ </tc:selectOneChoice>
+ <tc:selectOneChoice id="s2" label="Read Only" readonly="true">
+ <tc:selectItem itemLabel="Item One" itemValue="one"/>
+ <tc:selectItem itemLabel="Item Two" itemValue="two"/>
+ </tc:selectOneChoice>
+ <tc:selectOneChoice id="s3" label="Disabled" disabled="true">
+ <tc:selectItem itemLabel="Item One" itemValue="one"/>
+ <tc:selectItem itemLabel="Item Two" itemValue="two"/>
+ </tc:selectOneChoice>
+ </tc:section>
<tc:section label="Simple Usage">
-
- TODO
-
+ <p>Select a person. The label of the item is shown in the dropdownbox.
+ After submitting, the value of the item is shown in the outputfield.</p>
+ <pre><code class="language-markup"><tc:selectOneChoice label="Person" value="\#{selectOneChoiceController.person}">
+ <tc:selectItem itemLabel="Alice" itemValue="Alice Anderson"/>
+ <tc:selectItem itemLabel="Bob" itemValue="Bob Brunch"/>
+</tc:selectOneChoice>
+<tc:out label="Selected Person" value="\#{selectOneChoiceController.person}"/>
+<tc:button label="Submit"/></code></pre>
+ <tc:selectOneChoice id="s4" label="Person" value="#{selectOneChoiceController.person}">
+ <tc:selectItem itemLabel="Alice" itemValue="Alice Anderson"/>
+ <tc:selectItem itemLabel="Bob" itemValue="Bob Brunch"/>
+ </tc:selectOneChoice>
+ <tc:out id="o1" label="Selected Person" value="#{selectOneChoiceController.person}"/>
+ <tc:button id="b1" label="Submit"/>
</tc:section>
- <tc:section label="AJAX" id="ajax">
-
- TODO
-
+ <tc:section label="Ajax">
+ <p>Select a planet and a moon. The list of moons depends on the selected planet.</p>
+ <pre><code class="language-markup"><tc:selectOneChoice label="Planet" value="\#{selectOneChoiceController.planet}">
+ <f:selectItems value="\#{selectOneChoiceController.planets}"/>
+ <f:ajax render="moonbox"/>
+</tc:selectOneChoice>
+<tc:selectOneChoice id="moonbox" label="Moon">
+ <f:selectItems value="\#{selectOneChoiceController.moons}"/>
+</tc:selectOneChoice></code></pre>
+ <tc:selectOneChoice id="s5" label="Planet" value="#{selectOneChoiceController.planet}">
+ <f:selectItems value="#{selectOneChoiceController.planets}"/>
+ <f:ajax render="moonbox"/>
+ </tc:selectOneChoice>
+ <tc:selectOneChoice id="moonbox" label="Moon">
+ <f:selectItems value="#{selectOneChoiceController.moons}"/>
+ </tc:selectOneChoice>
</tc:section>
-
</ui:composition>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/30-selectOneRadio/selectOneRadio.xhtml Fri Mar 18 08:28:13 2016
@@ -22,17 +22,94 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
<ui:param name="title" value="Select One Radio: <tc:selectOneRadio>"/>
+ <p>A group of radiobuttons will be created with the <code class="language-markup"><tc:selectOneRadio/></code> tag.
+ Static entries are added with <code class="language-markup"><tc:selectItem/></code> tag.
+ A list from a controller is added with
+ <code class="language-markup"><tc:selectItems value="\#{controller.list}"/></code>.</p>
+ <tc:link label="Generated Documentation"
+ link="https://myfaces.apache.org/tobago/doc/2.0.9/tld/tc/selectOneRadio.html"/>
+
+ <tc:section label="Basics">
+ <p>Radiobutton group with a label. The last item is disabled.
+ Also the label set on top with the <code>labelLayout</code> attribute.</p>
+ <pre><code class="language-markup"><tc:selectOneRadio label="Radio Group">
+ <tc:selectItem itemLabel="Sun" itemValue="solis"/>
+ <tc:selectItem itemLabel="Moon" itemValue="luna"/>
+ <tc:selectItem itemLabel="Stars" itemValue="stella" itemDisabled="true"/>
+ </tc:selectOneRadio></code></pre>
+ <tc:segmentLayout large="4;4;4">
+ <tc:selectOneRadio id="s1" label="Radio Group" labelLayout="top">
+ <tc:selectItem itemLabel="Sun" itemValue="solis"/>
+ <tc:selectItem itemLabel="Moon" itemValue="luna"/>
+ <tc:selectItem itemLabel="Stars" itemValue="stella" itemDisabled="true"/>
+ </tc:selectOneRadio>
+ <tc:selectOneRadio id="s2" label="Read Only" labelLayout="top" readonly="true">
+ <tc:selectItem itemLabel="Sun" itemValue="solis"/>
+ <tc:selectItem itemLabel="Moon" itemValue="luna"/>
+ <tc:selectItem itemLabel="Stars" itemValue="stella" itemDisabled="true"/>
+ </tc:selectOneRadio>
+ <tc:selectOneRadio id="s3" label="Disabled" labelLayout="top" disabled="true">
+ <tc:selectItem itemLabel="Sun" itemValue="solis"/>
+ <tc:selectItem itemLabel="Moon" itemValue="luna"/>
+ <tc:selectItem itemLabel="Stars" itemValue="stella" itemDisabled="true"/>
+ </tc:selectOneRadio>
+ </tc:segmentLayout>
+ </tc:section>
<tc:section label="Simple Usage">
-
- TODO
-
+ <p>Add number one to number two or subtract number two from number one.</p>
+ <pre><code class="language-markup"><tc:selectOneRadio label="Number 1" labelLayout="top"
+ value="\#{selectOneRadioController.numberOne}">
+ <tc:selectItem itemLabel="1" itemValue="1"/>
+ <tc:selectItem itemLabel="2" itemValue="2"/>
+ <tc:selectItem itemLabel="4" itemValue="4"/>
+</tc:selectOneRadio>
+<tc:selectOneRadio label="Number 2" labelLayout="top"
+ value="\#{selectOneRadioController.numberTwo}">
+ <tc:selectItem itemLabel="1" itemValue="1"/>
+ <tc:selectItem itemLabel="2" itemValue="2"/>
+ <tc:selectItem itemLabel="4" itemValue="4"/>
+</tc:selectOneRadio>
+<tc:out label="Result" value="\#{selectOneRadioController.result}"/>
+<tc:button label="Addition" action="\#{selectOneRadioController.add}"/>
+<tc:button label="Subtraction" action="\#{selectOneRadioController.subtract}"/></code></pre>
+ <tc:segmentLayout large="6;6">
+ <tc:selectOneRadio id="s4" label="Number 1" labelLayout="top" value="#{selectOneRadioController.numberOne}">
+ <tc:selectItem itemLabel="1" itemValue="1"/>
+ <tc:selectItem itemLabel="2" itemValue="2"/>
+ <tc:selectItem itemLabel="4" itemValue="4"/>
+ </tc:selectOneRadio>
+ <tc:selectOneRadio id="s5" label="Number 2" labelLayout="top" value="#{selectOneRadioController.numberTwo}">
+ <tc:selectItem itemLabel="1" itemValue="1"/>
+ <tc:selectItem itemLabel="2" itemValue="2"/>
+ <tc:selectItem itemLabel="4" itemValue="4"/>
+ </tc:selectOneRadio>
+ </tc:segmentLayout>
+ <tc:out id="o1" label="Result" value="#{selectOneRadioController.result}"/>
+ <tc:flowLayout>
+ <tc:button id="b1" label="Addition" action="#{selectOneRadioController.add}"/>
+ <tc:button id="b2" label="Subtraction" action="#{selectOneRadioController.subtract}"/>
+ </tc:flowLayout>
</tc:section>
- <tc:section label="AJAX" id="ajax">
-
- TODO
-
+ <tc:section label="Ajax">
+ <p>Select a planet on the left. One the right side, you can select one of the moons.</p>
+ <pre><code class="language-markup"><tc:selectOneRadio label="Planet" labelLayout="top"
+ value="\#{selectOneRadioController.planet}">
+ <f:selectItems value="\#{selectOneRadioController.planets}"/>
+ <f:ajax render="moonradio"/>
+</tc:selectOneRadio>
+<tc:selectOneRadio id="moonradio" label="Moon" labelLayout="top">
+ <f:selectItems value="\#{selectOneRadioController.moons}"/>
+</tc:selectOneRadio></code></pre>
+ <tc:segmentLayout large="6;6">
+ <tc:selectOneRadio id="s6" label="Planet" labelLayout="top" value="#{selectOneRadioController.planet}">
+ <f:selectItems value="#{selectOneRadioController.planets}"/>
+ <f:ajax render="moonradio"/>
+ </tc:selectOneRadio>
+ <tc:selectOneRadio id="moonradio" label="Moon" labelLayout="top">
+ <f:selectItems value="#{selectOneRadioController.moons}"/>
+ </tc:selectOneRadio>
+ </tc:segmentLayout>
</tc:section>
-
</ui:composition>
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/select.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/select.xhtml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/select.xhtml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/030-select/select.xhtml Fri Mar 18 08:28:13 2016
@@ -37,11 +37,11 @@
</f:facet>
</tc:selectBooleanCheckbox>
- <tc:selectBooleanCheckbox label="Value is Boolean" value="#{selectBooleanCheckboxController.normalBoolean}"/>
+ <!--<tc:selectBooleanCheckbox label="Value is Boolean" value="#{selectBooleanCheckboxController.normalBoolean}"/>-->
- <tc:selectBooleanCheckbox label="Converter for Boolean" value="#{selectBooleanCheckboxController.onOffString}">
- <f:converter converterId="org.apache.myfaces.tobago.example.demo.OnOffConverter"/>
- </tc:selectBooleanCheckbox>
+ <!--<tc:selectBooleanCheckbox label="Converter for Boolean" value="#{selectBooleanCheckboxController.onOffString}">-->
+ <!--<f:converter converterId="org.apache.myfaces.tobago.example.demo.OnOffConverter"/>-->
+ <!--</tc:selectBooleanCheckbox>-->
<tc:selectManyListbox label="Contact via: ">
<f:selectItem itemValue="Phone" itemLabel="Phone"/>
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/image/alps.png
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/image/alps.png?rev=1735546&view=auto
==============================================================================
Binary file - no diff available.
Propchange: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/image/alps.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml?rev=1735546&r1=1735545&r2=1735546&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/tobago-resource/html/standard/standard/property/overview.properties.xml Fri Mar 18 08:28:13 2016
@@ -50,6 +50,9 @@
<entry key="object">External Object (iframe)</entry>
<entry key="select">Select</entry>
<entry key="selectBooleanCheckbox">Boolean Checkbox</entry>
+ <entry key="selectOneChoice">Dropdown Box</entry>
+ <entry key="selectOneRadio">Radio Button</entry>
+ <entry key="selectOneListbox">List</entry>
<entry key="sheet">Sheet Control</entry>
<entry key="tree">Tree Control</entry>