You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2014/07/01 00:04:31 UTC
[1/2] git commit: TAP5-2292 : Autocomplete Mixin shows only 5
suggestions
Repository: tapestry-5
Updated Branches:
refs/heads/master 7a2f98c8e -> 3b8fe942b
TAP5-2292 : Autocomplete Mixin shows only 5 suggestions
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b35cd7e3
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b35cd7e3
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b35cd7e3
Branch: refs/heads/master
Commit: b35cd7e3e5e0939e841189efe5c40d64f4d6186e
Parents: d9a795f
Author: Thiago H. de Paula Figueiredo <th...@apache.org>
Authored: Mon Jun 30 19:03:21 2014 -0300
Committer: Thiago H. de Paula Figueiredo <th...@apache.org>
Committed: Mon Jun 30 19:03:21 2014 -0300
----------------------------------------------------------------------
.../META-INF/modules/t5/core/autocomplete.coffee | 1 +
.../org/apache/tapestry5/corelib/mixins/Autocomplete.java | 8 +++++++-
tapestry-core/src/test/app1/AutocompleteDemo.tml | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b35cd7e3/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee
index 7dbb2da..1a33e94 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/autocomplete.coffee
@@ -23,6 +23,7 @@ define ["./dom", "./ajax", "jquery", "./utils", "./typeahead"],
$field.typeahead
minLength: spec.minChars
+ limit: spec.limit
remote:
url: spec.url
replace: (uri, query) -> extendURL uri, "t:input": query
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b35cd7e3/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java
index 7fce141..074ce88 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java
@@ -91,6 +91,12 @@ public class Autocomplete
private String tokens;
/**
+ * Maximum number of suggestions shown in the UI. It maps to Typeahead's "limit" option. Default value: 5.
+ */
+ @Parameter("5")
+ private int maxSuggestions;
+
+ /**
* The context for the "providecompletions" event.
* This list of values will be converted into strings and included in
* the URI. The strings will be coerced back to whatever their values are and made available to event handler
@@ -122,7 +128,7 @@ public class Autocomplete
Link link = resources.createEventLink(EVENT_NAME, context);
JSONObject spec = new JSONObject("id", field.getClientId(),
- "url", link.toString()).put("minChars", minChars);
+ "url", link.toString()).put("minChars", minChars).put("limit", maxSuggestions);
jsSupport.require("t5/core/autocomplete").with(spec);
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b35cd7e3/tapestry-core/src/test/app1/AutocompleteDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/app1/AutocompleteDemo.tml b/tapestry-core/src/test/app1/AutocompleteDemo.tml
index 918ed85..b74074f 100644
--- a/tapestry-core/src/test/app1/AutocompleteDemo.tml
+++ b/tapestry-core/src/test/app1/AutocompleteDemo.tml
@@ -5,7 +5,7 @@
<t:errors/>
- <t:textfield t:id="title" t:mixins="autocomplete,formgroup" tokens=",;" size="60"/>
+ <t:textfield t:id="title" t:mixins="autocomplete,formgroup" tokens=",;" maxSuggestions="10" size="60"/>
<t:textfield t:id="withContext" t:mixins="autocomplete,formgroup" context="context"/>
<div class="form-actions">
[2/2] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/tapestry-5
Posted by th...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tapestry-5
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3b8fe942
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3b8fe942
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3b8fe942
Branch: refs/heads/master
Commit: 3b8fe942b1ce903e7084aa24cb8eb5ac5db2fbc9
Parents: b35cd7e 7a2f98c
Author: Thiago H. de Paula Figueiredo <th...@apache.org>
Authored: Mon Jun 30 19:04:09 2014 -0300
Committer: Thiago H. de Paula Figueiredo <th...@apache.org>
Committed: Mon Jun 30 19:04:09 2014 -0300
----------------------------------------------------------------------
.../annotations/ActivationRequestParameter.java | 12 ++++++++----
.../transform/ActivationRequestParameterWorker.java | 16 ++++++++++++----
.../app1/ActivationRequestParameterTests.groovy | 11 +++++++++--
.../tapestry5/integration/app1/pages/Index.java | 2 ++
.../integration/app1/pages/MissingRequiredARP.java | 9 +++++++++
5 files changed, 40 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
[2/2] git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/tapestry-5
Posted by th...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tapestry-5
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3b8fe942
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3b8fe942
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3b8fe942
Branch: refs/heads/master
Commit: 3b8fe942b1ce903e7084aa24cb8eb5ac5db2fbc9
Parents: b35cd7e 7a2f98c
Author: Thiago H. de Paula Figueiredo <th...@apache.org>
Authored: Mon Jun 30 19:04:09 2014 -0300
Committer: Thiago H. de Paula Figueiredo <th...@apache.org>
Committed: Mon Jun 30 19:04:09 2014 -0300
----------------------------------------------------------------------
.../annotations/ActivationRequestParameter.java | 12 ++++++++----
.../transform/ActivationRequestParameterWorker.java | 16 ++++++++++++----
.../app1/ActivationRequestParameterTests.groovy | 11 +++++++++--
.../tapestry5/integration/app1/pages/Index.java | 2 ++
.../integration/app1/pages/MissingRequiredARP.java | 9 +++++++++
5 files changed, 40 insertions(+), 10 deletions(-)
----------------------------------------------------------------------