You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/11/03 14:48:35 UTC
svn commit: r1767896 [1/2] - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/internal/t...
Author: lofwyr
Date: Thu Nov 3 14:48:35 2016
New Revision: 1767896
URL: http://svn.apache.org/viewvc?rev=1767896&view=rev
Log:
TOBAGO-1617: New tag <tc:event> to be similar to <f:ajax> and to replace <tc:command> in facets
* generating behavior code
Added:
myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Behavior.java
- copied, changed from r1767843, myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Facet.java
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIProgress.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIRow.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBooleanCheckbox.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITreeSelect.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DateTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/InTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PanelTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ProgressTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyCheckboxTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListboxTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyShuttleTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabGroupTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TextareaTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java
myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java
myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTag.java
myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/ComponentInfo.java
myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java
myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ClientBehaviors.java Thu Nov 3 14:48:35 2016
@@ -21,10 +21,26 @@ package org.apache.myfaces.tobago.compon
public enum ClientBehaviors {
+ change,
click,
- change;
+ complete,
+ dblclick,
+ load,
+ mouseover,
+ mouseout,
+ reload, // tbd
+ resize,
+ suggest; // tbd
+ public static final String CHANGE = "change";
public static final String CLICK = "click";
- public static final String CHANGE = "click";
+ public static final String COMPLETE = "complete";
+ public static final String DBLCLICK = "dblclick";
+ public static final String LOAD = "load";
+ public static final String MOUSEOVER = "mouseover";
+ public static final String MOUSEOUT = "mouseout";
+ public static final String RELOAD = "reload"; // tbd
+ public static final String RESIZE = "resize";
+ public static final String SUGGEST = "suggest"; // tbd
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUICommand.java Thu Nov 3 14:48:35 2016
@@ -28,17 +28,12 @@ import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.component.behavior.ClientBehaviorHolder;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUICommand extends AbstractUICommandBase
implements SupportsAccessKey, Visual, ClientBehaviorHolder {
private static final Logger LOG = LoggerFactory.getLogger(AbstractUICommand.class);
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("click", "change");
-
enum PropertyKeys {
disabled,
}
@@ -59,18 +54,6 @@ public abstract class AbstractUICommand
return parentOfCommands;
}
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "click";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
@Override
public abstract String getLabel();
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIFile.java Thu Nov 3 14:48:35 2016
@@ -30,27 +30,10 @@ import javax.faces.component.UIInput;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
import javax.servlet.http.Part;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUIFile extends UIInput implements SupportsLabelLayout, Visual, ClientBehaviorHolder,
SupportFieldId {
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("change");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "change";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
@Override
public void validate(final FacesContext facesContext) {
if (isRequired()) {
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIInput.java Thu Nov 3 14:48:35 2016
@@ -27,27 +27,10 @@ import org.apache.myfaces.tobago.util.Co
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUIInput extends javax.faces.component.UIInput
implements SupportsAccessKey, SupportsLabelLayout, Visual, ClientBehaviorHolder, SupportFieldId {
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("change", "click");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "change";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
public abstract Integer getTabIndex();
public abstract boolean isFocus();
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java Thu Nov 3 14:48:35 2016
@@ -31,8 +31,6 @@ import javax.faces.component.UIViewRoot;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.Iterator;
public abstract class AbstractUIPage extends AbstractUIFormBase implements Visual, ClientBehaviorHolder {
@@ -45,22 +43,6 @@ public abstract class AbstractUIPage ext
private String formId;
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("click", "resize", "load");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "click";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
-
@Override
public boolean getRendersChildren() {
return true;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPanel.java Thu Nov 3 14:48:35 2016
@@ -20,24 +20,6 @@
package org.apache.myfaces.tobago.internal.component;
import javax.faces.component.behavior.ClientBehaviorHolder;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUIPanel extends AbstractUICollapsiblePanel implements ClientBehaviorHolder {
-
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("click", "mouseover", "mouseout");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "click";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIProgress.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIProgress.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIProgress.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIProgress.java Thu Nov 3 14:48:35 2016
@@ -31,8 +31,6 @@ import javax.faces.event.ComponentSystem
import javax.faces.event.ListenerFor;
import javax.faces.event.PreRenderComponentEvent;
import javax.swing.BoundedRangeModel;
-import java.util.Arrays;
-import java.util.Collection;
@ListenerFor(systemEventClass = PreRenderComponentEvent.class)
public abstract class AbstractUIProgress extends UIOutput
@@ -40,21 +38,6 @@ public abstract class AbstractUIProgress
private static final Logger LOG = LoggerFactory.getLogger(AbstractUIProgress.class);
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("complete");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "complete";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
private double rangeValue;
private double rangeMax;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIRow.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIRow.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIRow.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIRow.java Thu Nov 3 14:48:35 2016
@@ -20,27 +20,6 @@
package org.apache.myfaces.tobago.internal.component;
import javax.faces.component.behavior.ClientBehaviorHolder;
-import java.util.Arrays;
-import java.util.Collection;
public class AbstractUIRow extends AbstractUIColumnBase implements ClientBehaviorHolder {
-
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("click", "dblclick");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "click";
- }
-
-
-
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBooleanCheckbox.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBooleanCheckbox.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBooleanCheckbox.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectBooleanCheckbox.java Thu Nov 3 14:48:35 2016
@@ -30,27 +30,10 @@ import javax.faces.application.FacesMess
import javax.faces.component.UISelectBoolean;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUISelectBooleanCheckbox extends UISelectBoolean
implements Visual, ClientBehaviorHolder, SupportFieldId, SupportsAccessKey, SupportsLabelLayout {
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("change");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "change";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
@Override
public boolean isSelected() {
Object value = getSubmittedValue();
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectManyBase.java Thu Nov 3 14:48:35 2016
@@ -25,27 +25,11 @@ import org.apache.myfaces.tobago.compone
import javax.faces.component.UISelectMany;
import javax.faces.component.behavior.ClientBehaviorHolder;
-import java.util.Arrays;
import java.util.Collection;
public abstract class AbstractUISelectManyBase extends UISelectMany
implements Visual, SupportsLabelLayout, ClientBehaviorHolder {
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("change");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "change";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
@Override
public Object[] getSelectedValues() {
final Object value = getValue();
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectOneBase.java Thu Nov 3 14:48:35 2016
@@ -27,29 +27,12 @@ import javax.faces.application.FacesMess
import javax.faces.component.UIInput;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUISelectOneBase extends javax.faces.component.UISelectOne
implements Visual, SupportsLabelLayout, ClientBehaviorHolder {
public static final String MESSAGE_VALUE_REQUIRED = "tobago.SelectOne.MESSAGE_VALUE_REQUIRED";
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("change");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "change";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
@Override
public void validate(final FacesContext facesContext) {
if (isRequired() && !isReadonly()) {
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheet.java Thu Nov 3 14:48:35 2016
@@ -58,7 +58,6 @@ import javax.faces.event.PhaseId;
import javax.faces.event.PreRenderComponentEvent;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -73,9 +72,6 @@ public abstract class AbstractUISheet ex
public static final String SORTER_ID = "sorter";
- // todo generate
- private static final Collection<String> EVENT_NAMES = Collections.singletonList("reload");
-
private SheetState state;
private transient LayoutTokens columnLayout;
private transient boolean autoLayout;
@@ -578,14 +574,4 @@ public abstract class AbstractUISheet ex
public void setHeaderGrid(final Grid headerGrid) {
this.headerGrid = headerGrid;
}
-
- @Override
- public String getDefaultEventName() {
- return "reload";
- }
-
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISuggest.java Thu Nov 3 14:48:35 2016
@@ -28,8 +28,6 @@ import javax.el.ValueExpression;
import javax.faces.component.UIComponentBase;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUISuggest
extends UIComponentBase implements InputSuggest2, ClientBehaviorHolder {
@@ -39,23 +37,8 @@ public abstract class AbstractUISuggest
public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Suggest";
public static final String COMPONENT_FAMILY = "org.apache.myfaces.tobago.Suggest";
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("suggest");
-
private transient String query;
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "suggest";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
@Override
public String getFamily() {
return COMPONENT_FAMILY;
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITabGroup.java Thu Nov 3 14:48:35 2016
@@ -19,7 +19,6 @@
package org.apache.myfaces.tobago.internal.component;
-import org.apache.myfaces.tobago.util.FacesELUtils;
import org.apache.myfaces.tobago.component.Attributes;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.UITab;
@@ -29,6 +28,7 @@ import org.apache.myfaces.tobago.event.T
import org.apache.myfaces.tobago.event.TabChangeSource2;
import org.apache.myfaces.tobago.model.SwitchType;
import org.apache.myfaces.tobago.util.ComponentUtils;
+import org.apache.myfaces.tobago.util.FacesELUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,8 +44,6 @@ import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
import java.util.List;
public abstract class AbstractUITabGroup extends AbstractUIPanelBase
@@ -53,8 +51,6 @@ public abstract class AbstractUITabGroup
private static final Logger LOG = LoggerFactory.getLogger(AbstractUITabGroup.class);
- // todo generate
- private static final Collection<String> EVENT_NAMES = Collections.singletonList("reload");
@Override
public void encodeChildren(final FacesContext facesContext) throws IOException {
}
@@ -291,14 +287,4 @@ public abstract class AbstractUITabGroup
public void removeActionListener(final ActionListener listener) {
removeFacesListener(listener);
}
-
- @Override
- public String getDefaultEventName() {
- return "reload";
- }
-
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITreeSelect.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITreeSelect.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITreeSelect.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUITreeSelect.java Thu Nov 3 14:48:35 2016
@@ -26,26 +26,9 @@ import javax.el.ValueExpression;
import javax.faces.component.UISelectBoolean;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
-import java.util.Arrays;
-import java.util.Collection;
public abstract class AbstractUITreeSelect extends UISelectBoolean implements Visual, ClientBehaviorHolder {
- // todo generate
- private static final Collection<String> EVENT_NAMES = Arrays.asList("change");
-
- // todo generate
- @Override
- public String getDefaultEventName() {
- return "change";
- }
-
- // todo generate
- @Override
- public Collection<String> getEventNames() {
- return EVENT_NAMES;
- }
-
@Override
public void updateModel(final FacesContext context) {
super.updateModel(context);
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ButtonTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
@@ -61,8 +63,18 @@ import javax.faces.component.UICommand;
rendererType = RendererTypes.BUTTON,
allowedChildComponenents = "NONE",
facets = {
- @Facet(name = Facets.CONFIRMATION, description = "Contains a UIOutput instance with the confirmation message.",
+ @Facet(
+ name = Facets.CONFIRMATION,
+ description = "Contains a UIOutput instance with the confirmation message.",
allowedChildComponenents = "org.apache.myfaces.tobago.Out")
+ },
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CLICK,
+ description = "Behavior of a click event.",
+ isDefault = true),
+ @Behavior(
+ name = ClientBehaviors.DBLCLICK)
})
public interface ButtonTagDeclaration
extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/CommandTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,9 +19,11 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
@@ -48,7 +50,10 @@ import javax.faces.component.UICommand;
* Use this tag only as a facet for the client events "click", "change"
* in selectOneRadio, selectBooleanCheckbox, selectManyCheckbox, selectOneChoice, etc.
* TODO: may add some events and components. See {@link org.apache.myfaces.tobago.component.Facets#isEvent(String)}
+ *
+ * @deprecated Functionality will be moved to tc:event!
*/
+@Deprecated
@Tag(name = "command")
@UIComponentTag(uiComponent = "org.apache.myfaces.tobago.component.UICommand",
uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUICommand",
@@ -60,7 +65,15 @@ import javax.faces.component.UICommand;
@Facet(
name = Facets.CONFIRMATION,
description = "Contains a UIOutput instance with the confirmation message.",
- allowedChildComponenents = "org.apache.myfaces.tobago.Out")})
+ allowedChildComponenents = "org.apache.myfaces.tobago.Out")},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CLICK,
+ description = "Behavior of a click event.",
+ isDefault = true),
+ @Behavior(
+ name = ClientBehaviors.DBLCLICK)
+ })
public interface CommandTagDeclaration
extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
HasLink, IsTransition, HasTarget, IsDisabledBySecurity,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DateTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DateTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DateTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/DateTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,9 +19,11 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
@@ -65,6 +67,11 @@ import javax.faces.component.UIInput;
@Facet(name = Facets.CHANGE,
description =
"This facet can contain a UICommand that is invoked in a case of a change event from the component")
+ },
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
})
public interface DateTagDeclaration
extends HasAccessKey, HasValidator, HasValue, HasValueChangeListener, HasTabIndex, IsFocus, IsVisual,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/FileTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,11 +19,13 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverterMessage;
@@ -60,7 +62,12 @@ import javax.faces.component.UIInput;
uiComponentFacesClass = "javax.faces.component.UIInput",
componentFamily = UIInput.COMPONENT_FAMILY,
rendererType = RendererTypes.FILE,
- allowedChildComponenents = "NONE")
+ allowedChildComponenents = "NONE",
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface FileTagDeclaration
extends HasValidator, HasValidatorMessage, HasRequiredMessage, HasConverterMessage,
HasValueChangeListener, HasIdBindingAndRendered, IsDisabled, IsFocus, IsMultiple,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/InTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/InTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/InTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/InTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
@@ -73,7 +75,12 @@ import javax.faces.component.UIInput;
@Facet(name = Facets.AFTER,
description =
"This facet can contain a part for input groups.")
- })
+ },
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface InTagDeclaration
extends HasIdBindingAndRendered, HasConverter, IsReadonly, IsDisabled, IsRequired, HasTip, IsPassword,
HasAccessKey, HasValidator, HasValue, HasValueChangeListener, HasTabIndex, IsFocus, IsVisual,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/LinkTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
@@ -61,7 +63,15 @@ import javax.faces.component.UICommand;
@Facet(
name = Facets.CONFIRMATION,
description = "Contains a UIOutput instance with the confirmation message.",
- allowedChildComponenents = "org.apache.myfaces.tobago.Out")})
+ allowedChildComponenents = "org.apache.myfaces.tobago.Out")},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CLICK,
+ description = "Behavior of a click event.",
+ isDefault = true),
+ @Behavior(
+ name = ClientBehaviors.DBLCLICK)
+ })
public interface LinkTagDeclaration
extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
HasLink, IsTransition, HasTarget, IsDisabledBySecurity,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PageTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,11 +19,13 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.Facet;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
@@ -55,7 +57,16 @@ import javax.faces.component.UIForm;
+ "menu bar on the top of the page.",
allowedChildComponenents = "javax.faces.component.UIPanel"), //fake
@Facet(name=Facets.LAYOUT, description = "Deprecated! Contains an layout manager. "
- + "The layout manager tag should surround the content instead.")})
+ + "The layout manager tag should surround the content instead.")},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CLICK,
+ isDefault = true),
+ @Behavior(
+ name = ClientBehaviors.LOAD),
+ @Behavior(
+ name = ClientBehaviors.RESIZE)
+ })
public interface PageTagDeclaration
extends HasLabel, HasId, HasBinding, IsVisual {
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PanelTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PanelTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PanelTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/PanelTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,9 +19,11 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasCollapsedMode;
@@ -48,7 +50,16 @@ import javax.faces.component.UIPanel;
@Facet(name = Facets.RELOAD, description = "Contains an instance of UIReload",
allowedChildComponenents = "org.apache.myfaces.tobago.Reload"),
@Facet(name = Facets.LAYOUT, description = "Deprecated. Contains an layout manager. "
- + "The layout manager tag should surround the content instead.")})
+ + "The layout manager tag should surround the content instead.")},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CLICK,
+ isDefault = true),
+ @Behavior(
+ name = ClientBehaviors.MOUSEOVER),
+ @Behavior(
+ name = ClientBehaviors.MOUSEOUT)
+ })
public interface PanelTagDeclaration
extends HasIdBindingAndRendered, IsVisual, IsCollapsible, HasCollapsedMode, HasTip {
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ProgressTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ProgressTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ProgressTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ProgressTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,12 +19,14 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
import org.apache.myfaces.tobago.apt.annotation.Facet;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
@@ -45,11 +47,17 @@ import javax.faces.component.UIOutput;
rendererType = RendererTypes.PROGRESS,
allowedChildComponenents = "NONE",
facets = {@Facet(
- name= Facets.COMPLETE,
+ name = Facets.COMPLETE,
description =
"Contains an instance of UICommand (tc:command). The action is invoked if the full progress has reached",
- allowedChildComponenents = "org.apache.myfaces.tobago.Command")})
-
+ allowedChildComponenents = "org.apache.myfaces.tobago.Command")},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.COMPLETE,
+ isDefault = true)
+ }
+)
+
public interface ProgressTagDeclaration extends HasIdBindingAndRendered, HasTip, IsVisual {
/**
@@ -57,7 +65,7 @@ public interface ProgressTagDeclaration
*/
@TagAttribute
@UIComponentTagAttribute(
- type = { "javax.swing.BoundedRangeModel", "java.lang.Double" },
+ type = {"javax.swing.BoundedRangeModel", "java.lang.Double"},
expression = DynamicExpression.VALUE_EXPRESSION_REQUIRED)
void setValue(String value);
@@ -66,6 +74,6 @@ public interface ProgressTagDeclaration
*/
@TagAttribute
@UIComponentTagAttribute(
- type = { "java.lang.Double" })
+ type = {"java.lang.Double"})
void setMax(String max);
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,8 +19,10 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
/**
@@ -31,6 +33,14 @@ import org.apache.myfaces.tobago.interna
@UIComponentTag(
uiComponent = "org.apache.myfaces.tobago.component.UIRow",
uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIRow",
- uiComponentFacesClass = "javax.faces.component.UIColumn")
+ uiComponentFacesClass = "javax.faces.component.UIColumn",
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CLICK,
+ description = "Behavior of a click event.",
+ isDefault = true),
+ @Behavior(
+ name = ClientBehaviors.DBLCLICK)
+ })
public interface RowTagDeclaration extends HasIdBindingAndRendered {
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectBooleanCheckboxTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
@@ -68,6 +70,11 @@ import javax.faces.component.UISelectBoo
description =
"This facet can contain a UICommand that is invoked in case of a change event from the component",
allowedChildComponenents = "org.apache.myfaces.tobago.Command")
+ },
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
})
public interface SelectBooleanCheckboxTagDeclaration extends HasValidator,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyCheckboxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyCheckboxTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyCheckboxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyCheckboxTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,11 +19,13 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
@@ -61,7 +63,12 @@ import javax.faces.component.UISelectMan
rendererType = RendererTypes.SELECT_MANY_CHECKBOX,
allowedChildComponenents = {
"javax.faces.SelectItem",
- "javax.faces.SelectItems"})
+ "javax.faces.SelectItems"},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface SelectManyCheckboxTagDeclaration extends
IsDisabled, HasId, HasTip, IsInline, HasRenderRange, IsRendered, IsRequiredForSelect,
HasBinding, IsReadonly, HasConverter, HasLabelLayout,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListboxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListboxTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListboxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyListboxTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
@@ -56,7 +58,12 @@ import javax.faces.component.UISelectMan
uiComponentFacesClass = "javax.faces.component.UISelectMany",
componentFamily = UISelectMany.COMPONENT_FAMILY,
rendererType = RendererTypes.SELECT_MANY_LISTBOX,
- allowedChildComponenents = {"javax.faces.SelectItem", "javax.faces.SelectItems"})
+ allowedChildComponenents = {"javax.faces.SelectItem", "javax.faces.SelectItems"},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface SelectManyListboxTagDeclaration
extends HasId, IsDisabled, IsRendered, HasBinding, HasTip,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyShuttleTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyShuttleTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyShuttleTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyShuttleTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,11 +19,13 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
@@ -57,7 +59,12 @@ import javax.faces.component.UISelectMan
rendererType = RendererTypes.SELECT_MANY_SHUTTLE,
allowedChildComponenents = {
"javax.faces.SelectItem",
- "javax.faces.SelectItems"})
+ "javax.faces.SelectItems"},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface SelectManyShuttleTagDeclaration extends
IsDisabled, HasId, HasTip, IsRendered, IsRequiredForSelect, HasBinding, IsReadonly, HasConverter,
HasLabel, HasValidator, HasValueChangeListener, HasLabelLayout,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,12 +19,14 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
@@ -72,7 +74,12 @@ import javax.faces.component.UISelectOne
description =
"This facet can contain a UICommand that is invoked in case of a change event from the component",
allowedChildComponenents = "org.apache.myfaces.tobago.Command")
- })
+ },
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface SelectOneChoiceTagDeclaration
extends HasValidator, HasValue, HasValueChangeListener, HasTabIndex, IsFocus, IsVisual,
HasValidatorMessage, HasConverterMessage, HasRequiredMessage, HasId, IsDisabled, IsReadonly, HasLabel,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneListboxTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,12 +19,14 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
@@ -73,7 +75,12 @@ import javax.faces.component.UISelectOne
description =
"This facet can contain a UICommand that is invoked in case of a change event from the component",
allowedChildComponenents = "org.apache.myfaces.tobago.Command")
- })
+ },
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface SelectOneListboxTagDeclaration
extends HasValidator, HasValue, HasValueChangeListener, HasTabIndex, IsFocus, IsVisual,
HasValidatorMessage, HasConverterMessage, HasRequiredMessage, HasId, IsDisabled, IsReadonly, HasLabel, IsRendered,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneRadioTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,12 +19,14 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasBinding;
@@ -74,7 +76,12 @@ import javax.faces.component.UISelectOne
description =
"This facet can contain a UICommand that is invoked in case of a change event from the component",
allowedChildComponenents = "org.apache.myfaces.tobago.Command")
- })
+ },
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface SelectOneRadioTagDeclaration
extends HasValidator, HasValue, HasValueChangeListener, HasTabIndex, IsFocus, IsVisual,
HasValidatorMessage, HasConverterMessage, HasRequiredMessage, IsDisabled, IsReadonly, HasId, HasTip, IsInline,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,6 +19,7 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
import org.apache.myfaces.tobago.apt.annotation.Facet;
@@ -26,6 +27,7 @@ import org.apache.myfaces.tobago.apt.ann
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
@@ -53,9 +55,17 @@ import javax.faces.component.UIData;
allowedChildComponenents = {
"javax.faces.Column",
"org.apache.myfaces.tobago.ColumnSelector"},
- facets = {@Facet(name = Facets.RELOAD, description = "Contains an instance of UIReload",
- allowedChildComponenents = "org.apache.myfaces.tobago.Reload")})
-public interface SheetTagDeclaration
+ facets = {
+ @Facet(
+ name = Facets.RELOAD,
+ description = "Contains an instance of UIReload",
+ allowedChildComponenents = "org.apache.myfaces.tobago.Reload")},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.RELOAD,
+ isDefault = true)
+ })
+public interface SheetTagDeclaration
extends HasIdBindingAndRendered, IsVisual, IsShowRoot, IsShowRootJunction, HasVar {
/**
* LayoutConstraints for column layout.
@@ -197,8 +207,8 @@ public interface SheetTagDeclaration
/**
* Method binding representing a stateChangeListener method that will be
* notified when the state was changed by the user.
- * The expression must evaluate to a public method that takes a
- * SheetStateChangeEvent parameter, with a return type of void.
+ * The expression must evaluate to a public method that takes a
+ * SheetStateChangeEvent parameter, with a return type of void.
*/
@TagAttribute
@UIComponentTagAttribute(type = {},
@@ -226,20 +236,22 @@ public interface SheetTagDeclaration
void setSortActionListener(String sortActionListener);
- /**
- * Flag indicating if paging arrows are shown near direct links
- * @since 2.0.0
- */
- @TagAttribute
- @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
- void setShowDirectLinksArrows(String showDirectLinksArrows);
-
- /**
- * Flag indicating if paging arrows are shown near page range
- * @since 2.0.0
- */
- @TagAttribute
- @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
- void setShowPageRangeArrows(String showPageRangeArrows);
+ /**
+ * Flag indicating if paging arrows are shown near direct links
+ *
+ * @since 2.0.0
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
+ void setShowDirectLinksArrows(String showDirectLinksArrows);
+
+ /**
+ * Flag indicating if paging arrows are shown near page range
+ *
+ * @since 2.0.0
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
+ void setShowPageRangeArrows(String showPageRangeArrows);
}
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SuggestTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -54,7 +54,12 @@ import javax.faces.component.UIInput;
allowedChildComponenents = {
"org.apache.myfaces.tobago.SelectItems",
"org.apache.myfaces.tobago.SelectItem"
- })
+ }/* todo ,
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.SUGGEST,
+ isDefault = true)
+ }*/)
public interface SuggestTagDeclaration extends HasIdBindingAndRendered {
/**
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabGroupTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabGroupTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabGroupTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TabGroupTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,12 +19,14 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAction;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasActionListener;
@@ -48,8 +50,12 @@ import javax.faces.component.UIPanel;
componentFamily = UIPanel.COMPONENT_FAMILY,
rendererType = RendererTypes.TAB_GROUP,
interfaces = "javax.faces.component.ActionSource2",
- allowedChildComponenents = "org.apache.myfaces.tobago.Tab")
-
+ allowedChildComponenents = "org.apache.myfaces.tobago.Tab",
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.RELOAD,
+ isDefault = true)
+ })
public interface TabGroupTagDeclaration
extends HasIdBindingAndRendered, IsImmediateCommand, HasAction, HasActionListener, IsVisual, HasTip {
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TextareaTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TextareaTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TextareaTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TextareaTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
@@ -56,7 +58,12 @@ import javax.faces.component.UIInput;
uiComponentFacesClass = "javax.faces.component.UIInput",
componentFamily = UIInput.COMPONENT_FAMILY,
rendererType = RendererTypes.TEXTAREA,
- allowedChildComponenents = "NONE")
+ allowedChildComponenents = "NONE",
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface TextareaTagDeclaration
extends HasIdBindingAndRendered, HasConverter, IsReadonly, IsDisabled, IsRequired, HasLabel, HasLabelLayout, HasTip,
HasAccessKey, HasValidator, HasValue, HasValueChangeListener, HasTabIndex, IsFocus, IsVisual,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeCommandTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.BodyContentDescription;
import org.apache.myfaces.tobago.apt.annotation.Facet;
import org.apache.myfaces.tobago.apt.annotation.Tag;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.Facets;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasAccessKey;
@@ -62,6 +64,14 @@ import javax.faces.component.UICommand;
name = Facets.CONFIRMATION,
description = "Contains a UIOutput instance with the confirmation message.",
allowedChildComponenents = "org.apache.myfaces.tobago.Out")},
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CLICK,
+ description = "Behavior of a click event.",
+ isDefault = true),
+ @Behavior(
+ name = ClientBehaviors.DBLCLICK)
+ },
rendererType = RendererTypes.TREE_COMMAND)
public interface TreeCommandTagDeclaration
extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/TreeSelectTagDeclaration.java Thu Nov 3 14:48:35 2016
@@ -19,10 +19,12 @@
package org.apache.myfaces.tobago.internal.taglib.component;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
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.component.ClientBehaviors;
import org.apache.myfaces.tobago.component.RendererTypes;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverter;
import org.apache.myfaces.tobago.internal.taglib.declaration.HasConverterMessage;
@@ -49,11 +51,16 @@ import javax.faces.component.UISelectBoo
uiComponentFacesClass = "javax.faces.component.UISelectBoolean",
componentFamily = UISelectBoolean.COMPONENT_FAMILY,
rendererType = RendererTypes.TREE_SELECT,
- allowedChildComponenents = "NONE")
+ allowedChildComponenents = "NONE",
+ behaviors = {
+ @Behavior(
+ name = ClientBehaviors.CHANGE,
+ isDefault = true)
+ })
public interface TreeSelectTagDeclaration
extends HasIdBindingAndRendered, HasLabel, HasTip, IsVisual, HasValue, HasValueChangeListener,
- IsDisabled, IsRequiredForSelect, HasConverter,
- HasValidatorMessage, HasRequiredMessageForSelect, HasConverterMessage {
+ IsDisabled, IsRequiredForSelect, HasConverter,
+ HasValidatorMessage, HasRequiredMessageForSelect, HasConverterMessage {
/**
* Show a checkbox to visualize the selection state.
Modified: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/MethodOverwritingOfGeneratedUIComponentsUnitTest.java Thu Nov 3 14:48:35 2016
@@ -37,7 +37,8 @@ import java.util.List;
public class MethodOverwritingOfGeneratedUIComponentsUnitTest {
- private static final List<String> IGNORED_METHODS = Arrays.asList("getFamily", "saveState", "restoreState");
+ private static final List<String> IGNORED_METHODS
+ = Arrays.asList("getFamily", "saveState", "restoreState", "getEventNames", "getDefaultEventName");
private static final List<String> IGNORED_COMPONENTS = Arrays.asList(
UIMenuSelectOne.class.getSimpleName());
private static final MethodOfComponentList IGNORED_METHODS_PER_COMPONENT = new MethodOfComponentList();
Copied: myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Behavior.java (from r1767843, myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Facet.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Behavior.java?p2=myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Behavior.java&p1=myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Facet.java&r1=1767843&r2=1767896&rev=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Facet.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/Behavior.java Thu Nov 3 14:48:35 2016
@@ -19,26 +19,15 @@
package org.apache.myfaces.tobago.apt.annotation;
+import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
@Retention(value = RetentionPolicy.SOURCE)
@Target(value = ElementType.TYPE)
-public @interface Facet {
+public @interface Behavior {
String name();
String description() default "";
-
- /**
- * Array of supported component-types that explictly enumerates the
- * set of allowd component children for this component. Other possible values are: ALL...
- */
- String [] allowedChildComponenents() default { "ALL" };
-
- /**
- * Specifies whether this component should be available on a component palette.
- */
- boolean isHidden() default false;
-
+ boolean isDefault() default false;
}
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTag.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTag.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-annotation/src/main/java/org/apache/myfaces/tobago/apt/annotation/UIComponentTag.java Thu Nov 3 14:48:35 2016
@@ -49,6 +49,8 @@ public @interface UIComponentTag {
Facet[] facets() default {};
+ Behavior[] behaviors() default {};
+
boolean generate() default true;
boolean isComponentAlreadyDefined() default false;
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/ComponentInfo.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/ComponentInfo.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/ComponentInfo.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/generate/ComponentInfo.java Thu Nov 3 14:48:35 2016
@@ -34,6 +34,8 @@ public class ComponentInfo extends TagIn
private boolean deprecated;
private int index = 0;
private int nonTransientIndex = 0;
+ private List<String> behaviors = new ArrayList<String>();
+ private String defaultBehavior;
public ComponentInfo(final TypeElement declaration, final UIComponentTag componentTag) {
super(declaration.getQualifiedName().toString(), componentTag.uiComponent(), componentTag.rendererType());
@@ -110,4 +112,16 @@ public class ComponentInfo extends TagIn
public boolean isDeprecated() {
return deprecated;
}
+
+ public List<String> getBehaviors() {
+ return behaviors;
+ }
+
+ public String getDefaultBehavior() {
+ return defaultBehavior;
+ }
+
+ public void setDefaultBehavior(String defaultBehavior) {
+ this.defaultBehavior = defaultBehavior;
+ }
}
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java (original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/ClassesGenerator.java Thu Nov 3 14:48:35 2016
@@ -22,6 +22,7 @@ package org.apache.myfaces.tobago.apt.pr
import org.antlr.stringtemplate.StringTemplate;
import org.antlr.stringtemplate.StringTemplateGroup;
import org.apache.commons.io.IOUtils;
+import org.apache.myfaces.tobago.apt.annotation.Behavior;
import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
@@ -119,6 +120,26 @@ public class ClassesGenerator extends Ab
componentInfo.addInterface(interfaces);
}
+ if (componentTag.behaviors().length > 0) {
+ for (Behavior behavior : componentTag.behaviors()) {
+ info("*************** ----------------------" + componentTag.behaviors().length);
+ info("*************** " + behavior.name());
+ info("*************** " + componentInfo.getBehaviors());
+ componentInfo.getBehaviors().add(behavior.name());
+ if (behavior.isDefault()) {
+ if (componentInfo.getDefaultBehavior() != null) {
+ throw new RuntimeException("defaultBehavior '" + componentInfo.getDefaultBehavior()
+ + "' will be overwritten with '" + behavior.name()
+ + "' in component '" + componentInfo.getSourceClass() + "'");
+ }
+ componentInfo.setDefaultBehavior(behavior.name());
+ }
+ }
+ if (componentInfo.getDefaultBehavior() == null) {
+ throw new RuntimeException("defaultBehavior not set in component '" + componentInfo.getSourceClass() + "'");
+ }
+ }
+
final Class<? extends UIComponent> facesClass
= Class.forName(componentTag.uiComponentFacesClass()).asSubclass(UIComponent.class);