myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r475718 - in /myfaces/tobago/trunk/tobago-tool/gendoc/src/main: java/org/apache/myfaces/tobago/example/reference/SimpleBean.java webapp/screenshot/sheet.jsp
Date Thu, 16 Nov 2006 12:57:27 GMT
Author: lofwyr
Date: Thu Nov 16 04:57:26 2006
New Revision: 475718

URL: http://svn.apache.org/viewvc?view=rev&rev=475718
Log:
simple sheet sample

Added:
    myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java
  (with props)
Modified:
    myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/sheet.jsp

Added: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java?view=auto&rev=475718
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java
(added)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java
Thu Nov 16 04:57:26 2006
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2006 Atanion GmbH, Germany
+ * All rights reserved. Created 16.11.2006 12:13:42.
+ * $Id$
+ */
+package org.apache.myfaces.tobago.example.reference;
+
+public class SimpleBean {
+
+  private String name;
+
+  public SimpleBean(String name) {
+    this.name = name;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+}

Propchange: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/java/org/apache/myfaces/tobago/example/reference/SimpleBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/sheet.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/sheet.jsp?view=diff&rev=475718&r1=475717&r2=475718
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/sheet.jsp (original)
+++ myfaces/tobago/trunk/tobago-tool/gendoc/src/main/webapp/screenshot/sheet.jsp Thu Nov 16
04:57:26 2006
@@ -14,4 +14,46 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
 --%>
-todo
+<%@ page import="org.apache.myfaces.tobago.example.reference.SimpleBean" %>
+
+<%
+  SimpleBean[] simpleList = (SimpleBean[]) session.getAttribute("simpleList");
+  System.out.println("1" + session.getAttribute("simpleList"));
+  if (simpleList == null) {
+    simpleList = new SimpleBean[]{
+        new SimpleBean("One"),
+        new SimpleBean("Two"),
+        new SimpleBean("Three"),
+        new SimpleBean("Four")};
+  }
+  session.setAttribute("simpleList", simpleList);
+  System.out.println("2" + session.getAttribute("simpleList"));
+%>
+
+<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
+
+<layout:screenshot>
+  <f:subview id="tree">
+    <jsp:body>
+      <tc:panel>
+        <f:facet name="layout">
+          <tc:gridLayout rows="fixed;*;fixed"/>
+        </f:facet>
+
+        <tc:messages/>
+
+        <tc:sheet value="#{simpleList}" columns="*" var="bean">
+          <tc:column label="Number">
+            <tc:in value="#{bean.name}" required="true"/>
+          </tc:column>
+        </tc:sheet>
+
+        <tc:button label="submit"/>
+
+      </tc:panel>
+
+    </jsp:body>
+  </f:subview>
+</layout:screenshot>



Mime
View raw message