You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/02/13 22:23:28 UTC

svn commit: r377491 [1/2] - in /incubator/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/ tobago-core/src/main/java/org/apache/myfaces/tobago/application/ tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src...

Author: bommel
Date: Mon Feb 13 13:23:23 2006
New Revision: 377491

URL: http://svn.apache.org/viewcvs?rev=377491&view=rev
Log:
added UIComponents for facelets integration added theme resource loading from classloader

Added:
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UICell.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIFileInput.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIHiddenInput.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITimeInput.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java
Modified:
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/TobagoConstants.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/application/ViewHandlerImpl.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIGridLayout.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPopup.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Theme.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CalendarTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/HiddenTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTagDeclaration.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PopupTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TimeTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ToolBarTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTag.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutInfo.java
    incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java
    incubator/tobago/trunk/tobago-core/src/main/resources/META-INF/faces-config.xml
    incubator/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/ant/sniplet/CodeSnipletExtractTask.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/AnnotationDeclarationVisitorCollector.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/PrintAnnotationVisitor.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TobagoAnnotationVisitor.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/BodyContent.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTagAttribute.java
    incubator/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/ant/compiler/AptCompilerAdapter.java

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/TobagoConstants.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/TobagoConstants.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/TobagoConstants.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/TobagoConstants.java Mon Feb 13 13:23:23 2006
@@ -61,7 +61,6 @@
   public static final String ATTR_LABEL = "label";
   public static final String ATTR_LABEL_POSITION = "labelPosition";
   public static final String ATTR_LABEL_WITH_ACCESS_KEY = "labelWithAccessKey";
