You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2019/12/02 09:29:47 UTC

[myfaces-tobago] 10/19: attribute documentation

This is an automated email from the ASF dual-hosted git repository.

weber pushed a commit to branch TOBAGO-1999_Select2
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit bdd5e861c6a5fc6ef1bda1e30eea831ab6d25823
Author: Volker Weber <v....@inexso.de>
AuthorDate: Mon Aug 26 15:04:51 2019 +0200

    attribute documentation
---
 .../component/SelectManyBoxTagDeclaration.java       |  6 ++++--
 .../component/SelectOneChoiceTagDeclaration.java     | 18 ++++++++++++++++--
 .../tobago/internal/taglib/declaration/Select2.java  | 19 +++++++++++++------
 .../internal/taglib/declaration/Select2One.java      | 20 --------------------
 4 files changed, 33 insertions(+), 30 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyBoxTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyBoxTagDeclaration.java
index 21dc0c6..bea3ff0 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyBoxTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectManyBoxTagDeclaration.java
@@ -77,14 +77,16 @@ public interface SelectManyBoxTagDeclaration
 
 
   /**
-   * Flag indicating that this select
+   * A javascript callback that handles automatic tokenization of free-text entry.
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "string", generate = false)
   void setTokenizer(String tokenizer);
 
   /**
-   * Flag indicating that this select
+   * The list of characters that should be used as token separators.
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "string", generate = false)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java
index 0b9f90a..3748acd 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SelectOneChoiceTagDeclaration.java
@@ -35,7 +35,6 @@ import org.apache.myfaces.tobago.internal.taglib.declaration.HasTip;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabled;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsReadonly;
 import org.apache.myfaces.tobago.internal.taglib.declaration.IsRendered;
-import org.apache.myfaces.tobago.internal.taglib.declaration.Select2One;
 import org.apache.myfaces.tobago.internal.taglib.declaration.Select2;
 
 import javax.faces.component.UISelectOne;
@@ -67,7 +66,7 @@ import javax.faces.component.UISelectOne;
         })
 public interface SelectOneChoiceTagDeclaration
     extends SelectOneTagDeclaration, HasId, IsDisabled,
-            IsReadonly, HasLabel, IsRendered, HasConverter, HasBinding, HasTip, Select2One, Select2 {
+            IsReadonly, HasLabel, IsRendered, HasConverter, HasBinding, HasTip, Select2 {
 
   /**
    * Flag indicating that selecting an Item representing a value is required.
@@ -77,4 +76,19 @@ public interface SelectOneChoiceTagDeclaration
   @TagAttribute()
   @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
   void setRequired(String required);
+
+  /**
+   * Flag indicating that this element is rendered as select2.
+   */
+  @TagAttribute()
+  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
+  void setSelect2(String disabled);
+
+  /**
+   * The minimum number of results required to display the search box.
+   * This is a select2 feature and will force select2=true
+   */
+  @TagAttribute()
+  @UIComponentTagAttribute(type = "int", defaultValue = "20", generate = false)
+  void setMinimumResultsForSearch(String disabled);
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java
index fc53679..c27512c 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2.java
@@ -6,42 +6,49 @@ import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 public interface Select2 {
 
   /**
-   * Flag indicating that this select
+   * Flag indicating that this select provides support for clearable selections.
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "boolean", defaultValue = "false", generate = false)
   void setAllowClear(String allowed);
 
   /**
-   * Flag indicating that this select accepts values which are not in option list.
+   * Flag indicating that this select enables free text responses.
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "boolean", defaultValue = "false", generate = false)
   void setAllowCustom(String allowed);
 
   /**
-   * Flag indicating that this select
+   * Javascript callback to handle custom search matching
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "string", generate = false)
   void setMatcher(String matcher);
 
   /**
-   * Flag indicating that this select
+   * Maximum number of characters that may be provided for a search term.
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "int", defaultValue = "0", generate = false)
   void setMaximumInputLength(String allowed);
 
   /**
-   * Flag indicating that this select
+   * Minimum number of characters required to start a search.
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "int", defaultValue = "0", generate = false)
   void setMinimumInputLength(String allowed);
 
   /**
-   * Flag indicating that this select
+   * The maximum number of items that may be selected in a multi-select control.
+   * If the value of this option is less than 1, the number of selected items will not be limited.
+   * This is a select2 feature and will force select2=true
    */
   @TagAttribute()
   @UIComponentTagAttribute(type = "int", defaultValue = "0", generate = false)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2One.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2One.java
deleted file mode 100644
index 569a253..0000000
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/declaration/Select2One.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.apache.myfaces.tobago.internal.taglib.declaration;
-
-import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
-import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
-
-public interface Select2One {
-  /**
-   * Flag indicating that this element is rendered as select2.
-   */
-  @TagAttribute()
-  @UIComponentTagAttribute(type = "boolean", defaultValue = "false")
-  void setSelect2(String disabled);
-
-  /**
-   * Flag indicating that this element is rendered as select2.
-   */
-  @TagAttribute()
-  @UIComponentTagAttribute(type = "int", defaultValue = "20", generate = false)
-  void setMinimumResultsForSearch(String disabled);
-}