You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ha...@apache.org on 2008/11/14 00:36:40 UTC
svn commit: r713866 - in /myfaces/tomahawk/trunk/sandbox/examples/src/main:
java/org/apache/myfaces/examples/renderone/
java/org/apache/myfaces/examples/renderone/RenderOneBean.java
webapp/WEB-INF/examples-config.xml webapp/home.jsp webapp/renderOne.jsp
Author: hazems
Date: Thu Nov 13 15:36:40 2008
New Revision: 713866
URL: http://svn.apache.org/viewvc?rev=713866&view=rev
Log:
Rolling back renderOne Tomahawk promotion till the vote completes.
Added:
myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/renderone/
myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/renderone/RenderOneBean.java
myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/renderOne.jsp
Modified:
myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml
myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/renderone/RenderOneBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/renderone/RenderOneBean.java?rev=713866&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/renderone/RenderOneBean.java (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/renderone/RenderOneBean.java Thu Nov 13 15:36:40 2008
@@ -0,0 +1,107 @@
+/*
+ * 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.examples.renderone;
+
+import java.io.Serializable;
+
+/**
+ * @author Andrew Robinson (latest modification by $Author: skitching $)
+ * @version $Revision: 676967 $ $Date: 2008-07-15 18:57:23 +0200 (Tue, 15 Jul 2008) $
+ */
+public class RenderOneBean implements Serializable
+{
+ private boolean aRendered = false;
+ private boolean cRendered = true;
+ private boolean dRendered = true;
+ private boolean bRendered = true;
+
+ private Integer index = new Integer("2");
+
+ /**
+ * @return the index
+ */
+ public Integer getIndex()
+ {
+ return this.index;
+ }
+
+ /**
+ * @return the aRendered
+ */
+ public boolean isARendered()
+ {
+ return this.aRendered;
+ }
+
+ /**
+ * @param rendered the aRendered to set
+ */
+ public void setARendered(boolean rendered)
+ {
+ this.aRendered = rendered;
+ }
+
+ /**
+ * @return the cRendered
+ */
+ public boolean isCRendered()
+ {
+ return this.cRendered;
+ }
+
+ /**
+ * @param rendered the cRendered to set
+ */
+ public void setCRendered(boolean rendered)
+ {
+ this.cRendered = rendered;
+ }
+
+ /**
+ * @return the dRendered
+ */
+ public boolean isDRendered()
+ {
+ return this.dRendered;
+ }
+
+ /**
+ * @param rendered the dRendered to set
+ */
+ public void setDRendered(boolean rendered)
+ {
+ this.dRendered = rendered;
+ }
+
+ /**
+ * @return the bRendered
+ */
+ public boolean isBRendered()
+ {
+ return this.bRendered;
+ }
+
+ /**
+ * @param rendered the bRendered to set
+ */
+ public void setBRendered(boolean rendered)
+ {
+ this.bRendered = rendered;
+ }
+}
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml?rev=713866&r1=713865&r2=713866&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml Thu Nov 13 15:36:40 2008
@@ -525,6 +525,14 @@
<managed-bean-class>org.apache.myfaces.examples.passwordStrength.PasswordStrengthBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
+
+
+ <!-- managed bean for renderOne -->
+ <managed-bean>
+ <managed-bean-name>renderOne</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.examples.renderone.RenderOneBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
<!-- navigation rules -->
<navigation-rule>
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp?rev=713866&r1=713865&r2=713866&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp Thu Nov 13 15:36:40 2008
@@ -179,6 +179,13 @@
<f:verbatim>Media - component to display media content, such as audio, video, or image in a player embedded in the user agent.</f:verbatim>
</h:outputLink>
</h:panelGrid>
+
+ <h:outputText value="renderOne"/>
+ <h:panelGrid style="padding-left:25px">
+ <h:outputLink value="renderOne.jsf" >
+ <f:verbatim>renderOne - render the first child component by order or by index</f:verbatim>
+ </h:outputLink>
+ </h:panelGrid>
<f:verbatim><br/><br/><br/><br/><br/><br/><br/></f:verbatim>
</h:form>
Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/renderOne.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/renderOne.jsp?rev=713866&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/renderOne.jsp (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/renderOne.jsp Thu Nov 13 15:36:40 2008
@@ -0,0 +1,61 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<html>
+
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<%@include file="inc/head.inc" %>
+
+<body>
+<f:view>
+ <h:form>
+
+ <h:outputText value="Output:" />
+ <h:panelGrid columns="2">
+ <h:outputText value="'first' will display the first rendered child component only (will render only B):" />
+ <s:renderOne>
+ <h:outputText value="<b>A - FirstItem</b>" rendered="#{renderOne.ARendered}" escape="false"/>
+ <h:outputText value="<b>B - SecondItem</b>" rendered="#{renderOne.BRendered}" escape="false"/>
+ <h:outputText value="<b>C - ThirdItem</b>" rendered="#{renderOne.CRendered}" escape="false"/>
+ <h:outputText value="<b>D - FourthItem</b>" rendered="#{renderOne.DRendered}" escape="false"/>
+ </s:renderOne>
+
+ <h:outputText value="'index' will display the third component only (will render only C):" />
+ <s:renderOne type="index" value="#{renderOne.index}">
+ <h:outputText value="<b>A - FirstItem</b>" rendered="#{renderOne.ARendered}" escape="false"/>
+ <h:outputText value="<b>B - SecondItem</b>" rendered="#{renderOne.BRendered}" escape="false"/>
+ <h:outputText value="<b>C - ThirdItem</b>" rendered="#{renderOne.CRendered}" escape="false"/>
+ <h:outputText value="<b>D - FourthItem</b>" rendered="#{renderOne.DRendered}" escape="false"/>
+ </s:renderOne>
+
+ </h:panelGrid>
+
+ </h:form>
+</f:view>
+
+<%@include file="inc/page_footer.jsp" %>
+
+</body>
+</html>