Re: observe mixin

2014-09-22 Thread Lance Java
jquery (and other js frameworks) support selecting by attributes other than the id. More info here: http://api.jquery.com/category/selectors/ I was suggesting to add an attribute to each of your select elements and then use an appropriate selector to look it up: eg; public List getFieldSelect

Re: observe mixin

2014-09-22 Thread Thiago H de Paula Figueiredo
On Mon, 22 Sep 2014 14:28:19 -0300, squallmat . wrote: About the id problem of select, in the code source of the page the id of the select is good, but here in the json request there is an id appended in suffix : 1. selectId: "selectClients_1fadb44aa044" Is that the problem of select

Re: observe mixin

2014-09-22 Thread squallmat .
I have this : 1. content: ": > What happens when you view the network traffic in the chrome developer > tools? Can you see the values as request parameters? > > Are the select element ids (in the html) what you think they are? There's > an issue where the clientId is ignored by tapestry for s

Re: observe mixin

2014-09-22 Thread Lance Java
What happens when you view the network traffic in the chrome developer tools? Can you see the values as request parameters? Are the select element ids (in the html) what you think they are? There's an issue where the clientId is ignored by tapestry for select. And tapestry adds a unique suffix to

Re: observe mixin

2014-09-22 Thread squallmat .
Do you see why observe does not work? Or another method to make working what I want to do ? I'm stuck on this. 2014-09-22 16:39 GMT+02:00 squallmat . : > Ok the javascript works now, but not the mixin itself. > I have a first select where i chose a value, and then a second select > where i chose

Re: observe mixin

2014-09-22 Thread squallmat .
Ok the javascript works now, but not the mixin itself. I have a first select where i chose a value, and then a second select where i chose another value. On change on the second select I ajax reload both in a zone and i'd like the first to keep value. In the event method I reallocate the value of

Re: observe mixin

2014-09-22 Thread squallmat .
ok I used bind function instead of observe. And even with the original values $(spec.id) without the # the code works now. First time i make a javascript working :p 2014-09-22 15:56 GMT+02:00 squallmat . : > Hi Lance, thanks for the help. Yes i really need to learn javascript, I > still have an e

Re: observe mixin

2014-09-22 Thread squallmat .
Hi Lance, thanks for the help. Yes i really need to learn javascript, I still have an error on the js you gave me : apparently the observe() function is a prototype one, i'm trying to find an equivalent in jquery but i didn't found yet. Do you know how i could convert this observe() to jquery ? 20

Re: observe mixin

2014-09-22 Thread Lance Java
Well, if you want to call yourself a web developer... it's probably about time you learnt a bit of javascript ;) The jquery version would probably look something like: T5.extendInitializers({ observe: function (spec) { $('#' + spec.id).on(spec.event, function() { var params = {}

Re: observe mixin

2014-09-22 Thread squallmat .
Could you explain me what need to be changed to make the mixin compatible with jquery ? 2014-09-22 11:39 GMT+02:00 squallmat . : > In the chrome javascript console I have : > > Uncaught TypeError: undefined is not a function > > I use jquery, because I use some components from > http://tapestry5-

Re: observe mixin

2014-09-22 Thread squallmat .
In the chrome javascript console I have : Uncaught TypeError: undefined is not a function I use jquery, because I use some components from http://tapestry5-jquery.com/ I'm really bad at javascript and I don't even understand what this error means. What i need to change to make it works with jque

Re: observe mixin

2014-09-22 Thread Lance Java
You've probably got a javascript error on the page, check the js console in your browser. Are you using prototype or jquery? The observe javascript is for prototype and will require a tweak for tapestry 5.4 / jquery.

Re: observe mixin

2014-09-22 Thread squallmat .
Hi Lance, i added observe.zone and now the page launch... but : Every dynamic behavior has stopped working : the ajaxformloop I have on my page does not work anymore, my ajaxupload too, and every zone reloading stopped working... it's like javascript is disabled. But I tested with a tag and java

Re: observe mixin

2014-09-19 Thread Lance Java
You're seeing a name clash since both select and observe accept a "zone" parameter. You can qualify the parameter name so that the mixin gets it instead of select. I think you can say observe.zone="foo" (if not it's observe/zone). On 19 Sep 2014 17:58, "squallmat ." wrote: > Hi, > > I'm trying