-  public static final String ATTR_LAYOUT_DIRECTIVE = "layoutDirective";
   public static final String ATTR_LAYOUT_HEIGHT = "layoutHeight";
   public static final String ATTR_LAYOUT_MARGIN = "layoutMargin";
   public static final String ATTR_LAYOUT_MARGIN_BOTTOM = "layoutMarginBottom";

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/application/ViewHandlerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/application/ViewHandlerImpl.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/application/ViewHandlerImpl.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/application/ViewHandlerImpl.java Mon Feb 13 13:23:23 2006
@@ -170,12 +170,11 @@
 
   private void handleEncoding(FacesContext facesContext) {
     try {
-      if (facesContext.getExternalContext() instanceof HttpServletRequest) {
+      if (facesContext.getExternalContext().getRequest() instanceof HttpServletRequest) {
         HttpServletRequest request =
             (HttpServletRequest) facesContext.getExternalContext().getRequest();
         if (request.getCharacterEncoding() == null) {
           request.setCharacterEncoding("UTF-8");
-
         }
       }
       // TODO PortletRequest

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java Mon Feb 13 13:23:23 2006
@@ -45,6 +45,8 @@
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_OUT;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_SELECT_BOOLEAN_CHECKBOX;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_SELECT_ONE_RADIO;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_CREATE_SPAN;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ESCAPE;
 import org.apache.myfaces.tobago.el.ConstantMethodBinding;
 import org.apache.myfaces.tobago.event.SheetStateChangeEvent;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
@@ -673,6 +675,8 @@
   public static UIColumn createTextColumn(String label, String sortable, String align, String value) {
     UIComponent text = createComponent(UIOutput.COMPONENT_TYPE, RENDERER_TYPE_OUT);
     setStringProperty(text, ATTR_VALUE, value, null);
+    setBooleanProperty(text, ATTR_CREATE_SPAN, "false");
+    setBooleanProperty(text, ATTR_ESCAPE, "false");
     return createColumn(label, sortable, align, text);
   }
 

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UICell.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UICell.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UICell.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UICell.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,78 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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 javax.faces.context.FacesContext;
+
+
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 10.02.2006
+ * Time: 21:20:10
+ * To change this template use File | Settings | File Templates.
+ */
+public class UICell extends UIPanel {
+
+  public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Cell";
+
+  private Integer spanX = 1;
+  private Integer spanY = 1;
+  private String scrollbars = "false";
+
+  public Integer getSpanX() {
+    return spanX;
+  }
+
+  public void setSpanX(Integer spanX) {
+    this.spanX = spanX;
+  }
+
+  public Integer getSpanY() {
+    return spanY;
+  }
+
+  public void setSpanY(Integer spanY) {
+    this.spanY = spanY;
+  }
+
+  public String getScrollbars() {
+    return scrollbars;
+  }
+
+  public void setScrollbars(String scrollbars) {
+    this.scrollbars = scrollbars;
+  }
+
+  public void restoreState(FacesContext context, Object state) {
+    Object[] values = (Object[]) state;
+    super.restoreState(context, values[0]);
+    spanX = (Integer) values[1];
+    spanY = (Integer) values[2];
+    scrollbars = (String) values[3];
+  }
+
+  public Object saveState(FacesContext context) {
+    Object[] values  = new Object[4];
+    values[0] = super.saveState(context);
+    values[1] = spanX;
+    values[2] = spanY;
+    values[3] = scrollbars;
+    return values;
+  }
+}

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIFileInput.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIFileInput.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIFileInput.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIFileInput.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,41 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.ATTR_ENCTYPE;
+
+import javax.faces.component.UIComponent;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 10.02.2006
+ * Time: 19:02:13
+ * To change this template use File | Settings | File Templates.
+ */
+public class UIFileInput extends javax.faces.component.UIInput {
+  public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.FileInput";
+
+  public void setParent(UIComponent uiComponent) {
+    super.setParent(uiComponent);
+    UIPage form = ComponentUtil.findPage(uiComponent);
+    if (form != null) {
+      form.getAttributes().put(ATTR_ENCTYPE, "multipart/form-data");
+    }
+  }
+
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIGridLayout.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIGridLayout.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIGridLayout.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIGridLayout.java Mon Feb 13 13:23:23 2006
@@ -42,6 +42,8 @@
   public static final Marker FREE = new Marker("free");
   public static final String USED = "used";
 
+
+
   @Override
   public String getFamily() {
     return COMPONENT_FAMILY;
@@ -148,10 +150,6 @@
   public void setIgnoreFree(boolean ignoreFree) {
     this.ignoreFree = ignoreFree;
   }
-
-// ///////////////////////////////////////////////////////////////
-// ///////////////////////////////////////////// class Row
-// ///////////////////////////////////////////////////////////////
 
   public static class Row implements Serializable {
 

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIHiddenInput.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIHiddenInput.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIHiddenInput.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIHiddenInput.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,47 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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 javax.faces.context.FacesContext;
+
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 10.02.2006
+ * Time: 19:13:51
+ * To change this template use File | Settings | File Templates.
+ */
+public class UIHiddenInput extends javax.faces.component.UIInput {
+
+  private boolean inline = true;
+
+  public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.HiddenInput";
+
+  public void restoreState(FacesContext context, Object state) {
+    Object[] values = (Object[]) state;
+    super.restoreState(context, values[0]);
+    inline = (Boolean) values[1];
+  }
+
+  public Object saveState(FacesContext context) {
+    Object[] values  = new Object[2];
+    values[0] = super.saveState(context);
+    values[1] = inline;
+    return values;
+  }
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java Mon Feb 13 13:23:23 2006
@@ -64,7 +64,7 @@
 
   public void encodeBegin(FacesContext facesContext) throws IOException {
     // TODO change this should be renamed to DimensionUtils.prepare!!!
-    UILayout.getLayout(this).layoutBegin(facesContext, this);    
+    //UILayout.getLayout(this).layoutBegin(facesContext, this);
     super.encodeBegin(facesContext);
   }
 

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,55 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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 javax.faces.context.FacesContext;
+
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 09.02.2006
+ * Time: 23:53:37
+ * To change this template use File | Settings | File Templates.
+ */
+public class UIOutput extends javax.faces.component.UIOutput {
+  public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Output";
+  private boolean escape = true;
+  private String markup;
+  private String tip;
+  private boolean createSpan = true;
+
+  public void restoreState(FacesContext context, Object state) {
+    Object[] values = (Object[]) state;
+    super.restoreState(context, values[0]);
+    escape = (Boolean) values[1];
+    markup = (String) values[2];
+    tip = (String) values[3];
+    createSpan = (Boolean) values[4];
+   }
+
+  public Object saveState(FacesContext context) {
+    Object[] values  = new Object[5];
+    values[0] = super.saveState(context);
+    values[1] = escape;
+    values[2] = markup;
+    values[3] = tip;
+    values[4] = createSpan;
+    return values;
+  }
+
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java Mon Feb 13 13:23:23 2006
@@ -81,7 +81,7 @@
 
   public void encodeBegin(FacesContext facesContext) throws IOException {
     // TODO change this should be renamed to DimensionUtils.prepare!!!
-    UILayout.getLayout(this).layoutBegin(facesContext, this);  
+    //UILayout.getLayout(this).layoutBegin(facesContext, this);
     super.encodeBegin(facesContext);
   }
 

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java Mon Feb 13 13:23:23 2006
@@ -30,7 +30,7 @@
 
   public void encodeBegin(FacesContext facesContext) throws IOException {
     // TODO change this should be renamed to DimensionUtils.prepare!!!
-    UILayout.getLayout(this).layoutBegin(facesContext, this);
+    //UILayout.getLayout(this).layoutBegin(facesContext, this);
     super.encodeBegin(facesContext);
   }
 

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPopup.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPopup.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPopup.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPopup.java Mon Feb 13 13:23:23 2006
@@ -20,6 +20,7 @@
 import org.apache.commons.logging.LogFactory;
 
 import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
 public class UIPopup extends UIPanel implements NamingContainer {
@@ -33,6 +34,18 @@
 
   public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Popup";
 
+  public void processDecodes(FacesContext facesContext) {
+    super.processDecodes(facesContext);
+    // XXX find a better way
+    addToPage();
+  }
+
+  public void setParent(UIComponent uiComponent) {
+    super.setParent(uiComponent);
+    // XXX find a better way
+    addToPage();
+  }
+
   public Object saveState(FacesContext context) {
     Object[] saveState = new Object[5];
     saveState[0] = super.saveState(context);
@@ -83,4 +96,12 @@
   public void setTop(String top) {
     this.top = top;
   }
+
+  private void addToPage() {
+      UIPage page = ComponentUtil.findPage(this);
+      if (page != null) {
+        page.getPopups().add(this);
+      }
+    }
+
 }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java Mon Feb 13 13:23:23 2006
@@ -35,7 +35,7 @@
 
   public void encodeBegin(FacesContext facesContext) throws IOException {
     // TODO change this should be renamed to DimensionUtils.prepare!!!
-    UILayout.getLayout(this).layoutBegin(facesContext, this);
+    //UILayout.getLayout(this).layoutBegin(facesContext, this);
     super.encodeBegin(facesContext);
   }
 }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java Mon Feb 13 13:23:23 2006
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_REQUIRED;
 import org.apache.myfaces.tobago.util.MessageFactory;
 
 import javax.faces.application.FacesMessage;
@@ -35,12 +34,12 @@
 
   public void encodeBegin(FacesContext facesContext) throws IOException {
     // TODO change this should be renamed to DimensionUtils.prepare!!!
-    UILayout.getLayout(this).layoutBegin(facesContext, this);
+    //UILayout.getLayout(this).layoutBegin(facesContext, this);
     super.encodeBegin(facesContext);
   }
 
   public void validate(FacesContext facesContext) {
-    if (ComponentUtil.getBooleanAttribute(this, ATTR_REQUIRED)) {
+    if (isRequired()) {
 
       Object localValue = getLocalValue();
       if (localValue == null || "".equals(localValue)) {

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITimeInput.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITimeInput.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITimeInput.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITimeInput.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,51 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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 javax.faces.convert.Converter;
+import javax.faces.convert.DateTimeConverter;
+import static javax.faces.convert.DateTimeConverter.CONVERTER_ID;
+import javax.faces.application.Application;
+import javax.faces.context.FacesContext;
+import java.util.TimeZone;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 10.02.2006
+ * Time: 20:50:49
+ * To change this template use File | Settings | File Templates.
+ */
+public class UITimeInput extends javax.faces.component.UIInput {
+
+  public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.TimeInput";
+
+  public Converter getConverter() {
+    Converter converter = super.getConverter();
+    if (converter == null) {
+      // setting required default converter
+      Application application
+          = FacesContext.getCurrentInstance().getApplication();
+      DateTimeConverter dateTimeConverter
+          = (DateTimeConverter) application.createConverter(CONVERTER_ID);
+      dateTimeConverter.setPattern("HH:mm");
+      dateTimeConverter.setTimeZone(TimeZone.getDefault());
+      setConverter(dateTimeConverter);
+    }
+    return converter;
+  }
+}

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,39 @@
+package org.apache.myfaces.tobago.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 11.02.2006
+ * Time: 14:48:46
+ * To change this template use File | Settings | File Templates.
+ */
+public class UIToolBar extends javax.faces.component.UIPanel {
+
+  public static final String LABEL_BOTTOM = "bottom";
+  public static final String LABEL_RIGHT = "right";
+  public static final String LABEL_OFF = "off";
+
+  public static final String ICON_SMALL = "small";
+  public static final String ICON_BIG = "big";
+  public static final String ICON_OFF = "off";
+
+  public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.ToolBar";
+
+
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java Mon Feb 13 13:23:23 2006
@@ -68,7 +68,7 @@
   public void encodeBegin(FacesContext facesContext)
       throws IOException {
     // TODO change this should be renamed to DimensionUtils.prepare!!!
-    UILayout.getLayout(this).layoutBegin(facesContext, this);
+    //UILayout.getLayout(this).layoutBegin(facesContext, this);
 //    debugStates(facesContext);
     fixSelectionType();
     super.encodeBegin(facesContext);

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java Mon Feb 13 13:23:23 2006
@@ -14,6 +14,7 @@
 import java.util.zip.ZipEntry;
 import java.io.InputStream;
 import java.io.IOException;
+import java.net.URL;
 
 /**
  * This class helps to locate all resources of the ResourceManager.
@@ -50,6 +51,9 @@
   public void init()
       throws ServletException {
     locateResourcesInWar(servletContext, resourceManager, "/");
+    if (USE_JAR_THEME_RESOURCE) {
+      locateResourcesInLib(resourceManager);
+    }
     for (String dir : resourceDirs) {
       if (LOG.isDebugEnabled()) {
         LOG.debug("Locating resources in dir: " + dir);
@@ -62,16 +66,13 @@
       ServletContext servletContext, ResourceManagerImpl resources, String path)
       throws ServletException {
 
-    if (path.equals("/WEB-INF/") || path.equals("/WEB-INF/lib/")) {
-      if (USE_JAR_THEME_RESOURCE) {
-        // continue
-      } else {
-        return; // ignore
-      }
-    } else if (path.startsWith("/WEB-INF/")) {
+    if (path.startsWith("/WEB-INF/")) {
       return; // ignore
     }
-
+    // fix for jetty6
+    if (path.endsWith("/") && path.length() > 1) {
+      path = path.substring(0, path.length() - 1);
+    }
     Set<String> resourcePaths = servletContext.getResourcePaths(path);
     if (resourcePaths == null || resourcePaths.isEmpty()) {
       if (LOG.isErrorEnabled()) {
@@ -84,7 +85,7 @@
       if (childPath.endsWith("/")) {
         // ignore, because weblogic puts the path directory itself in the Set
         if (!childPath.equals(path)) {
-          LOG.debug("childPath dir " + childPath);
+          LOG.error("childPath dir " + childPath);
           locateResourcesInWar(servletContext, resources, childPath);
         }
       } else {
@@ -95,84 +96,70 @@
         } else if (childPath.endsWith(".properties.xml")) {
           InputStream inputStream = servletContext.getResourceAsStream(childPath);
           addProperties(inputStream, resources, childPath, true);
-        } else
-        if (childPath.startsWith("/WEB-INF/lib/") && childPath.endsWith(".jar"))
-        {
-          if (USE_JAR_THEME_RESOURCE) {
-            locateResourcesInLib(servletContext, resources, childPath);
-          }
         } else {
           resources.add(childPath);
-          //Log.debug(childPath);
         }
       }
     }
   }
 
-  private void locateResourcesInLib(
-      ServletContext servletContext, ResourceManagerImpl resources, String jarPath)
+  private void locateResourcesInLib(ResourceManagerImpl resources)
       throws ServletException {
 
     InputStream stream = null;
     try {
-      if (findThemeDescriptor(servletContext, jarPath)) {
-
-        ClassLoader classLoader = ResourceManagerFactory.class.getClassLoader();
+      LOG.error("Loading tobago-theme.xml");
+      Enumeration<URL> urls = getClass().getClassLoader().getResources("META-INF/tobago-theme.xml");
 
-        stream = servletContext.getResourceAsStream(jarPath);
-        ZipInputStream zip = new ZipInputStream(stream);
-        while (zip.available() > 0) {
-          ZipEntry nextEntry = zip.getNextEntry();
-          if (nextEntry == null || nextEntry.isDirectory()) {
-            continue;
-          }
-          String name = "/" + nextEntry.getName();
-          LOG.info("name = '" + name + "'");
-          String prefix = "/org/apache/myfaces/tobago/renderkit/";
-          if (name.startsWith(prefix)) {
-            if (name.endsWith(".class")) {
-              // ignore the class files
-            } else if (name.endsWith(".properties")) {
-              LOG.info("** " + name.substring(1));
-              InputStream inputStream = classLoader.getResourceAsStream(name.substring(1));
-              addProperties(inputStream, resources, name, false);
-            } else if (name.endsWith(".properties.xml")) {
-              LOG.info("** " + name.substring(1));
-              InputStream inputStream = classLoader.getResourceAsStream(name.substring(1));
-              LOG.info(inputStream);
-              addProperties(inputStream, resources, name, true);
-            } else {
-              resources.add(name);
+      while (urls.hasMoreElements()) {
+        URL themeUrl = urls.nextElement();
+        // TODO other protocols
+        if ("jar".equals(themeUrl.getProtocol())) {
+          String fileName = themeUrl.toString().substring(4, themeUrl.toString().indexOf("!"));
+          ClassLoader classLoader = ResourceManagerFactory.class.getClassLoader();
+          URL jarFile = new URL(fileName);
+          try {
+            stream = jarFile.openStream();
+            ZipInputStream zip = new ZipInputStream(stream);
+            while (zip.available() > 0) {
+              ZipEntry nextEntry = zip.getNextEntry();
+              if (nextEntry == null || nextEntry.isDirectory()) {
+                continue;
+              }
+              String name = "/" + nextEntry.getName();
+              //LOG.error("name = '" + name + "'");
+              String prefix = "/org/apache/myfaces/tobago/renderkit/";
+              if (name.startsWith(prefix)) {
+                if (name.endsWith(".class")) {
+                  // ignore the class files
+                } else if (name.endsWith(".properties")) {
+                  LOG.info("** " + name.substring(1));
+                  InputStream inputStream = classLoader.getResourceAsStream(name.substring(1));
+                  addProperties(inputStream, resources, name, false);
+                } else if (name.endsWith(".properties.xml")) {
+                  LOG.info("** " + name.substring(1));
+                  InputStream inputStream = classLoader.getResourceAsStream(name.substring(1));
+                  LOG.info(inputStream);
+                  addProperties(inputStream, resources, name, true);
+                } else {
+                  resources.add(name);
+                }
+              }
             }
+          } finally {
+            IOUtils.closeQuietly(stream);
           }
+        } else {
+          LOG.error("Unknown protocol "+themeUrl);
         }
       }
     } catch (IOException e) {
-      String msg = "while loading " + jarPath;
+      String msg = "while loading ";
       if (LOG.isErrorEnabled()) {
         LOG.error(msg, e);
       }
       throw new ServletException(msg, e);
-    } finally {
-      IOUtils.closeQuietly(stream);
-    }
-  }
-
-  private boolean findThemeDescriptor(
-      ServletContext servletContext, String jarPath) throws IOException {
-    InputStream stream = servletContext.getResourceAsStream(jarPath);
-    ZipInputStream zip = new ZipInputStream(stream);
-    while (zip.available() > 0) {
-      ZipEntry nextEntry = zip.getNextEntry();
-      if (nextEntry == null || nextEntry.isDirectory()) {
-        continue;
-      }
-      String name = nextEntry.getName();
-      if (name.equals("META-INF/tobago-theme.xml")) {
-        return true;
-      }
     }
-    return false;
   }
 
   private void addProperties(

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerImpl.java Mon Feb 13 13:23:23 2006
@@ -403,7 +403,6 @@
         }
       }
 
-
 //    Log.debug("key=" + key);
 
       try {
@@ -421,7 +420,6 @@
   }
 
 
-
   private String getRendererClassName(String rendererType) {
     String name;
     if (LOG.isDebugEnabled()) {
@@ -584,7 +582,6 @@
     this.tobagoConfig = tobagoConfig;
   }
 
-// -------------------------------------------------------------- inner classes
 
   private class Cache extends HashMap {
 
@@ -612,7 +609,8 @@
   }
 // ----------------------------------------------------------- cacheKey classes
 
-  private enum CacheType {RENDERER, IMAGE, JSP, PROPERTY, MISC}
+  private enum CacheType {
+    RENDERER, IMAGE, JSP, PROPERTY, MISC}
 
   public static final class CacheKey {
     private final String clientPropertyId;
@@ -636,6 +634,7 @@
       this.type = CacheType.PROPERTY;
       calcHashCode();
     }
+
     public CacheKey(String clientPropertyId, Locale locale, String name, CacheType type) {
       this.clientPropertyId = clientPropertyId;
       if (locale == null) { //  FIXME: should not happen, but does.

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ResourceManagerUtil.java Mon Feb 13 13:23:23 2006
@@ -94,7 +94,7 @@
 
   public static String getScriptsAsJSArray(FacesContext facesContext, String[] names) {
     List<String> fileNames = new ArrayList<String>();
-    for (String  name : names) {
+    for (String name : names) {
       fileNames.addAll(getScripts(facesContext, name));
     }
     return toJSArray(fileNames);
@@ -102,7 +102,7 @@
 
   public static String getStylesAsJSArray(FacesContext facesContext, String[] names) {
     List<String> fileNames = new ArrayList<String>();
-    for (String  name : names) {
+    for (String name : names) {
       fileNames.addAll(getStyles(facesContext, name));
     }
     return toJSArray(fileNames);
@@ -111,12 +111,12 @@
   public static String toJSArray(List<String> list) {
     StringBuffer sb = new StringBuffer();
     for (String name : list) {
-        if (sb.length() > 0) {
-          sb.append(", ");
-        }
-        sb.append('\'');
-        sb.append(name);
-        sb.append('\'');
+      if (sb.length() > 0) {
+        sb.append(", ");
+      }
+      sb.append('\'');
+      sb.append(name);
+      sb.append('\'');
     }
     return "[" + sb.toString() + "]";
   }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Theme.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Theme.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Theme.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Theme.java Mon Feb 13 13:23:23 2006
@@ -34,7 +34,7 @@
     this.fallback = fallback;
     List<Theme> collect = new ArrayList<Theme>();
     for (Theme parent = this;
-        parent != null; parent = parent.getFallback()) {
+         parent != null; parent = parent.getFallback()) {
       collect.add(parent);
     }
     fallbackList = Collections.unmodifiableList(collect);

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/UserAgent.java Mon Feb 13 13:23:23 2006
@@ -66,8 +66,8 @@
   private String version;
 
 
-  private UserAgent(String name, String version){
-    this.name    = name;
+  private UserAgent(String name, String version) {
+    this.name = name;
     this.version = version;
   }
 
@@ -93,24 +93,24 @@
       list.add(name);
     }
     list.add(DEFAULT_NAME);
-    if (reverseOrder){
+    if (reverseOrder) {
       Collections.reverse(list);
     }
     return list;
   }
 
-  public static UserAgent getInstance(String header){
+  public static UserAgent getInstance(String header) {
     if (header == null) {
       return DEFAULT;
     }
 
     header = header.toLowerCase().replace('/', ' ');
-    if (header.indexOf("opera") > -1){
-      if (header.indexOf("opera 5.0") > -1){
+    if (header.indexOf("opera") > -1) {
+      if (header.indexOf("opera 5.0") > -1) {
         return OPERA_5_0;
-      } else if (header.indexOf("opera 6.0") > -1){
+      } else if (header.indexOf("opera 6.0") > -1) {
         return OPERA_6_0;
-      } else if (header.indexOf("opera 7.11") > -1){
+      } else if (header.indexOf("opera 7.11") > -1) {
         return OPERA_7_11;
       } else {
         return OPERA;
@@ -125,7 +125,7 @@
       } else if (header.indexOf("msie 5.5") > -1) {
         return MSIE_5_5;
       } else if (header.indexOf("msie 6.0") > -1) {
-         if (header.indexOf("mac") > -1) {
+        if (header.indexOf("mac") > -1) {
           return MSIE_6_0_MAC;
         } else {
           return MSIE_6_0;
@@ -150,55 +150,57 @@
     return DEFAULT;
   }
 
-  public static UserAgent getInstanceForId(String id){
-     if (id == null) {
-       return DEFAULT;
-     }
-
-     if (id.indexOf("opera") == 0){
-       if (id.equals("opera_5_0")){
-         return OPERA_5_0;
-       } else if (id.equals("opera_6_0")){
-         return OPERA_6_0;
-       } else if (id.equals("opera_7_11")){
-         return OPERA_7_11;
-       } else {
-         return OPERA;
-       }
-     } else if (id.indexOf("msie") == 0) {
-       if (id.equals("msie_5_0")) {
-         return MSIE_5_0;
-       } else if (id.equals("msie_5_0_mac")) {
-         return MSIE_5_0_MAC;
-       } else if (id.equals("msie_5_5")) {
-         return MSIE_5_5;
-       } else if (id.equals("msie_6_0")) {
-         return MSIE_6_0;
-       } else if (id.equals("msie_6_0_mac")) {
-         return MSIE_6_0_MAC;
-       } else {
-         return MSIE;
-       }
-     } else if (id.indexOf("mozilla") == 0) {
-       if (id.equals("mozilla_4_7")) {
-         return MOZILLA_4_7;
-       } else if (id.equals("mozilla_5_0")) {
-         return MOZILLA_5_0;
-       } else if (id.equals("mozilla_5_0_r1_6")) {
-         return MOZILLA_5_0_R1_6;
-       } else {
-         return MOZILLA;
-       }
-     }
+  public static UserAgent getInstanceForId(String id) {
+    if (id == null) {
+      return DEFAULT;
+    }
 
-     return DEFAULT;
-   }
+    if (id.indexOf("opera") == 0) {
+      if (id.equals("opera_5_0")) {
+        return OPERA_5_0;
+      } else if (id.equals("opera_6_0")) {
+        return OPERA_6_0;
+      } else if (id.equals("opera_7_11")) {
+        return OPERA_7_11;
+      } else {
+        return OPERA;
+      }
+    } else if (id.indexOf("msie") == 0) {
+      if (id.equals("msie_5_0")) {
+        return MSIE_5_0;
+      } else if (id.equals("msie_5_0_mac")) {
+        return MSIE_5_0_MAC;
+      } else if (id.equals("msie_5_5")) {
+        return MSIE_5_5;
+      } else if (id.equals("msie_6_0")) {
+        return MSIE_6_0;
+      } else if (id.equals("msie_6_0_mac")) {
+        return MSIE_6_0_MAC;
+      } else {
+        return MSIE;
+      }
+    } else if (id.indexOf("mozilla") == 0) {
+      if (id.equals("mozilla_4_7")) {
+        return MOZILLA_4_7;
+      } else if (id.equals("mozilla_5_0")) {
+        return MOZILLA_5_0;
+      } else if (id.equals("mozilla_5_0_r1_6")) {
+        return MOZILLA_5_0_R1_6;
+      } else {
+        return MOZILLA;
+      }
+    }
+
+    return DEFAULT;
+  }
 
 
-  /** @deprecated don't use toString() functionallity! */
+  /**
+   * @deprecated don't use toString() functionallity!
+   */
   public String toString() {
     return version != null
-        ? name + '_' +  version
+        ? name + '_' + version
         : name;
   }
 }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/renderkit/RendererBase.java Mon Feb 13 13:23:23 2006
@@ -19,13 +19,12 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_DIRECTIVE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_WIDTH;
 import static org.apache.myfaces.tobago.TobagoConstants.FACET_MENUBAR;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_OUT;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIPage;
-import org.apache.myfaces.tobago.component.UIPanel;
+import org.apache.myfaces.tobago.component.UICell;
 import org.apache.myfaces.tobago.config.ThemeConfig;
 import org.apache.myfaces.tobago.util.LayoutUtil;
 
@@ -223,8 +222,7 @@
 
     int fixedSpace = 0;
 
-    if (component instanceof UIPanel
-        && ComponentUtil.getBooleanAttribute(component, ATTR_LAYOUT_DIRECTIVE)) {
+    if (component instanceof UICell) {
       List children = LayoutUtil.addChildren(new ArrayList(), component);
       for (Iterator childs = children.iterator(); childs.hasNext();) {
         UIComponent child = (UIComponent) childs.next();

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/servlet/ResourceServlet.java Mon Feb 13 13:23:23 2006
@@ -73,6 +73,7 @@
 
     InputStream inputStream
         = Theme.class.getClassLoader().getResourceAsStream(resource);
+    
     ServletOutputStream outputStream = response.getOutputStream();
 
     byte[] buffer = new byte[BUFFER_SIZE];

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java Mon Feb 13 13:23:23 2006
@@ -16,18 +16,14 @@
  * limitations under the License.
  */
 
-import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.component.UIPanel;
-import org.apache.myfaces.tobago.taglib.decl.HasDimension;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
-import org.apache.myfaces.tobago.taglib.decl.HasLabel;
 
 /**
  * Renders a panel with border and title.
  */
-@Tag(name = "box")
+
 public class BoxTag extends TobagoBodyTag
-    implements HasIdBindingAndRendered, HasDimension, HasLabel {
+    implements BoxTagDeclaration {
 
   public String getComponentType() {
     return UIPanel.COMPONENT_TYPE;

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,33 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.taglib.decl.HasDimension;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasLabel;
+
+/**
+ * Renders a panel with border and title.
+ */
+@Tag(name = "box")
+@UIComponentTag(UIComponent = "org.apache.myfaces.tobago.component.UIPanel")
+
+public interface BoxTagDeclaration extends TobagoTagDeclaration,
+    HasIdBindingAndRendered, HasDimension, HasLabel {
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTag.java Mon Feb 13 13:23:23 2006
@@ -27,21 +27,7 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL_WITH_ACCESS_KEY;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
-import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
-import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.taglib.decl.HasAction;
-import org.apache.myfaces.tobago.taglib.decl.HasActionListener;
-import org.apache.myfaces.tobago.taglib.decl.HasCommandType;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
-import org.apache.myfaces.tobago.taglib.decl.HasImage;
-import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
-import org.apache.myfaces.tobago.taglib.decl.HasTip;
-import org.apache.myfaces.tobago.taglib.decl.HasWidth;
-import org.apache.myfaces.tobago.taglib.decl.IsDefaultCommand;
-import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
-import org.apache.myfaces.tobago.taglib.decl.IsImmediateCommand;
-import org.apache.myfaces.tobago.taglib.decl.IsInline;
 
 import javax.faces.component.UIComponent;
 
@@ -49,13 +35,8 @@
  * Renders a button element.
  */
 // FIXME: bodyContent
-@Tag(name = "button")
-@BodyContentDescription(anyTagOf = "facestag")
 public class ButtonTag extends CommandTag
-    implements HasIdBindingAndRendered, HasLabelAndAccessKey, HasImage,
-    IsDisabled, HasAction, HasActionListener, HasCommandType,
-    IsImmediateCommand, IsDefaultCommand,
-    HasWidth, HasTip, IsInline {
+    implements ButtonTagDeclaration {
 
   private String label;
   private String image;

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/ButtonTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,50 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.taglib.decl.HasAction;
+import org.apache.myfaces.tobago.taglib.decl.HasActionListener;
+import org.apache.myfaces.tobago.taglib.decl.HasCommandType;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasImage;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
+import org.apache.myfaces.tobago.taglib.decl.HasTip;
+import org.apache.myfaces.tobago.taglib.decl.HasWidth;
+import org.apache.myfaces.tobago.taglib.decl.IsDefaultCommand;
+import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
+import org.apache.myfaces.tobago.taglib.decl.IsImmediateCommand;
+import org.apache.myfaces.tobago.taglib.decl.IsInline;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 10.02.2006
+ * Time: 22:00:03
+ * To change this template use File | Settings | File Templates.
+ */
+@Tag(name = "button")
+@BodyContentDescription(anyTagOf = "facestag")
+@UIComponentTag(UIComponent = "org.apache.myfaces.tobago.component.UIPanel")
+
+public interface ButtonTagDeclaration extends CommandTagDeclaration,
+    HasIdBindingAndRendered, HasLabelAndAccessKey, HasImage,
+    IsDisabled, HasAction, HasActionListener, HasCommandType,
+    IsImmediateCommand, IsDefaultCommand, HasWidth, HasTip, IsInline {
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CalendarTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CalendarTagDeclaration.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CalendarTagDeclaration.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CalendarTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -41,6 +41,7 @@
    *
    */
   @TagAttribute
-  @UIComponentTagAttribute(type = { "java.util.Calendar", "java.util.Date" })
+  @UIComponentTagAttribute(type = { "java.util.Calendar",
+      "java.util.Date" })
   void setValue(String value);
 }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTag.java Mon Feb 13 13:23:23 2006
@@ -18,17 +18,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_DIRECTIVE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SCROLLBARS;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SPAN_X;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SPAN_Y;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_PANEL;
-import org.apache.myfaces.tobago.apt.annotation.Tag;
-import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
-import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.component.UIPanel;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.component.UICell;
 
 import javax.faces.component.UIComponent;
 import javax.servlet.jsp.JspException;
@@ -38,12 +33,8 @@
  * $Id$
  */
 
-/**
- * Renders a layout cell.
- * A panel with ability to span over more than one layout cells.
- */
-@Tag(name = "cell")
-public class CellTag extends TobagoBodyTag implements HasIdBindingAndRendered {
+
+public class CellTag extends TobagoBodyTag implements CellTagDeclaration {
 
   private static final Log LOG = LogFactory.getLog(CellTag.class);
 
@@ -55,7 +46,7 @@
 
 
   public String getComponentType() {
-    return UIPanel.COMPONENT_TYPE;
+    return UICell.COMPONENT_TYPE;
   }
 
   public int doStartTag() throws JspException {
@@ -73,8 +64,6 @@
     ComponentUtil.setIntegerProperty(component, ATTR_SPAN_Y, spanY);
     ComponentUtil.setStringProperty(component, ATTR_SCROLLBARS, scrollbars);
 
-    component.getAttributes().put(ATTR_LAYOUT_DIRECTIVE, Boolean.TRUE);
-
     if (LOG.isDebugEnabled()) {
       LOG.debug("spanX=" + spanX + " spanY=" + spanY);
       LOG.debug("spanX=" + component.getAttributes().get(ATTR_SPAN_X)
@@ -94,11 +83,6 @@
     return spanX;
   }
 
-  /**
-   * Count of layout column's to span over.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = { "java.lang.Integer" }, defaultValue = "1")
   public void setSpanX(String spanX) {
     this.spanX = spanX;
   }
@@ -107,11 +91,6 @@
     return spanY;
   }
 
-  /**
-   * Count of layout row's to span over.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(type = { "java.lang.Integer" }, defaultValue = "1")
   public void setSpanY(String spanY) {
     this.spanY = spanY;
   }
@@ -120,15 +99,6 @@
     return scrollbars;
   }
 
-
-  /**
-   * possible values are:
-   * 'false' : no scrollbars should rendered
-   * 'true'  : scrollbars should always rendered
-   * 'auto'  : scrollbars should rendered when needed
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "false")
   public void setScrollbars(String scrollbars) {
     this.scrollbars = scrollbars;
   }

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CellTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,68 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 10.02.2006
+ * Time: 22:20:01
+ * To change this template use File | Settings | File Templates.
+ */
+
+/**
+ * Renders a layout cell.
+ * A panel with ability to span over more than one layout cells.
+ */
+@Tag(name = "cell")
+@UIComponentTag(UIComponent = "org.apache.myfaces.tobago.component.UICell")
+public interface CellTagDeclaration extends TobagoTagDeclaration, 
+    HasIdBindingAndRendered {
+
+  /**
+   * Count of layout column's to span over.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = { "java.lang.Integer" },
+      defaultValue = "1")
+  void setSpanX(String spanX);
+
+  /**
+   * Count of layout row's to span over.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = { "java.lang.Integer" },
+      defaultValue = "1")
+  void setSpanY(String spanY);
+
+  /**
+   * possible values are:
+   * 'false' : no scrollbars should rendered
+   * 'true'  : scrollbars should always rendered
+   * 'auto'  : scrollbars should rendered when needed
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(defaultValue = "false",
+      allowedValues = {"false", "true", "auto"})
+  void setScrollbars(String scrollbars);
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTag.java Mon Feb 13 13:23:23 2006
@@ -24,7 +24,7 @@
 
 import javax.faces.component.UIComponent;
 
-public abstract class CommandTag extends TobagoTag {
+public abstract class CommandTag extends TobagoTag implements CommandTagDeclaration {
 
   private String disabled;
   private String action;

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/CommandTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,31 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.apt.annotation.UIComponentTag;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 10.02.2006
+ * Time: 22:03:07
+ * To change this template use File | Settings | File Templates.
+ */
+
+@UIComponentTag(UIComponent = "org.apache.myfaces.tobago.component.UICommand")
+public interface CommandTagDeclaration extends TobagoTagDeclaration {
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTag.java Mon Feb 13 13:23:23 2006
@@ -18,10 +18,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ENCTYPE;
-import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.component.UIInput;
-import org.apache.myfaces.tobago.component.UIPage;
+import org.apache.myfaces.tobago.component.UIFileInput;
 
 import javax.servlet.jsp.JspException;
 
@@ -31,18 +28,17 @@
   private static final Log LOG = LogFactory.getLog(FileTag.class);
 
   public int doStartTag() throws JspException {
-    int result = super.doStartTag();
-    UIPage form = ComponentUtil.findPage(getComponentInstance());
-    form.getAttributes().put(ATTR_ENCTYPE, "multipart/form-data");
+    //UIPage form = ComponentUtil.findPage(getComponentInstance());
+    //form.getAttributes().put(ATTR_ENCTYPE, "multipart/form-data");
 
     if (getLabel() != null) {
       LOG.warn("the label attribute is deprecated in t:in, please use tx:in instead.");
     }
 
-    return result;
+    return super.doStartTag();
   }
 
   public String getComponentType() {
-    return UIInput.COMPONENT_TYPE;
+    return UIFileInput.COMPONENT_TYPE;
   }
 }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTag.java Mon Feb 13 13:23:23 2006
@@ -16,13 +16,10 @@
  * limitations under the License.
  */
 
-import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.component.UIForm;
-import org.apache.myfaces.tobago.taglib.decl.HasBinding;
-import org.apache.myfaces.tobago.taglib.decl.HasId;
 
-@Tag(name = "form")
-public class FormTag extends TobagoBodyTag implements HasBinding, HasId {
+
+public class FormTag extends TobagoBodyTag implements FormTagDeclaration {
 
   public String getComponentType() {
     return UIForm.COMPONENT_TYPE;

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,36 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.taglib.decl.HasBinding;
+import org.apache.myfaces.tobago.taglib.decl.HasId;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 11.02.2006
+ * Time: 14:29:26
+ * To change this template use File | Settings | File Templates.
+ */
+@Tag(name = "form")
+@UIComponentTag(UIComponent = "org.apache.myfaces.tobago.component.UIForm")
+
+public interface FormTagDeclaration extends TobagoTagDeclaration,
+    HasBinding, HasId {
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/HiddenTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/HiddenTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/HiddenTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/HiddenTag.java Mon Feb 13 13:23:23 2006
@@ -18,7 +18,7 @@
 
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INLINE;
 import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.component.UIInput;
+import org.apache.myfaces.tobago.component.UIHiddenInput;
 
 import javax.faces.component.UIComponent;
 
@@ -30,6 +30,6 @@
   }
 
   public String getComponentType() {
-    return UIInput.COMPONENT_TYPE;
+    return UIHiddenInput.COMPONENT_TYPE;
   }
 }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java Mon Feb 13 13:23:23 2006
@@ -34,7 +34,6 @@
   private String tip;
   private String validator;
 
-
   public void release() {
     super.release();
     this.onchange = null;

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTag.java Mon Feb 13 13:23:23 2006
@@ -25,32 +25,12 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL_WITH_ACCESS_KEY;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TARGET;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
-import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
-import org.apache.myfaces.tobago.apt.annotation.Tag;
 import org.apache.myfaces.tobago.component.ComponentUtil;
-import org.apache.myfaces.tobago.taglib.decl.HasAction;
-import org.apache.myfaces.tobago.taglib.decl.HasActionListener;
-import org.apache.myfaces.tobago.taglib.decl.HasCommandType;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
-import org.apache.myfaces.tobago.taglib.decl.HasImage;
-import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
-import org.apache.myfaces.tobago.taglib.decl.HasTarget;
-import org.apache.myfaces.tobago.taglib.decl.HasTip;
-import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
-import org.apache.myfaces.tobago.taglib.decl.IsImmediateCommand;
-import org.apache.myfaces.tobago.taglib.decl.IsInline;
 
 import javax.faces.component.UIComponent;
 
-/**
- * Renders a link element.
- */
-@Tag(name = "link")
-@BodyContentDescription(anyTagOf = "facestag")
 public class LinkTag extends CommandTag
-    implements HasIdBindingAndRendered, HasLabelAndAccessKey, IsDisabled,
-    HasAction, HasActionListener, IsInline, HasCommandType,
-    HasTarget, HasTip, IsImmediateCommand, HasImage {
+    implements LinkTagDeclaration {
 
   private static final Log LOG = LogFactory.getLog(LinkTag.class);
 

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/LinkTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,50 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.apt.annotation.BodyContentDescription;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.taglib.decl.HasAction;
+import org.apache.myfaces.tobago.taglib.decl.HasActionListener;
+import org.apache.myfaces.tobago.taglib.decl.HasCommandType;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasImage;
+import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
+import org.apache.myfaces.tobago.taglib.decl.HasTarget;
+import org.apache.myfaces.tobago.taglib.decl.HasTip;
+import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
+import org.apache.myfaces.tobago.taglib.decl.IsImmediateCommand;
+import org.apache.myfaces.tobago.taglib.decl.IsInline;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 11.02.2006
+ * Time: 13:16:47
+ * To change this template use File | Settings | File Templates.
+ */
+
+/**
+ * Renders a link element.
+ */
+@Tag(name = "link")
+@BodyContentDescription(anyTagOf = "facestag")
+public interface LinkTagDeclaration extends CommandTagDeclaration,
+    HasIdBindingAndRendered, HasLabelAndAccessKey, IsDisabled,
+    HasAction, HasActionListener, IsInline, HasCommandType,
+    HasTarget, HasTip, IsImmediateCommand, HasImage {
+}

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java Mon Feb 13 13:23:23 2006
@@ -26,9 +26,10 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MARKUP;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
+import org.apache.myfaces.tobago.component.UIOutput;
 
 import javax.faces.component.UIComponent;
-import javax.faces.component.UIOutput;
+
 
 public class OutTag extends BeanTag implements OutTagDeclaration {
 

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTagDeclaration.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTagDeclaration.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -64,6 +64,6 @@
    * Possible values are 'none', 'strong' and 'deleted'
    */
   @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "none")
+  @UIComponentTagAttribute(defaultValue = "none", allowedValues = { "none", "strong", "deleted" })
   void setMarkup(String markup);
 }

Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java?rev=377491&r1=377490&r2=377491&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTag.java Mon Feb 13 13:23:23 2006
@@ -21,22 +21,14 @@
  * $Id$
  */
 
-import org.apache.myfaces.tobago.apt.annotation.Tag;
+
 import org.apache.myfaces.tobago.component.UIPanel;
-import org.apache.myfaces.tobago.taglib.decl.HasDimension;
-import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
 
-/**
- * Intended for use in situations when only one UIComponent child can be
- * nested, such as in the case of facets.
- */
-@Tag(name = "panel")
 public class PanelTag extends TobagoBodyTag
-    implements HasIdBindingAndRendered, HasDimension {
+    implements PanelTagDeclaration {
 
   public String getComponentType() {
     return UIPanel.COMPONENT_TYPE;
   }
-
 }
 

Added: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java?rev=377491&view=auto
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java (added)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/taglib/component/PanelTagDeclaration.java Mon Feb 13 13:23:23 2006
@@ -0,0 +1,39 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Copyright 2002-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.taglib.decl.HasDimension;
+import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 11.02.2006
+ * Time: 13:54:04
+ * To change this template use File | Settings | File Templates.
+ */
+/**
+ * Intended for use in situations when only one UIComponent child can be
+ * nested, such as in the case of facets.
+ */
+@Tag(name = "panel")
+@UIComponentTag(UIComponent = "org.apache.myfaces.tobago.component.UIPanel")
+public interface PanelTagDeclaration extends TobagoTagDeclaration,
+    HasIdBindingAndRendered, HasDimension {
+}