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 2013/10/14 10:24:45 UTC
svn commit: r1531813 - in
/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main:
java/org/apache/myfaces/tobago/example/test/ webapp/test/forEach/
Author: lofwyr
Date: Mon Oct 14 08:24:44 2013
New Revision: 1531813
URL: http://svn.apache.org/r1531813
Log:
fix example
Modified:
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DynamicBean.java
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/dynamic-include.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-one.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-three.xhtml
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-two.xhtml
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DynamicBean.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DynamicBean.java?rev=1531813&r1=1531812&r2=1531813&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DynamicBean.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/java/org/apache/myfaces/tobago/example/test/DynamicBean.java Mon Oct 14 08:24:44 2013
@@ -45,11 +45,13 @@ public class DynamicBean {
new FacesMessage(FacesMessage.SEVERITY_WARN, "All panels where added!", null));
}
return "/test/forEach/dynamic-include.xhtml";
+// return null;
}
public String reset() {
panels.clear();
return "/test/forEach/dynamic-include.xhtml";
+// return null;
}
public List<DynamicPanel> getPanels() {
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/dynamic-include.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/dynamic-include.xhtml?rev=1531813&r1=1531812&r2=1531813&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/dynamic-include.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/dynamic-include.xhtml Mon Oct 14 08:24:44 2013
@@ -18,10 +18,11 @@
This example demonstrates dynamic includes with Facelets.
</p>
<p>
- It seems to work with Mojarra, but not with MyFaces.
+ <b>Important:</b> Use the "panel" variable only in Facelet Tags like ui:include, not in Components!
</p>
<p>
- <b>Warning:</b> Using c:forEach with dynamic content may produces several problems.
+ <b>Important:</b> The action has to return a view-id, and not null,
+ So you ensure you get a new view, and no problems with ids.
</p>
</tc:panel>
<tc:messages/>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-one.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-one.xhtml?rev=1531813&r1=1531812&r2=1531813&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-one.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-one.xhtml Mon Oct 14 08:24:44 2013
@@ -11,6 +11,6 @@
<tc:gridLayout margin="10px" columns="500px" rows="fixed;fixed"/>
</f:facet>
<tc:separator label="Panel One"/>
- <tx:in label="Value One" value="#{panel.value}" />
+ <tx:in label="Value One" value="#{panel1.value}" />
</tc:panel>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-three.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-three.xhtml?rev=1531813&r1=1531812&r2=1531813&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-three.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-three.xhtml Mon Oct 14 08:24:44 2013
@@ -11,7 +11,7 @@
<tc:gridLayout margin="10px" columns="500px" rows="fixed;fixed"/>
</f:facet>
<tc:separator label="Panel Three"/>
- <tx:in label="Street" value="#{panel.street}" />
- <tx:in label="City" value="#{panel.city}" />
+ <tx:in label="Street" value="#{panel3.street}" />
+ <tx:in label="City" value="#{panel3.city}" />
</tc:panel>
</ui:composition>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-two.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-two.xhtml?rev=1531813&r1=1531812&r2=1531813&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-two.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/test/forEach/panel-two.xhtml Mon Oct 14 08:24:44 2013
@@ -11,7 +11,7 @@
<tc:gridLayout margin="10px" columns="500px" rows="fixed;fixed"/>
</f:facet>
<tc:separator label="Panel Two"/>
- <tx:in label="First Name" value="#{panel.firstName}" />
- <tx:in label="Second Name" value="#{panel.secondName}" />
+ <tx:in label="First Name" value="#{panel2.firstName}" />
+ <tx:in label="Second Name" value="#{panel2.secondName}" />
</tc:panel>
</ui:composition>