myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r548297 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/component/ core/src/main/java/org/apache/myfaces/tobago/taglib/component/ example/sandbox/src/main/webapp/ sandbox/src/main/java/org/apache/myfaces/tobago/comp...
Date Mon, 18 Jun 2007 10:44:35 GMT
Author: lofwyr
Date: Mon Jun 18 03:44:27 2007
New Revision: 548297

URL: http://svn.apache.org/viewvc?view=rev&rev=548297
Log:
TOBAGO-430: Separator Tag to separate components (e. g. inside a panel)
moving from sandbox to core

Added:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java
  (contents, props changed)
      - copied, changed from r542456, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SeparatorTagDeclaration.java
  (contents, props changed)
      - copied, changed from r542456, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/SeparatorTagDeclaration.java
    myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/
    myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/
    myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/
    myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/
    myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
Removed:
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SeparatorRenderer.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/SeparatorTag.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/SeparatorTagDeclaration.java
Modified:
    myfaces/tobago/trunk/example/sandbox/src/main/webapp/separator.jsp
    myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/style/style.css
    myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java
(from r542456, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java?view=diff&rev=548297&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java&r1=542456&p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java&r2=548297
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java
Mon Jun 18 03:44:27 2007
@@ -19,11 +19,6 @@
 
 import javax.faces.component.UIComponentBase;
 
-/*
- * User: bommel
- * Date: Sep 18, 2006
- * Time: 8:05:31 PM
- */
 public class UISeparator extends UIComponentBase {
 
   public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Separator";

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UISeparator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SeparatorTagDeclaration.java
(from r542456, myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/SeparatorTagDeclaration.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SeparatorTagDeclaration.java?view=diff&rev=548297&p1=myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/SeparatorTagDeclaration.java&r1=542456&p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SeparatorTagDeclaration.java&r2=548297
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/SeparatorTagDeclaration.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SeparatorTagDeclaration.java
Mon Jun 18 03:44:27 2007
@@ -1,4 +1,4 @@
-package org.apache.myfaces.tobago.taglib.sandbox;
+package org.apache.myfaces.tobago.taglib.component;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,22 +17,14 @@
  * limitations under the License.
  */
 
-import org.apache.myfaces.tobago.taglib.component.TobagoTagDeclaration;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.apt.annotation.Facet;
 import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
-import org.apache.myfaces.tobago.apt.annotation.Facet;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 
-/*
- * Created by IntelliJ IDEA.
- * User: bommel
- * Date: Oct 3, 2006
- * Time: 11:52:52 AM
- */
 /**
  * Renders a separator.
  */
-
 @Tag(name = "separator")
 @UIComponentTag(rendererType = "Separator",
     uiComponent = "org.apache.myfaces.tobago.component.UISeparator",

Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SeparatorTagDeclaration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/tobago/trunk/example/sandbox/src/main/webapp/separator.jsp
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/sandbox/src/main/webapp/separator.jsp?view=diff&rev=548297&r1=548296&r2=548297
==============================================================================
--- myfaces/tobago/trunk/example/sandbox/src/main/webapp/separator.jsp (original)
+++ myfaces/tobago/trunk/example/sandbox/src/main/webapp/separator.jsp Mon Jun 18 03:44:27
2007
@@ -15,12 +15,6 @@
  * limitations under the License.
 --%>
 
-<%--
-  User: bommel
-  Date: Nov 20, 2006
-  Time: 9:29:45 AM
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/sandbox" prefix="tcs" %>
 <%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
 <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
@@ -38,11 +32,11 @@
       </f:facet>
 
       <tc:cell spanX="2">
-        <tcs:separator>
+        <tc:separator>
           <f:facet name="label">
             <tc:label value="Separator with Label"/>
           </f:facet>
-        </tcs:separator>
+        </tc:separator>
       </tc:cell>
 
       <tc:panel>
@@ -50,7 +44,7 @@
           <tc:gridLayout rows="*;fixed;2*"/>
         </f:facet>
         <tc:textarea/>
-        <tcs:separator/>
+        <tc:separator/>
         <tc:textarea/>
       </tc:panel>
 
@@ -59,11 +53,11 @@
           <tc:gridLayout rows="2*;fixed;*"/>
         </f:facet>
         <tc:textarea/>
-        <tcs:separator>
+        <tc:separator>
           <f:facet name="label">
             <tc:label value="Separator with Label"/>
           </f:facet>
-        </tcs:separator>
+        </tc:separator>
         <tc:textarea/>
       </tc:panel>
 

Modified: myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/style/style.css?view=diff&rev=548297&r1=548296&r2=548297
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/style/style.css
(original)
+++ myfaces/tobago/trunk/sandbox/src/main/resources/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/style/style.css
Mon Jun 18 03:44:27 2007
@@ -15,37 +15,6 @@
  * limitations under the License.
  */
 
-/* separator ------------------------------------------------------------------- */
-
-div.tobago-separator-default {
-  overflow: hidden;
-}
-
-fieldset.tobago-separator-default  {
-  border-left: 0px;
-  border-bottom: 0px;
-  border-right: 0px;
-  border-top: 1px solid #333;
-}
-
-legend.tobago-separator-default, .tobago-separator-label-default {
-  font: bold 12px arial, helvetica, sans-serif;
-  padding-left: 5px;
-  padding-right: 5px;
-  white-space: nowrap;
-}
-
-.tobago-separator-start-default {
-  width: 20px;
-}
-
-hr.tobago-separator-default {
-  border-top: 1px solid #E2E2E2;
-  border-right: 1px solid #E2E2E2;
-  border-bottom: 1px solid #000000;
-  border-left: 1px solid #E2E2E2;
-}
-
 /* number Slider --------------------------------------------------------------- */
 
 .tobago-inputNumberSlider-default {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?view=diff&rev=548297&r1=548296&r2=548297
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
(original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
Mon Jun 18 03:44:27 2007
@@ -789,7 +789,39 @@
   border: 0px solid black;
 }
 
-/* Time -------------------------------------------------------------------- */
+/* separator ------------------------------------------------------------------- */
+
+div.tobago-separator-default {
+  overflow: hidden;
+}
+
+fieldset.tobago-separator-default  {
+  border-left: 0px;
+  border-bottom: 0px;
+  border-right: 0px;
+  border-top: 1px solid #333;
+}
+
+legend.tobago-separator-default, .tobago-separator-label-default {
+  font: bold 12px arial, helvetica, sans-serif;
+  padding-left: 5px;
+  padding-right: 5px;
+  white-space: nowrap;
+}
+
+.tobago-separator-start-default {
+  width: 20px;
+}
+
+hr.tobago-separator-default {
+  border-top: 1px solid #E2E2E2;
+  border-right: 1px solid #E2E2E2;
+  border-bottom: 1px solid #000000;
+  border-left: 1px solid #E2E2E2;
+}
+
+/* time -------------------------------------------------------------------- */
+
 .tobago-time-default {
   height: 25px;
   position: relative;

Added: myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java?view=auto&rev=548297
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
(added)
+++ myfaces/tobago/trunk/theme/standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SeparatorRenderer.java
Mon Jun 18 03:44:27 2007
@@ -0,0 +1,93 @@
+package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
+
+/*
+ * 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.
+ */
+
+import static org.apache.myfaces.tobago.TobagoConstants.FACET_LABEL;
+import org.apache.myfaces.tobago.component.UILabel;
+import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import java.io.IOException;
+
+public class SeparatorRenderer extends LayoutableRendererBase {
+
+  public void encodeEnd(FacesContext facesContext,
+      UIComponent component) throws IOException {
+    TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
+    writer.startElement(HtmlConstants.DIV, component);
+    writer.writeClassAttribute();
+    writer.writeStyleAttribute();
+    if (component.getFacet(FACET_LABEL) != null) {
+      writer.startElement(HtmlConstants.TABLE, component);
+      writer.writeClassAttribute();
+
+      writer.writeAttribute(HtmlAttributes.WIDTH, "100%", false);
+      writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", false);
+      writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", false);
+      writer.startElement(HtmlConstants.TR, component);
+
+      writer.startElement(HtmlConstants.TD, component);
+      StyleClasses startClass = new StyleClasses();
+      startClass.addAspectClass("separator", "start", StyleClasses.Aspect.DEFAULT);
+      writer.writeClassAttribute(startClass);
+      writer.startElement(HtmlConstants.HR , component);
+      writer.writeClassAttribute();
+      writer.endElement(HtmlConstants.HR);
+      writer.endElement(HtmlConstants.TD);
+
+      writer.startElement(HtmlConstants.TD, component);
+      writer.writeAttribute(HtmlAttributes.STYLE, "width: 1px", false);
+      StyleClasses labelClass = new StyleClasses();
+      labelClass.addAspectClass("separator", "label", StyleClasses.Aspect.DEFAULT);
+      writer.writeClassAttribute(labelClass);
+      UILabel label = (UILabel) component.getFacet(FACET_LABEL);
+      writer.writeText("" + label.getValue());
+      writer.endElement(HtmlConstants.TD);
+
+      writer.startElement(HtmlConstants.TD, component);
+      writer.startElement(HtmlConstants.HR , component);
+      writer.writeClassAttribute();
+      writer.endElement(HtmlConstants.HR);
+      writer.endElement(HtmlConstants.TD);
+
+      writer.endElement(HtmlConstants.TR);
+      writer.endElement(HtmlConstants.TABLE);
+      /* field set variant for Scarborough 
+      writer.startElement(HtmlConstants.FIELDSET, component);
+      writer.writeComponentClass();
+      UILabel label =  (UILabel) component.getFacet("label");
+      writer.startElement(HtmlConstants.LEGEND, component);
+      writer.writeComponentClass();
+      writer.writeText(label.getValue(), null);
+      writer.endElement(HtmlConstants.LEGEND);
+      writer.endElement(HtmlConstants.FIELDSET);
+      */
+    } else {
+      writer.startElement(HtmlConstants.HR , component);
+      writer.writeClassAttribute();
+      writer.endElement(HtmlConstants.HR);
+    }
+    writer.endElement(HtmlConstants.DIV);
+  }
+}



Mime
View raw message