You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/06/17 04:07:43 UTC
svn commit: r955456 - in
/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces:
component/ChangeSelectProperties.java component/FocusBlurProperties.java
custom/selectOneRow/AbstractSelectOneRow.java
Author: lu4242
Date: Thu Jun 17 02:07:43 2010
New Revision: 955456
URL: http://svn.apache.org/viewvc?rev=955456&view=rev
Log:
use property interfaces when possible to prevent errors
Added:
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/ChangeSelectProperties.java
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/FocusBlurProperties.java
Modified:
myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneRow/AbstractSelectOneRow.java
Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/ChangeSelectProperties.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/ChangeSelectProperties.java?rev=955456&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/ChangeSelectProperties.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/ChangeSelectProperties.java Thu Jun 17 02:07:43 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component;
+
+
+public interface ChangeSelectProperties
+{
+ /**
+ * HTML: Specifies a script to be invoked when the element is modified.
+ *
+ * @JSFProperty
+ */
+ public abstract String getOnchange();
+
+
+ /**
+ * HTML: Specifies a script to be invoked when the element is selected.
+ *
+ * @JSFProperty
+ */
+ public abstract String getOnselect();
+
+}
Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/FocusBlurProperties.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/FocusBlurProperties.java?rev=955456&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/FocusBlurProperties.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/FocusBlurProperties.java Thu Jun 17 02:07:43 2010
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.component;
+
+
+public interface FocusBlurProperties
+{
+
+ /**
+ * HTML: Specifies a script to be invoked when the element loses focus.
+ *
+ * @JSFProperty
+ */
+ public String getOnblur();
+
+ /**
+ * HTML: Specifies a script to be invoked when the element receives focus.
+ *
+ * @JSFProperty
+ */
+ public String getOnfocus();
+
+}
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneRow/AbstractSelectOneRow.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneRow/AbstractSelectOneRow.java?rev=955456&r1=955455&r2=955456&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneRow/AbstractSelectOneRow.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/selectOneRow/AbstractSelectOneRow.java Thu Jun 17 02:07:43 2010
@@ -21,6 +21,9 @@ package org.apache.myfaces.custom.select
import javax.faces.component.UIInput;
import org.apache.myfaces.component.AlignProperty;
+import org.apache.myfaces.component.ChangeSelectProperties;
+import org.apache.myfaces.component.EventAware;
+import org.apache.myfaces.component.FocusBlurProperties;
/**
* Enhancement for a data-table to select one Row with a radio button. The row-index is stored in the vealu-binding
@@ -32,7 +35,7 @@ import org.apache.myfaces.component.Alig
* @since 1.1.7
*/
public abstract class AbstractSelectOneRow extends UIInput
- implements AlignProperty
+ implements AlignProperty, EventAware, FocusBlurProperties, ChangeSelectProperties
{
public static final String COMPONENT_TYPE = "org.apache.myfaces.SelectOneRow";
@@ -68,40 +71,4 @@ public abstract class AbstractSelectOneR
*/
public abstract boolean isReadonly();
- /**
- * HTML: Specifies a script to be invoked when the element loses focus.
- *
- * @JSFProperty
- */
- public abstract String getOnblur();
-
- /**
- * HTML: Specifies a script to be invoked when the element receives focus.
- *
- * @JSFProperty
- */
- public abstract String getOnfocus();
-
- /**
- * HTML: Specifies a script to be invoked when the element is modified.
- *
- * @JSFProperty
- */
- public abstract String getOnchange();
-
-
- /**
- * HTML: Specifies a script to be invoked when the element is selected.
- *
- * @JSFProperty
- */
- public abstract String getOnselect();
-
- /**
- * HTML: Script to be invoked when the element is clicked.
- *
- * @JSFProperty
- */
- public abstract String getOnclick();
-
}