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/18 14:54:30 UTC
svn commit: r394929 - in /myfaces/tobago/trunk:
contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/
core/src/main/java/org/apache/myfaces/tobago/component/
core/src/main/java/org/apache/myfaces/tobago/taglib/component/
core/src/main/java...
Author: bommel
Date: Tue Apr 18 05:54:25 2006
New Revision: 394929
URL: http://svn.apache.org/viewcvs?rev=394929&view=rev
Log:
fixed errors for facelet support
Added:
myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java
myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchange.java (contents, props changed)
- copied, changed from r394446, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasValueChangeListener.java
- copied, changed from r394446, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java
Removed:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneListboxTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneRadioTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTagDeclaration.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java
myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/FaceletAnnotationVisitor.java
Added: myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java?rev=394929&view=auto
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java (added)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AbstractTobagoTagLibrary.java Tue Apr 18 05:54:25 2006
@@ -0,0 +1,35 @@
+package org.apache.myfaces.tobago.facelets;
+
+/*
+ * 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 com.sun.facelets.tag.AbstractTagLibrary;
+
+/*
+ * Created by IntelliJ IDEA.
+ * User: bommel
+ * Date: 18.04.2006
+ * Time: 14:22:52
+ * To change this template use File | Settings | File Templates.
+ */
+public class AbstractTobagoTagLibrary extends AbstractTagLibrary {
+
+ public AbstractTobagoTagLibrary(String namespace) {
+ super(namespace);
+ addTagHandler("attribute", AttributeHandler.class);
+ }
+
+}
Added: myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java?rev=394929&view=auto
==============================================================================
--- myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java (added)
+++ myfaces/tobago/trunk/contrib/facelets/src/main/java/org/apache/myfaces/tobago/facelets/AttributeHandler.java Tue Apr 18 05:54:25 2006
@@ -0,0 +1,73 @@
+package org.apache.myfaces.tobago.facelets;
+
+/*
+ * 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.el.ELException;
+import javax.el.MethodExpression;
+import javax.faces.FacesException;
+import javax.faces.context.FacesContext;
+import javax.faces.component.UIComponent;
+import javax.faces.component.EditableValueHolder;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.el.ELAdaptor;
+import com.sun.facelets.el.LegacyMethodBinding;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+
+public final class AttributeHandler extends TagHandler {
+ private static final Class [] VALIDATOR =
+ new Class[] { FacesContext.class, UIComponent.class, Object.class } ;
+
+ private final TagAttribute name;
+
+ private final TagAttribute value;
+
+ public AttributeHandler(TagConfig config) {
+ super(config);
+ this.name = this.getRequiredAttribute("name");
+ this.value = this.getRequiredAttribute("value");
+ }
+
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws FacesException, FaceletException, ELException {
+ if (parent == null) {
+ throw new TagException(tag, "Parent UIComponent was null");
+ }
+
+ if (parent.getParent() == null) {
+ String nameValue = name.getValue(ctx);
+ if ("rendered".equals(nameValue)) {
+ parent.setRendered(value.getBoolean(ctx));
+ } else if (parent instanceof EditableValueHolder
+ && "validator".equals(nameValue)) {
+ MethodExpression methodExpression = value.getMethodExpression(ctx, null, VALIDATOR);
+ ((EditableValueHolder) parent).setValidator(new LegacyMethodBinding(methodExpression));
+ } else if (!parent.getAttributes().containsKey(nameValue)) {
+ if (value.isLiteral()) {
+ parent.getAttributes().put(nameValue, value.getValue());
+ } else {
+ ELAdaptor.setExpression(parent, nameValue, value
+ .getValueExpression(ctx, Object.class));
+ }
+ }
+ }
+ }
+}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java Tue Apr 18 05:54:25 2006
@@ -71,6 +71,7 @@
import javax.faces.el.ValueBinding;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
+import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import javax.faces.render.RenderKit;
import javax.faces.render.RenderKitFactory;
@@ -90,7 +91,9 @@
= "org.apache.myfaces.tobago.component.ComponentUtil.RendererKeyPrefix_";
private static final Class[] ACTION_LISTENER_ARGS = {ActionEvent.class};
-
+ private static final Class[] VALUE_CHANGE_LISTENER_ARGS = {ValueChangeEvent.class};
+ private static final Class[] VALIDATOR_ARGS =
+ {FacesContext.class, UIComponent.class, Object.class};
private ComponentUtil() {
}
@@ -840,16 +843,12 @@
}
return items;
}
- public static void setValidator(UIComponent component, String validator) {
- EditableValueHolder editableValueHolder = (EditableValueHolder) component;
+ public static void setValidator(EditableValueHolder editableValueHolder, String validator) {
if (validator != null && editableValueHolder.getValidator() == null) {
if (UIComponentTag.isValueReference(validator)) {
- Class[] arguments = {
- FacesContext.class, UIComponent.class, Object.class
- };
MethodBinding methodBinding =
- FacesContext.getCurrentInstance().getApplication().createMethodBinding(validator, arguments);
- ((EditableValueHolder) component).setValidator(methodBinding);
+ FacesContext.getCurrentInstance().getApplication().createMethodBinding(validator, VALIDATOR_ARGS);
+ editableValueHolder.setValidator(methodBinding);
}
}
}
@@ -918,6 +917,22 @@
}
}
}
+
+ public static void setValueChangeListener(EditableValueHolder valueHolder, String valueChangeListener) {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final Application application = facesContext.getApplication();
+ if (valueChangeListener != null) {
+ if (UIComponentTag.isValueReference(valueChangeListener)) {
+ MethodBinding binding
+ = application.createMethodBinding(valueChangeListener, VALUE_CHANGE_LISTENER_ARGS);
+ valueHolder.setValueChangeListener(binding);
+ } else {
+ throw new IllegalArgumentException(
+ "Must be a valueReference (valueChangeListener): " + valueChangeListener);
+ }
+ }
+ }
+
public static void setSortActionListener(UIData data, String actionListener) {
final FacesContext facesContext = FacesContext.getCurrentInstance();
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIToolBar.java Tue Apr 18 05:54:25 2006
@@ -1,20 +1,25 @@
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.
- */
+* 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_ICON_SIZE;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL_POSITION;
+
+import javax.faces.el.ValueBinding;
/**
* Created by IntelliJ IDEA.
@@ -34,6 +39,41 @@
public static final String ICON_OFF = "off";
public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.ToolBar";
+
+ private String labelPosition;
+ private String iconSize;
+
+ public String getLabelPosition() {
+ if (labelPosition != null) {
+ return labelPosition;
+ }
+ ValueBinding vb = getValueBinding(ATTR_LABEL_POSITION);
+ if (vb != null) {
+ return (String) vb.getValue(getFacesContext());
+ } else {
+ return LABEL_BOTTOM;
+ }
+ }
+
+ public void setLabelPosition(String labelPosition) {
+ this.labelPosition = labelPosition;
+ }
+
+ public String getIconSize() {
+ if (iconSize != null) {
+ return iconSize;
+ }
+ ValueBinding vb = getValueBinding(ATTR_ICON_SIZE);
+ if (vb != null) {
+ return (String) vb.getValue(getFacesContext());
+ } else {
+ return ICON_SMALL;
+ }
+ }
+
+ public void setIconSize(String iconSize) {
+ this.iconSize = iconSize;
+ }
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -37,8 +37,7 @@
*/
@Tag(name = "column")
@UIComponentTag(
- uiComponent = "javax.faces.component.UIColumn",
- rendererType = "Column")
+ uiComponent = "javax.faces.component.UIColumn")
public interface ColumnTagDeclaration extends TobagoTagDeclaration, HasIdBindingAndRendered, HasLabel {
/**
* Alignment of this column.
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/FileTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -22,7 +22,6 @@
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
@@ -40,7 +39,7 @@
rendererType = "File")
public interface FileTagDeclaration
extends InputTagDeclaration, HasIdBindingAndRendered, IsDisabled,
- HasLabelAndAccessKey, HasOnchangeListener, HasTip {
+ HasLabelAndAccessKey, HasTip {
/**
* Value binding expression pointing to a
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -23,7 +23,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedWidth;
import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasSuggestMethod;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.HasValue;
@@ -49,7 +49,7 @@
rendererType = "In")
public interface InTagDeclaration
extends TextInputTagDeclaration, HasValue, HasIdBindingAndRendered,
- HasConverter, IsReadonly, IsDisabled, HasDeprecatedWidth, HasOnchangeListener,
+ HasConverter, IsReadonly, IsDisabled, HasDeprecatedWidth, HasOnchange,
IsInline, IsFocus, IsRequired, HasTip, HasLabelAndAccessKey,
IsPassword, HasSuggestMethod {
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTag.java Tue Apr 18 05:54:25 2006
@@ -24,14 +24,16 @@
import org.apache.commons.logging.LogFactory;
import javax.faces.component.UIComponent;
+import javax.faces.component.EditableValueHolder;
public abstract class InputTag extends BeanTag implements InputTagDeclaration {
private static final Log LOG = LogFactory.getLog(InputTag.class);
-
+
private String onchange;
private String focus;
private String tip;
private String validator;
+ private String valueChangeListener;
public void release() {
super.release();
@@ -39,6 +41,7 @@
this.focus = null;
tip = null;
validator = null;
+ valueChangeListener = null;
}
protected void setProperties(UIComponent component) {
@@ -46,7 +49,11 @@
ComponentUtil.setStringProperty(component, ATTR_ONCHANGE, onchange);
ComponentUtil.setBooleanProperty(component, ATTR_FOCUS, focus);
ComponentUtil.setStringProperty(component, ATTR_TIP, tip);
- ComponentUtil.setValidator(component, validator);
+ if (component instanceof EditableValueHolder) {
+ EditableValueHolder editableValueHolder = (EditableValueHolder) component;
+ ComponentUtil.setValidator(editableValueHolder, validator);
+ ComponentUtil.setValueChangeListener(editableValueHolder, valueChangeListener);
+ }
}
public String getOnchange() {
@@ -98,6 +105,14 @@
public void setValidator(String validator) {
this.validator = validator;
+ }
+
+ public String getValueChangeListener() {
+ return valueChangeListener;
+ }
+
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
}
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InputTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -17,12 +17,15 @@
*/
import org.apache.myfaces.tobago.taglib.decl.HasValidator;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasValue;
/**
* Created: Aug 5, 2005 4:18:38 PM
* User: bommel
* $Id: $
*/
-public interface InputTagDeclaration extends BeanTagDeclaration, HasValidator {
+public interface InputTagDeclaration extends BeanTagDeclaration, HasValidator, HasOnchange, HasValue, HasValueChangeListener {
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneChoiceTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -24,7 +24,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasBinding;
import org.apache.myfaces.tobago.taglib.decl.HasId;
import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.HasValue;
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
@@ -48,7 +48,7 @@
rendererType = "SelectOneChoice")
public interface SelectOneChoiceTagDeclaration
extends SelectOneTagDeclaration, HasId, HasValue, IsDisabled,
- IsReadonly, HasOnchangeListener, IsInline, HasLabelAndAccessKey,
+ IsReadonly, HasOnchange, IsInline, HasLabelAndAccessKey,
IsRendered, HasBinding, HasTip {
/**
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneListboxTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneListboxTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneListboxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneListboxTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -24,7 +24,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasBinding;
import org.apache.myfaces.tobago.taglib.decl.HasId;
import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.HasValue;
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
@@ -46,7 +46,7 @@
uiComponent = "org.apache.myfaces.tobago.component.UISelectOne",
rendererType = "SelectOneListbox")
public interface SelectOneListboxTagDeclaration extends SelectOneTagDeclaration, HasId, HasValue, IsDisabled,
- IsReadonly, HasOnchangeListener, HasLabelAndAccessKey, IsRendered, HasBinding, HasDeprecatedHeight, HasTip {
+ IsReadonly, HasOnchange, HasLabelAndAccessKey, IsRendered, HasBinding, HasDeprecatedHeight, HasTip {
/**
* Flag indicating that selecting an Item representing a Value is Required.
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneRadioTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneRadioTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneRadioTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectOneRadioTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -23,7 +23,7 @@
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
import org.apache.myfaces.tobago.taglib.decl.HasBinding;
import org.apache.myfaces.tobago.taglib.decl.HasId;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasRenderRange;
import org.apache.myfaces.tobago.taglib.decl.HasValue;
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
@@ -44,7 +44,7 @@
uiComponent = "org.apache.myfaces.tobago.component.UISelectOne",
rendererType = "SelectOneRadio")
public interface SelectOneRadioTagDeclaration extends SelectOneTagDeclaration, HasValue, IsDisabled, HasId,
- HasOnchangeListener, IsInline, HasRenderRange, IsRendered, HasBinding {
+ HasOnchange, IsInline, HasRenderRange, IsRendered, HasBinding {
/**
* Flag indicating that selecting an Item representing a Value is Required.
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTagDeclaration.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTagDeclaration.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTagDeclaration.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTagDeclaration.java Tue Apr 18 05:54:25 2006
@@ -24,7 +24,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedDimension;
import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
import org.apache.myfaces.tobago.taglib.decl.HasLabelAndAccessKey;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.HasValue;
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
@@ -44,9 +44,9 @@
@Tag(name = "textarea")
@UIComponentTag(
uiComponent = "org.apache.myfaces.tobago.component.UIInput",
- rendererType = "Textarea")
+ rendererType = "TextArea")
public interface TextAreaTagDeclaration extends TextInputTagDeclaration, HasIdBindingAndRendered,
- HasValue, HasConverter, IsReadonly, IsDisabled, HasDeprecatedDimension, HasOnchangeListener,
+ HasValue, HasConverter, IsReadonly, IsDisabled, HasDeprecatedDimension, HasOnchange,
IsFocus, IsRequired, HasLabelAndAccessKey, HasTip {
/**
Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchange.java (from r394446, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java)
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchange.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchange.java&p1=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java&r1=394446&r2=394929&rev=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchange.java Tue Apr 18 05:54:25 2006
@@ -20,17 +20,17 @@
import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
-/**
+/*
* Created: Apr 9, 2005 3:14:01 PM
* User: bommel
* $Id$
*/
-public interface HasOnchangeListener {
+public interface HasOnchange {
/**
* Clientside script function to add to this component's onchange handler.
*/
@TagAttribute
- @UIComponentTagAttribute(expression = DynamicExpression.METHOD_BINDING)
+ @UIComponentTagAttribute()
void setOnchange(String onchange);
}
Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchange.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchange.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Copied: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasValueChangeListener.java (from r394446, myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java)
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasValueChangeListener.java?p2=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasValueChangeListener.java&p1=myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java&r1=394446&r2=394929&rev=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasOnchangeListener.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasValueChangeListener.java Tue Apr 18 05:54:25 2006
@@ -16,21 +16,26 @@
* limitations under the License.
*/
-import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
-/**
- * Created: Apr 9, 2005 3:14:01 PM
+/*
+ * Created by IntelliJ IDEA.
* User: bommel
- * $Id$
+ * Date: 18.04.2006
+ * Time: 11:39:26
+ * To change this template use File | Settings | File Templates.
*/
-public interface HasOnchangeListener {
-
+public interface HasValueChangeListener {
/**
- * Clientside script function to add to this component's onchange handler.
+ * MethodBinding representing a value change listener method
+ * that will be notified when a new value has been set for this input component.
+ * The expression must evaluate to a public method that takes a ValueChangeEvent
+ * parameter, with a return type of void.
+ * @param valueChangeListener
*/
@TagAttribute
@UIComponentTagAttribute(expression = DynamicExpression.METHOD_BINDING)
- void setOnchange(String onchange);
+ public void setValueChangeListener(String valueChangeListener);
}
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/DateExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -29,6 +29,8 @@
import org.apache.myfaces.tobago.taglib.decl.IsInline;
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -45,8 +47,8 @@
*/
@Tag(name = "date")
public class DateExtensionTag extends BodyTagSupport
- implements HasValue, HasValidator, HasIdBindingAndRendered,
- HasConverter, IsReadonly, IsDisabled,
+ implements HasValue, HasValueChangeListener, HasValidator, HasIdBindingAndRendered,
+ HasConverter, IsReadonly, IsDisabled, HasOnchange,
IsRequired, HasTip, HasLabel, IsFocus, IsInline {
private String binding;
@@ -60,7 +62,10 @@
private String required;
private String tip;
private String value;
+ private String valueChangeListener;
private String inline;
+ private String onchange;
+
private LabelExtensionTag labelTag;
private DateTag dateTag;
@@ -87,6 +92,9 @@
if (value != null) {
dateTag.setValue(value);
}
+ if (valueChangeListener != null) {
+ dateTag.setValueChangeListener(valueChangeListener);
+ }
if (binding != null) {
dateTag.setBinding(binding);
}
@@ -99,6 +107,9 @@
if (disabled != null) {
dateTag.setDisabled(disabled);
}
+ if (onchange != null) {
+ dateTag.setOnchange(onchange);
+ }
if (focus != null) {
dateTag.setFocus(focus);
}
@@ -142,14 +153,25 @@
required = null;
tip = null;
value = null;
+ valueChangeListener = null;
+ onchange = null;
+
}
public void setValue(String value) {
this.value = value;
}
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
+ }
+
public void setLabel(String label) {
this.label = label;
+ }
+
+ public void setOnchange(String onchange) {
+ this.onchange = onchange;
}
public void setFocus(String focus) {
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/FileExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -33,10 +33,13 @@
private String binding;
private String label;
+ private String value;
+ private String valueChangeListener;
private String validator;
private String disabled;
private String rendered;
private String tip;
+ private String onchange;
private LabelExtensionTag labelTag;
private FileTag fileTag;
@@ -60,6 +63,12 @@
fileTag = new FileTag();
fileTag.setPageContext(pageContext);
+ if (value != null) {
+ fileTag.setValue(value);
+ }
+ if (valueChangeListener != null) {
+ fileTag.setValueChangeListener(valueChangeListener);
+ }
if (binding != null) {
fileTag.setBinding(binding);
}
@@ -72,6 +81,9 @@
if (id != null) {
fileTag.setId(id);
}
+ if (onchange != null) {
+ fileTag.setOnchange(onchange);
+ }
fileTag.setParent(labelTag);
fileTag.doStartTag();
@@ -92,10 +104,25 @@
validator = null;
disabled = null;
tip = null;
+ onchange = null;
+ value = null;
+ valueChangeListener = null;
}
public void setLabel(String label) {
this.label = label;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
+ }
+
+ public void setOnchange(String onchange) {
+ this.onchange = onchange;
}
public void setBinding(String binding) {
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -29,13 +29,15 @@
import org.apache.myfaces.tobago.taglib.decl.IsPassword;
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@Tag(name = "in")
public class InExtensionTag extends BodyTagSupport
- implements HasValue, HasValidator, HasIdBindingAndRendered,
- HasConverter, IsReadonly, IsDisabled,
+ implements HasValue, HasValueChangeListener, HasValidator, HasIdBindingAndRendered,
+ HasConverter, IsReadonly, IsDisabled, HasOnchange,
IsRequired, HasTip, HasLabel, IsPassword, IsFocus {
private String binding;
@@ -50,6 +52,8 @@
private String required;
private String tip;
private String value;
+ private String valueChangeListener;
+ private String onchange;
private LabelExtensionTag labelTag;
private InTag inTag;
@@ -76,6 +80,9 @@
if (value != null) {
inTag.setValue(value);
}
+ if (valueChangeListener != null) {
+ inTag.setValueChangeListener(valueChangeListener);
+ }
if (binding != null) {
inTag.setBinding(binding);
}
@@ -85,6 +92,9 @@
if (validator != null) {
inTag.setValidator(validator);
}
+ if (onchange != null) {
+ inTag.setOnchange(onchange);
+ }
if (disabled != null) {
inTag.setDisabled(disabled);
}
@@ -131,12 +141,18 @@
required = null;
tip = null;
value = null;
+ valueChangeListener = null;
+ onchange = null;
}
public void setValue(String value) {
this.value = value;
}
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
+ }
+
public void setLabel(String label) {
this.label = label;
}
@@ -155,6 +171,10 @@
public void setConverter(String converter) {
this.converter = converter;
+ }
+
+ public void setOnchange(String onchange) {
+ this.onchange = onchange;
}
public void setValidator(String validator) {
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectManyListboxExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -29,6 +29,8 @@
import org.apache.myfaces.tobago.taglib.decl.IsDisabled;
import org.apache.myfaces.tobago.taglib.decl.IsInline;
import org.apache.myfaces.tobago.taglib.decl.IsRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -42,11 +44,12 @@
*/
@Tag(name = "selectManyListbox")
public class SelectManyListboxExtensionTag extends BodyTagSupport
- implements HasId, HasValue, IsDisabled, HasDeprecatedHeight, IsInline,
- HasLabel, IsRendered, HasBinding, HasTip, HasConverter, HasValidator {
+ implements HasId, HasValue, HasValueChangeListener, IsDisabled, HasDeprecatedHeight, IsInline,
+ HasLabel, IsRendered, HasBinding, HasTip, HasConverter, HasValidator, HasOnchange {
private String required;
private String value;
+ private String valueChangeListener;
private String disabled;
private String readonly;
private String onchange;
@@ -91,10 +94,12 @@
if (value != null) {
selectManyListboxTag.setValue(value);
}
+ if (valueChangeListener != null) {
+ selectManyListboxTag.setValueChangeListener(valueChangeListener);
+ }
if (binding != null) {
selectManyListboxTag.setBinding(binding);
}
-
if (onchange != null) {
selectManyListboxTag.setOnchange(onchange);
}
@@ -151,6 +156,7 @@
required = null;
tip = null;
value = null;
+ valueChangeListener = null;
}
public void setRequired(String required) {
@@ -159,6 +165,10 @@
public void setValue(String value) {
this.value = value;
+ }
+
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
}
public void setDisabled(String disabled) {
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneChoiceExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -22,7 +22,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasConverter;
import org.apache.myfaces.tobago.taglib.decl.HasId;
import org.apache.myfaces.tobago.taglib.decl.HasLabel;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.HasValidator;
import org.apache.myfaces.tobago.taglib.decl.HasValue;
@@ -30,6 +30,7 @@
import org.apache.myfaces.tobago.taglib.decl.IsInline;
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
import org.apache.myfaces.tobago.taglib.decl.IsRendered;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -37,12 +38,13 @@
@Tag(name = "selectOneChoice")
public class SelectOneChoiceExtensionTag
extends BodyTagSupport
- implements HasId, HasValue, IsDisabled,
- IsReadonly, HasOnchangeListener, IsInline, HasLabel,
+ implements HasId, HasValue, HasValueChangeListener, IsDisabled,
+ IsReadonly, HasOnchange, IsInline, HasLabel,
IsRendered, HasBinding, HasTip , HasValidator, HasConverter {
private String required;
private String value;
+ private String valueChangeListener;
private String disabled;
private String readonly;
private String onchange;
@@ -79,6 +81,9 @@
if (value != null) {
selectOneChoiceTag.setValue(value);
}
+ if (valueChangeListener != null) {
+ selectOneChoiceTag.setValueChangeListener(valueChangeListener);
+ }
if (validator != null) {
selectOneChoiceTag.setValidator(validator);
}
@@ -135,6 +140,7 @@
required = null;
tip = null;
value = null;
+ valueChangeListener = null;
}
public void setRequired(String required) {
@@ -143,6 +149,10 @@
public void setValue(String value) {
this.value = value;
+ }
+
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
}
public void setValidator(String validator) {
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/SelectOneListboxExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -23,7 +23,7 @@
import org.apache.myfaces.tobago.taglib.decl.HasDeprecatedHeight;
import org.apache.myfaces.tobago.taglib.decl.HasId;
import org.apache.myfaces.tobago.taglib.decl.HasLabel;
-import org.apache.myfaces.tobago.taglib.decl.HasOnchangeListener;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
import org.apache.myfaces.tobago.taglib.decl.HasTip;
import org.apache.myfaces.tobago.taglib.decl.HasValidator;
import org.apache.myfaces.tobago.taglib.decl.HasValue;
@@ -31,6 +31,7 @@
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
import org.apache.myfaces.tobago.taglib.decl.IsRendered;
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -47,11 +48,12 @@
*/
@Tag(name = "selectOneListbox")
public class SelectOneListboxExtensionTag
- extends BodyTagSupport implements HasId, HasValue, IsDisabled,
- HasLabel, IsReadonly, HasOnchangeListener, IsRendered,
+ extends BodyTagSupport implements HasId, HasValue, HasValueChangeListener, IsDisabled,
+ HasLabel, IsReadonly, HasOnchange, IsRendered,
HasBinding, HasDeprecatedHeight, HasTip , IsRequired, HasConverter, HasValidator {
private String required;
private String value;
+ private String valueChangeListener;
private String disabled;
private String readonly;
private String onchange;
@@ -89,6 +91,9 @@
if (value != null) {
selectOneListboxTag.setValue(value);
}
+ if (valueChangeListener != null) {
+ selectOneListboxTag.setValueChangeListener(valueChangeListener);
+ }
if (binding != null) {
selectOneListboxTag.setBinding(binding);
}
@@ -148,6 +153,7 @@
required = null;
tip = null;
value = null;
+ valueChangeListener = null;
}
public void setRequired(String required) {
@@ -156,6 +162,10 @@
public void setValue(String value) {
this.value = value;
+ }
+
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
}
public void setDisabled(String disabled) {
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -28,14 +28,16 @@
import org.apache.myfaces.tobago.taglib.decl.IsFocus;
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@Tag(name = "textarea")
public class TextAreaExtensionTag extends BodyTagSupport
- implements HasValue, HasIdBindingAndRendered,
+ implements HasValue, HasValueChangeListener, HasIdBindingAndRendered,
HasConverter, HasValidator, IsReadonly, IsDisabled,
- IsRequired, HasTip, HasLabel, IsFocus {
+ IsRequired, HasTip, HasLabel, IsFocus, HasOnchange {
private String binding;
private String converter;
@@ -47,7 +49,9 @@
private String required;
private String tip;
private String value;
+ private String valueChangeListener;
private String validator;
+ private String onchange;
private LabelExtensionTag labelTag;
private TextAreaTag textAreaTag;
@@ -74,6 +78,9 @@
if (value != null) {
textAreaTag.setValue(value);
}
+ if (valueChangeListener != null) {
+ textAreaTag.setValueChangeListener(valueChangeListener);
+ }
if (binding != null) {
textAreaTag.setBinding(binding);
}
@@ -83,6 +90,9 @@
if (validator != null) {
textAreaTag.setValidator(validator);
}
+ if (onchange != null) {
+ textAreaTag.setOnchange(onchange);
+ }
if (disabled != null) {
textAreaTag.setDisabled(disabled);
}
@@ -125,12 +135,18 @@
required = null;
tip = null;
value = null;
+ onchange = null;
+ valueChangeListener = null;
}
public void setValue(String value) {
this.value = value;
}
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
+ }
+
public void setLabel(String label) {
this.label = label;
}
@@ -154,6 +170,11 @@
public void setValidator(String validator) {
this.validator = validator;
}
+
+ public void setOnchange(String onchange) {
+ this.onchange = onchange;
+ }
+
public void setReadonly(String readonly) {
this.readonly = readonly;
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TimeExtensionTag.java Tue Apr 18 05:54:25 2006
@@ -29,6 +29,8 @@
import org.apache.myfaces.tobago.taglib.decl.IsInline;
import org.apache.myfaces.tobago.taglib.decl.IsReadonly;
import org.apache.myfaces.tobago.taglib.decl.IsRequired;
+import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
+import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -45,8 +47,8 @@
*/
@Tag(name = "time")
public class TimeExtensionTag extends BodyTagSupport
- implements HasValue, HasValidator, HasIdBindingAndRendered,
- HasConverter, IsReadonly, IsDisabled,
+ implements HasValue, HasValueChangeListener, HasValidator, HasIdBindingAndRendered,
+ HasConverter, IsReadonly, IsDisabled, HasOnchange,
IsRequired, HasTip, HasLabel, IsFocus, IsInline {
private String binding;
@@ -60,7 +62,9 @@
private String required;
private String tip;
private String value;
+ private String valueChangeListener;
private String inline;
+ private String onchange;
private LabelExtensionTag labelTag;
private TimeTag timeTag;
@@ -87,6 +91,9 @@
if (value != null) {
timeTag.setValue(value);
}
+ if (valueChangeListener != null) {
+ timeTag.setValueChangeListener(valueChangeListener);
+ }
if (binding != null) {
timeTag.setBinding(binding);
}
@@ -96,6 +103,9 @@
if (validator != null) {
timeTag.setValidator(validator);
}
+ if (onchange != null) {
+ timeTag.setOnchange(onchange);
+ }
if (disabled != null) {
timeTag.setDisabled(disabled);
}
@@ -142,12 +152,18 @@
required = null;
tip = null;
value = null;
+ onchange = null;
+ valueChangeListener = null;
}
public void setValue(String value) {
this.value = value;
}
+ public void setValueChangeListener(String valueChangeListener) {
+ this.valueChangeListener = valueChangeListener;
+ }
+
public void setLabel(String label) {
this.label = label;
}
@@ -171,6 +187,11 @@
public void setValidator(String validator) {
this.validator = validator;
}
+
+ public void setOnchange(String onchange) {
+ this.onchange = onchange;
+ }
+
public void setInline(String inline) {
this.inline = inline;
}
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/FaceletAnnotationVisitor.java
URL: http://svn.apache.org/viewcvs/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/FaceletAnnotationVisitor.java?rev=394929&r1=394928&r2=394929&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/FaceletAnnotationVisitor.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/FaceletAnnotationVisitor.java Tue Apr 18 05:54:25 2006
@@ -74,7 +74,7 @@
String packageName = "org.apache.myfaces.tobago.facelets";
- JClass libraryClass = new JClass("TobagoLibrary");
+ JClass libraryClass = new JClass("TobagoTagLibrary");
libraryClass.setPackageName(packageName);
addLeafTextElement(libraryClass.getName(), "library-class", taglib, document);
@@ -82,8 +82,7 @@
JCompUnit unit = new JCompUnit(libraryClass);
- libraryClass.setSuperClass("AbstractTagLibrary");
- libraryClass.addImport("com.sun.facelets.tag.AbstractTagLibrary");
+ libraryClass.setSuperClass("AbstractTobagoTagLibrary");
JField nameSpace = new JField(new JClass("String"),"NAMESPACE");
nameSpace.getModifiers().setFinal(true);