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 2011/02/15 13:02:27 UTC

svn commit: r1070854 - in /myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main: java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java webapp/WEB-INF/tobago-config.xml webapp/overview/sheet.jsp webapp/style/ webapp/style/style.css

Author: lofwyr
Date: Tue Feb 15 12:02:27 2011
New Revision: 1070854

URL: http://svn.apache.org/viewvc?rev=1070854&view=rev
Log:
demonstrates markup for tc:column

Added:
    myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/style/
    myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/style/style.css
Modified:
    myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java
    myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/WEB-INF/tobago-config.xml
    myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/overview/sheet.jsp

Modified: myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java?rev=1070854&r1=1070853&r2=1070854&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/model/solar/SolarObject.java Tue Feb 15 12:02:27 2011
@@ -89,6 +89,18 @@ public class SolarObject {
     return name;
   }
 
+  public String getMarkup() {
+    if (name.equals("Sun")) {
+      return "sun";
+    } else {
+      if (orbit.equals("Sun")) {
+        return "planet";
+      } else {
+        return "moon";
+      }
+    }
+  }
+
   public void setName(String name) {
     this.name = name;
   }

Modified: myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/WEB-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/WEB-INF/tobago-config.xml?rev=1070854&r1=1070853&r2=1070854&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/WEB-INF/tobago-config.xml (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/WEB-INF/tobago-config.xml Tue Feb 15 12:02:27 2011
@@ -35,4 +35,16 @@
 
   <create-session-secret>true</create-session-secret>
   <check-session-secret>true</check-session-secret>
+
+  <renderers>
+    <renderer>
+      <name>Column</name>
+      <supported-markup>
+        <markup>sun</markup>
+        <markup>planet</markup>
+        <markup>moon</markup>
+      </supported-markup>
+    </renderer>
+  </renderers>
+
 </tobago-config>

Modified: myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/overview/sheet.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/overview/sheet.jsp?rev=1070854&r1=1070853&r2=1070854&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/overview/sheet.jsp (original)
+++ myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/overview/sheet.jsp Tue Feb 15 12:02:27 2011
@@ -128,7 +128,8 @@
           <tc:reload frequency="5000"/>
         </f:facet>
 --%>
-        <tc:column label="#{overviewBundle.solarArrayName}" id="name" sortable="true" resizable="false">
+        <tc:column label="#{overviewBundle.solarArrayName}" id="name" sortable="true" resizable="false"
+                   markup="#{luminary.markup}">
           <tc:out value="#{luminary.name}" id="t_name"/>
         </tc:column>
         <tc:column label="#{overviewBundle.solarArrayNumber}" id="number" sortable="false" resizable="false"

Added: myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/style/style.css?rev=1070854&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/style/style.css (added)
+++ myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/style/style.css Tue Feb 15 12:02:27 2011
@@ -0,0 +1,9 @@
+.tobago-column-markup-sun {
+  background-color: #fffacd;
+}
+.tobago-column-markup-planet {
+  background-color: #ffb6c1;
+}
+.tobago-column-markup-moon {
+  background-color: #6495ed;
+}