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 2007/10/23 20:52:47 UTC

svn commit: r587605 - in /myfaces/tobago/trunk/sandbox/src/main: java/org/apache/myfaces/tobago/model/BeanItem.java resources/META-INF/bean.xml resources/META-INF/tobago-facelet-sandbox.taglib.xml

Author: lofwyr
Date: Tue Oct 23 11:52:47 2007
New Revision: 587605

URL: http://svn.apache.org/viewvc?rev=587605&view=rev
Log:
TOBAGO-519: Bean Tag

Added:
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/BeanItem.java
    myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/bean.xml
    myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-facelet-sandbox.taglib.xml
      - copied, changed from r587462, myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-sandbox.taglib.xml

Added: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/BeanItem.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/BeanItem.java?rev=587605&view=auto
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/BeanItem.java (added)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/model/BeanItem.java Tue Oct 23 11:52:47 2007
@@ -0,0 +1,47 @@
+package org.apache.myfaces.tobago.model;
+
+/**
+ * User: lofwyr
+ * Date: 23.10.2007 16:46:48
+ */
+public class BeanItem {
+
+  private String type;
+  private String name;
+  private String value;
+
+  public BeanItem(String type, String name, String value) {
+    this.type = type;
+    this.name = name;
+    this.value = value;
+  }
+
+  public String getType() {
+    return type;
+  }
+
+  public void setType(String type) {
+    this.type = type;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+  @Override
+  public String toString() {
+    return type + " " + name + " " + value;
+  }
+}

Added: myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/bean.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/bean.xml?rev=587605&view=auto
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/bean.xml (added)
+++ myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/bean.xml Tue Oct 23 11:52:47 2007
@@ -0,0 +1,29 @@
+<ui:composition xmlns:c="http://java.sun.com/jstl/core"
+                xmlns:f="http://java.sun.com/jsf/core"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:tx="http://myfaces.apache.org/tobago/extension">
+
+  <tc:panel>
+    <f:facet name="layout">
+      <tc:gridLayout/>
+    </f:facet>
+
+    <tc:out value="${controller.index}-te Seite">
+    </tc:out>
+
+    <c:forEach items="${controller.items}" var="item">
+
+      <c:if test="${item.type == 'out'}">
+        <tc:out value="${item.value}"/>
+      </c:if>
+
+      <c:if test="${item.type == 'in'}">
+        <tx:in label="${item.name}" value="${item.value}"/>
+      </c:if>
+
+    </c:forEach>
+
+  </tc:panel>
+
+</ui:composition>

Copied: myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-facelet-sandbox.taglib.xml (from r587462, myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-sandbox.taglib.xml)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-facelet-sandbox.taglib.xml?p2=myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-facelet-sandbox.taglib.xml&p1=myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-sandbox.taglib.xml&r1=587462&r2=587605&rev=587605&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-sandbox.taglib.xml (original)
+++ myfaces/tobago/trunk/sandbox/src/main/resources/META-INF/tobago-facelet-sandbox.taglib.xml Tue Oct 23 11:52:47 2007
@@ -1,5 +1,13 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
 <facelet-taglib>
-  <library-class>org.apache.myfaces.tobago.facelets.TobagoSandboxTagLibrary</library-class>
+  <namespace>http://myfaces.apache.org/tobago/facelet-sandbox</namespace>
+  <tag>
+    <tag-name>wizard</tag-name>
+    <source>wizard.xml</source>
+  </tag>
+  <tag>
+    <tag-name>bean</tag-name>
+    <source>bean.xml</source>
+  </tag>
 </facelet-taglib>