You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/06/01 17:11:13 UTC

svn commit: r1130182 - in /myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp: META-INF/templates/leftmenu.xhtml roundedPanel.xhtml

Author: lu4242
Date: Wed Jun  1 15:11:12 2011
New Revision: 1130182

URL: http://svn.apache.org/viewvc?rev=1130182&view=rev
Log:
TOMAHAWK-1594 Add s:roundedPanel component

Added:
    myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/roundedPanel.xhtml
Modified:
    myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/META-INF/templates/leftmenu.xhtml

Modified: myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/META-INF/templates/leftmenu.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/META-INF/templates/leftmenu.xhtml?rev=1130182&r1=1130181&r2=1130182&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/META-INF/templates/leftmenu.xhtml (original)
+++ myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/META-INF/templates/leftmenu.xhtml Wed Jun  1 15:11:12 2011
@@ -38,6 +38,7 @@
         <li class="none"><h:link outcome="jsCallbackFunction" value="s:jsCallbackFunction"></h:link></li>
         <li class="none"><h:link outcome="jsOnEventAjax" value="s:jsOnEventAjax"></h:link></li>
         <li class="none"><h:link outcome="passwordStrength" value="s:passwordStrength"></h:link></li>
+        <li class="none"><h:link outcome="roundedPanel" value="s:roundedPanel"></h:link></li>
     </ul>
 </ui:composition>
 </body>

Added: myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/roundedPanel.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/roundedPanel.xhtml?rev=1130182&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/roundedPanel.xhtml (added)
+++ myfaces/tomahawk/trunk/sandbox/examples20/src/main/webapp/roundedPanel.xhtml Wed Jun  1 15:11:12 2011
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+        xmlns:f="http://java.sun.com/jsf/core"
+        xmlns:h="http://java.sun.com/jsf/html"
+        xmlns:ui="http://java.sun.com/jsf/facelets"
+        xmlns:t="http://myfaces.apache.org/tomahawk"
+        xmlns:s="http://myfaces.apache.org/sandbox"
+        xmlns:mc="http://myfaces.apache.org/commons/components">
+<!--
+/*
+ * 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.
+ */
+//-->
+<body>
+<ui:composition template="/META-INF/templates/example_template.xhtml">
+  <ui:define name="main_content">
+    <p>This example shows how use s:roundedPanel to generate rounded corners</p>
+    <p>The first panel uses 'div' layout</p>
+    <br/>
+    <!--     
+    <s:roundedPanel color="#669933" backgroundColor="#FFFFFF" radius="12" style="width:24px">
+    </s:roundedPanel>
+    <br/>
+     -->
+    
+    <s:roundedPanel color="#669933" backgroundColor="#FFFFFF" radius="12" style="width:260px" contentStyle="margin-left:12px;margin-right:12px">
+      <s:roundedPanel color="#996600" backgroundColor="#669933" radius="12" style="width:100%" contentStyle="margin-left:12px;margin-right:12px">
+        <h:panelGrid columns="2">
+            <h:outputLabel for="name" value="Name" style="color:white"/>
+            <h:inputText id="name"/>
+        </h:panelGrid>
+      </s:roundedPanel>
+    </s:roundedPanel>
+    <br/>
+    <p>The second panel uses 'table' layout. If you take a look at the code you'll notice the difference for set margins for the content.</p>
+    <br/>
+    <s:roundedPanel color="#669933" backgroundColor="#FFFFFF" radius="12" layout="table" style="width:260px" contentStyle="">
+      <s:roundedPanel color="#996600" backgroundColor="#669933" radius="12" layout="table" style="width:236px;margin-left:12px;margin-right:12px">
+        <h:panelGrid cellpadding="0" cellspacing="0" columns="2" style="margin-left:12px;margin-right:12px">
+            <h:outputLabel for="name" value="Name" style="color:white"/>
+            <h:inputText id="name"/>
+        </h:panelGrid>
+      </s:roundedPanel>
+    </s:roundedPanel>
+  </ui:define>
+ </ui:composition>
+</body>
+</html>
\ No newline at end of file