You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alex Pasialis <ap...@hotmail.com> on 2013/08/02 08:54:53 UTC
FW: Tapestry 5.4 - Question about Autocomplete
Hi,
I have upgraded to Tapestry 5.4 and I have a problem extending the Autocomplete mixin:
in java:
void afterRender() {
javaScriptSupport_.require("bla")
.priority(InitializationPriority.LATE).with(getParameters());
}
in bla.js:
define([ "jquery"], function() {
return function(parameters) {
var field = jQuery("#" + parameters.fieldId);
field.autocomplete({
select: function(e, ui) {
//do stuff
},
change: function(e, ui) {
//do stuff
}
});
}
});
Before I was using the "Tapestry5-jQuery" library and it worked fine. But now I am getting a "RequireJS error: require: field.autocomplete is not a function".
I have tried a lot of combinations but still haven't figured it out.
Any help would be appreciated.
Thanks,
Alexis
RE: Tapestry 5.4 - Question about Autocomplete
Posted by Alex Pasialis <ap...@hotmail.com>.
Hi Serge,
Sorry, I already know how to bind a mixin to a field.
Anyone else?
Thanks
Alexis
> Date: Fri, 2 Aug 2013 07:43:50 -0700
> From: sdeby@hotmail.com
> To: users@tapestry.apache.org
> Subject: RE: Tapestry 5.4 - Question about Autocomplete
>
> See Tapestry-core integration tests here:
>
> https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/test/app1/AutocompleteDemo.tml;h=226b1f35f857a964fef80f0b6b4db97b84397b81;hb=HEAD
>
> https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/AutocompleteDemo.java;h=3f67a413837236fc8023490fbdd3e26420a13228;hb=HEAD
>
>
> /Serge
>
>
>
> --
> View this message in context: http://tapestry-users.832.n2.nabble.com/FW-Tapestry-5-4-Question-about-Autocomplete-tp7587258p7587270.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
RE: Tapestry 5.4 - Question about Autocomplete
Posted by Serge Eby <sd...@hotmail.com>.
See Tapestry-core integration tests here:
https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/test/app1/AutocompleteDemo.tml;h=226b1f35f857a964fef80f0b6b4db97b84397b81;hb=HEAD
https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/AutocompleteDemo.java;h=3f67a413837236fc8023490fbdd3e26420a13228;hb=HEAD
/Serge
--
View this message in context: http://tapestry-users.832.n2.nabble.com/FW-Tapestry-5-4-Question-about-Autocomplete-tp7587258p7587270.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
RE: Tapestry 5.4 - Question about Autocomplete
Posted by Alex Pasialis <ap...@hotmail.com>.
I am not using the tapestry-jquery library anymore. Tapestry's built-in Autocomplete is using JQuery now.
Can anyone post a simple working example please?
Thanks
Alexis
> Subject: Re: Tapestry 5.4 - Question about Autocomplete
> From: tawus.tapestry@gmail.com
> Date: Fri, 2 Aug 2013 12:49:07 +0530
> To: users@tapestry.apache.org
>
> You have to add(require) javascript containing autocomplete plugin
>
> require.config({
> shim: {
> "path/to/auto-complete": ["query"]
> }
> });
>
> That may be part of jquery.ui.js which is included by Tapestry-jQuery.
>
> BTW there is an 5.4-alpha branch in tapestry-jquery but I am not sure about its status.
>
> regards
> Taha
>
>
>
> On 02-Aug-2013, at 12:24 PM, Alex Pasialis <ap...@hotmail.com> wrote:
>
> > Hi,
> >
> > I have upgraded to Tapestry 5.4 and I have a problem extending the Autocomplete mixin:
> >
> > in java:
> > void afterRender() {
> > javaScriptSupport_.require("bla")
> > .priority(InitializationPriority.LATE).with(getParameters());
> > }
> >
> > in bla.js:
> > define([ "jquery"], function() {
> > return function(parameters) {
> > var field = jQuery("#" + parameters.fieldId);
> > field.autocomplete({
> > select: function(e, ui) {
> > //do stuff
> > },
> >
> > change: function(e, ui) {
> > //do stuff
> > }
> > });
> > }
> > });
> >
> >
> >
> > Before I was using the "Tapestry5-jQuery" library and it worked fine. But now I am getting a "RequireJS error: require: field.autocomplete is not a function".
> > I have tried a lot of combinations but still haven't figured it out.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > Alexis
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
Re: Tapestry 5.4 - Question about Autocomplete
Posted by Emmanuel DEMEY <de...@gmail.com>.
The 5.4-alpha branch of Tapestry5-jQuery is not ready yet. i worked on it a
lot few months ago, but still some modifications to do.
Manu
2013/8/2 Taha Hafeez Siddiqi <ta...@gmail.com>
> You have to add(require) javascript containing autocomplete plugin
>
> require.config({
> shim: {
> "path/to/auto-complete": ["query"]
> }
> });
>
> That may be part of jquery.ui.js which is included by Tapestry-jQuery.
>
> BTW there is an 5.4-alpha branch in tapestry-jquery but I am not sure
> about its status.
>
> regards
> Taha
>
>
>
> On 02-Aug-2013, at 12:24 PM, Alex Pasialis <ap...@hotmail.com> wrote:
>
> > Hi,
> >
> > I have upgraded to Tapestry 5.4 and I have a problem extending the
> Autocomplete mixin:
> >
> > in java:
> > void afterRender() {
> > javaScriptSupport_.require("bla")
> >
> .priority(InitializationPriority.LATE).with(getParameters());
> > }
> >
> > in bla.js:
> > define([ "jquery"], function() {
> > return function(parameters) {
> > var field = jQuery("#" + parameters.fieldId);
> > field.autocomplete({
> > select: function(e, ui) {
> > //do stuff
> > },
> >
> > change: function(e, ui) {
> > //do stuff
> > }
> > });
> > }
> > });
> >
> >
> >
> > Before I was using the "Tapestry5-jQuery" library and it worked fine.
> But now I am getting a "RequireJS error: require: field.autocomplete is not
> a function".
> > I have tried a lot of combinations but still haven't figured it out.
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > Alexis
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr/
Twitter : @EmmanuelDemey
Re: Tapestry 5.4 - Question about Autocomplete
Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
You have to add(require) javascript containing autocomplete plugin
require.config({
shim: {
"path/to/auto-complete": ["query"]
}
});
That may be part of jquery.ui.js which is included by Tapestry-jQuery.
BTW there is an 5.4-alpha branch in tapestry-jquery but I am not sure about its status.
regards
Taha
On 02-Aug-2013, at 12:24 PM, Alex Pasialis <ap...@hotmail.com> wrote:
> Hi,
>
> I have upgraded to Tapestry 5.4 and I have a problem extending the Autocomplete mixin:
>
> in java:
> void afterRender() {
> javaScriptSupport_.require("bla")
> .priority(InitializationPriority.LATE).with(getParameters());
> }
>
> in bla.js:
> define([ "jquery"], function() {
> return function(parameters) {
> var field = jQuery("#" + parameters.fieldId);
> field.autocomplete({
> select: function(e, ui) {
> //do stuff
> },
>
> change: function(e, ui) {
> //do stuff
> }
> });
> }
> });
>
>
>
> Before I was using the "Tapestry5-jQuery" library and it worked fine. But now I am getting a "RequireJS error: require: field.autocomplete is not a function".
> I have tried a lot of combinations but still haven't figured it out.
>
> Any help would be appreciated.
>
> Thanks,
> Alexis
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org