myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r813109 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/component/ example/demo/src/main/webapp/overview/ extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/
Date Wed, 09 Sep 2009 20:45:49 GMT
Author: lofwyr
Date: Wed Sep  9 20:45:48 2009
New Revision: 813109

URL: http://svn.apache.org/viewvc?rev=813109&view=rev
Log:
TOBAGO-606: Layout-Manager
 - put the deprecated height/width attributes of tc:popup and tc:page into one interface

Added:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/DeprecatedDimension.java
    myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/DeprecatedDimensionRule.java
  (contents, props changed)
      - copied, changed from r811026, myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java
Removed:
    myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java
Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPopup.java
    myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheet.xhtml
    myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java?rev=813109&r1=813108&r2=813109&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPage.java
Wed Sep  9 20:45:48 2009
@@ -49,7 +49,8 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
-public abstract class AbstractUIPage extends AbstractUIForm implements InvokeOnComponent,
LayoutContainer {
+public abstract class AbstractUIPage extends AbstractUIForm 
+    implements InvokeOnComponent, LayoutContainer, DeprecatedDimension {
 
   private static final Log LOG = LogFactory.getLog(AbstractUIPage.class);
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPopup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPopup.java?rev=813109&r1=813108&r2=813109&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPopup.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIPopup.java
Wed Sep  9 20:45:48 2009
@@ -32,7 +32,8 @@
 import java.io.IOException;
 import java.util.Iterator;
 
-public abstract class AbstractUIPopup extends UIPanelBase implements NamingContainer, AjaxComponent,
InvokeOnComponent {
+public abstract class AbstractUIPopup extends UIPanelBase 
+    implements NamingContainer, AjaxComponent, InvokeOnComponent, DeprecatedDimension {
 
   private boolean activated;
 

Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/DeprecatedDimension.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/DeprecatedDimension.java?rev=813109&view=auto
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/DeprecatedDimension.java
(added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/DeprecatedDimension.java
Wed Sep  9 20:45:48 2009
@@ -0,0 +1,32 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * 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 org.apache.myfaces.tobago.layout.Measure;
+
+public interface DeprecatedDimension {
+
+  public Measure getHeight();
+
+  public void setHeight(Measure height);
+
+  public Measure getWidth();
+
+  public void setWidth(Measure width);
+
+}

Modified: myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheet.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheet.xhtml?rev=813109&r1=813108&r2=813109&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheet.xhtml (original)
+++ myfaces/tobago/trunk/example/demo/src/main/webapp/overview/sheet.xhtml Wed Sep  9 20:45:48
2009
@@ -34,7 +34,7 @@
         <tc:toolBarCommand label="#" tip="#{overviewBundle.sheet_configTip}">
           <tc:attribute name="renderedPartially" value="sheetConfigPopup"/>
           <f:facet name="popup">
-            <tc:popup width="300" height="270" id="sheetConfigPopup">
+            <tc:popup width="300px" height="270px" id="sheetConfigPopup">
               <tc:box label="#{overviewBundle.sheet_configTitle}">
                 <f:facet name="layout">
                   <tc:gridLayout rows="fixed;fixed;fixed;fixed;fixed;fixed;fixed;fixed;1*;fixed"/>

Copied: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/DeprecatedDimensionRule.java
(from r811026, myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/DeprecatedDimensionRule.java?p2=myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/DeprecatedDimensionRule.java&p1=myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java&r1=811026&r2=813109&rev=813109&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/PageRule.java
(original)
+++ myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/DeprecatedDimensionRule.java
Wed Sep  9 20:45:48 2009
@@ -26,18 +26,19 @@
 import org.apache.myfaces.tobago.component.UIPage;
 import org.apache.myfaces.tobago.layout.Measure;
 
-public class PageRule extends MetaRule {
-  public static final PageRule INSTANCE = new PageRule();
+public class DeprecatedDimensionRule extends MetaRule {
+  
+  public static final DeprecatedDimensionRule INSTANCE = new DeprecatedDimensionRule();
 
   public Metadata applyRule(String name, TagAttribute attribute,
       MetadataTarget metadataTarget) {
     if (metadataTarget.isTargetInstanceOf(UIPage.class)) {
       if (attribute.isLiteral()) {
         if (Attributes.WIDTH.equals(name)) {
-          return new PageWidthMapper(attribute);
+          return new WidthMapper(attribute);
         }
         if (Attributes.HEIGHT.equals(name)) {
-          return new PageHeightMapper(attribute);
+          return new HeightMapper(attribute);
         }
       }
     }
@@ -62,23 +63,23 @@
     }
   }
 */
-  static final class PageWidthMapper extends Metadata {
+  static final class WidthMapper extends Metadata {
     private final TagAttribute attribute;
 
-    PageWidthMapper(TagAttribute attribute) {
+    WidthMapper(TagAttribute attribute) {
       this.attribute = attribute;
     }
 
-    public void applyMetadata(FaceletContext ctx, Object instance) {
+  public void applyMetadata(FaceletContext ctx, Object instance) {
       UIPage page = (UIPage) instance;
       page.setWidth(Measure.parse(attribute.getValue()));
     }
   }
 
-  static final class PageHeightMapper extends Metadata {
+  static final class HeightMapper extends Metadata {
     private final TagAttribute attribute;
 
-    PageHeightMapper(TagAttribute attribute) {
+    HeightMapper(TagAttribute attribute) {
       this.attribute = attribute;
     }
 

Propchange: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/DeprecatedDimensionRule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/DeprecatedDimensionRule.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java?rev=813109&r1=813108&r2=813109&view=diff
==============================================================================
--- myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java
(original)
+++ myfaces/tobago/trunk/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/TobagoComponentHandler.java
Wed Sep  9 20:45:48 2009
@@ -23,7 +23,7 @@
 import com.sun.facelets.tag.jsf.ComponentHandler;
 import org.apache.myfaces.tobago.OnComponentCreated;
 import org.apache.myfaces.tobago.component.AbstractUIGridLayout;
-import org.apache.myfaces.tobago.component.AbstractUIPage;
+import org.apache.myfaces.tobago.component.DeprecatedDimension;
 import org.apache.myfaces.tobago.component.InputSuggest;
 import org.apache.myfaces.tobago.component.SupportsMarkup;
 import org.apache.myfaces.tobago.event.SheetStateChangeSource;
@@ -43,8 +43,8 @@
     if (SortActionSource.class.isAssignableFrom(aClass)) {
       metaRuleset.addRule(SortActionSourceRule.INSTANCE);
     }
-    if (AbstractUIPage.class.isAssignableFrom(aClass)) {
-      metaRuleset.addRule(PageRule.INSTANCE);
+    if (DeprecatedDimension.class.isAssignableFrom(aClass)) {
+      metaRuleset.addRule(DeprecatedDimensionRule.INSTANCE);
     }
     if (AbstractUIGridLayout.class.isAssignableFrom(aClass)) {
       metaRuleset.addRule(GridLayoutRule.INSTANCE);



Mime
View raw message