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/04/14 11:30:47 UTC
svn commit: r394055 - in
/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago:
component/ event/ taglib/component/
Author: bommel
Date: Fri Apr 14 02:30:44 2006
New Revision: 394055
URL: http://svn.apache.org/viewcvs?rev=394055&view=rev
Log:
some cleanups
Added:
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/SortActionSource.java
Modified:
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/TabChangeSource.java
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java
incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java
Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java?rev=394055&r1=394054&r2=394055&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UICommand.java Fri Apr 14 02:30:44 2006
@@ -16,12 +16,15 @@
* limitations under the License.
*/
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DEFAULT_COMMAND;
+
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
import java.io.IOException;
import java.util.Iterator;
-/**
+/*
* User: weber
* Date: Apr 4, 2005
* Time: 5:02:10 PM
@@ -30,10 +33,18 @@
public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Command";
- private boolean defaultCommand;
+ private Boolean defaultCommand;
public boolean isDefaultCommand() {
- return defaultCommand;
+ if (defaultCommand != null) {
+ return defaultCommand;
+ }
+ ValueBinding vb = getValueBinding(ATTR_DEFAULT_COMMAND);
+ if (vb != null) {
+ return Boolean.TRUE.equals(vb.getValue(getFacesContext()));
+ } else {
+ return false;
+ }
}
public void setDefaultCommand(boolean defaultCommand) {
@@ -50,7 +61,7 @@
public void restoreState(FacesContext context, Object savedState) {
Object[] values = (Object[]) savedState;
super.restoreState(context, values[0]);
- defaultCommand = (Boolean)values[1];
+ defaultCommand = (Boolean) values[1];
}
Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java?rev=394055&r1=394054&r2=394055&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIData.java Fri Apr 14 02:30:44 2006
@@ -38,6 +38,7 @@
import org.apache.myfaces.tobago.event.SheetStateChangeListener;
import org.apache.myfaces.tobago.event.SheetStateChangeSource;
import org.apache.myfaces.tobago.event.SortActionEvent;
+import org.apache.myfaces.tobago.event.SortActionSource;
import org.apache.myfaces.tobago.model.SheetState;
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.SheetRendererWorkaround;
@@ -59,7 +60,7 @@
import java.util.Map;
public class UIData extends javax.faces.component.UIData
- implements SheetStateChangeSource, AjaxComponent {
+ implements SheetStateChangeSource, SortActionSource, AjaxComponent {
private static final Log LOG = LogFactory.getLog(UIData.class);
@@ -567,13 +568,13 @@
public boolean isShowHeader() {
if (showHeader != null) {
- return showHeader;
+ return showHeader;
}
ValueBinding vb = getValueBinding(ATTR_SHOW_HEADER);
if (vb != null) {
- return (!Boolean.FALSE.equals(vb.getValue(getFacesContext())));
+ return (!Boolean.FALSE.equals(vb.getValue(getFacesContext())));
} else {
- return showHeader == null || showHeader;
+ return true;
}
}
Added: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/SortActionSource.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/SortActionSource.java?rev=394055&view=auto
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/SortActionSource.java (added)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/SortActionSource.java Fri Apr 14 02:30:44 2006
@@ -0,0 +1,31 @@
+package org.apache.myfaces.tobago.event;
+
+/*
+ * 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: 14.04.2006
+ * Time: 10:42:38
+ * To change this template use File | Settings | File Templates.
+ */
+public interface SortActionSource {
+
+ javax.faces.el.MethodBinding getSortActionListener();
+
+ void setSortActionListener(javax.faces.el.MethodBinding actionListener);
+}
Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/TabChangeSource.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/TabChangeSource.java?rev=394055&r1=394054&r2=394055&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/TabChangeSource.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/event/TabChangeSource.java Fri Apr 14 02:30:44 2006
@@ -16,7 +16,7 @@
* limitations under the License.
*/
-/**
+/*
* Created by IntelliJ IDEA.
* User: bommel
* Date: 22.12.2005
Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java?rev=394055&r1=394054&r2=394055&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FormTagDeclaration.java Fri Apr 14 02:30:44 2006
@@ -21,7 +21,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasBinding;
import org.apache.myfaces.tobago.taglib.decl.HasId;
-/**
+/*
* Created by IntelliJ IDEA.
* User: bommel
* Date: 11.02.2006
Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java?rev=394055&r1=394054&r2=394055&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SheetTagDeclaration.java Fri Apr 14 02:30:44 2006
@@ -22,6 +22,7 @@
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
/*
* Created by IntelliJ IDEA.
@@ -180,7 +181,8 @@
* StateChangeEvent parameter, with a return type of void.
*/
@TagAttribute
- @UIComponentTagAttribute()
+ @UIComponentTagAttribute(type = "javax.faces.el.MethodBinding",
+ expression = DynamicExpression.METHOD_BINDING)
void setStateChangeListener(String stateChangeListener);
/**
@@ -201,7 +203,8 @@
* the sheets {@link org.apache.myfaces.tobago.model.SheetState} object.
*/
@TagAttribute
- @UIComponentTagAttribute()
+ @UIComponentTagAttribute(type = "javax.faces.el.MethodBinding",
+ expression = DynamicExpression.METHOD_BINDING)
void setSortActionListener(String sortActionListener);
}
Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java?rev=394055&r1=394054&r2=394055&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeListboxTagDeclaration.java Fri Apr 14 02:30:44 2006
@@ -42,7 +42,7 @@
@Tag(name = "treeListbox")
@BodyContentDescription(anyTagOf = "<f:facet>* <f:actionListener>?")
@Preliminary(
- "Implement a var attribute for the tree like in the sheet (http://issues.apache.org/jira/browse/MYFACES-903)")
+ "Implement a var attribute for the tree like in the sheet (http://issues.apache.org/jira/browse/TOBAGO-18)")
@UIComponentTag(
uiComponent = "org.apache.myfaces.tobago.component.UITreeListbox",
rendererType = "TreeListbox")
Modified: incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java?rev=394055&r1=394054&r2=394055&view=diff
==============================================================================
--- incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java (original)
+++ incubator/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TreeTagDeclaration.java Fri Apr 14 02:30:44 2006
@@ -43,7 +43,7 @@
@Tag(name = "tree")
@BodyContentDescription(anyTagOf = "<f:facet>* <f:actionListener>?")
@Preliminary(
- "Implement a var attribute for the tree like in the sheet (http://issues.apache.org/jira/browse/MYFACES-903)")
+ "Implement a var attribute for the tree like in the sheet (http://issues.apache.org/jira/browse/TOBAGO-18)")
@UIComponentTag(
uiComponent = "org.apache.myfaces.tobago.component.UITree",
rendererType = "Tree")