Re: JavaScript method for context encoding

2014-04-14 Thread Thiago H de Paula Figueiredo
On Sun, 13 Apr 2014 06:10:58 -0300, Ilya Obshadko wrote: But there is another problem (which I'm trying to handle right now): how do we manage a dynamic form where controls visibility depends on contents or state of one or more other controls? I believe we need something similar to Trigg

Re: JavaScript method for context encoding

2014-04-13 Thread Ilya Obshadko
I have a mixin that is very similar to yours. It's called ReloadZone, accepts pretty much the same set of parameters - zone, client-side event and context, and fires 'reloadzone' server-side event which actually updates related zone. But there is another problem (which I'm trying to handle right n

Re: JavaScript method for context encoding

2014-04-12 Thread Lance Java
You must use a request parameter to send clientside values serverside. Checkout the onevent mixin here http://tapestry-stitch.uklance.cloudbees.net/oneventdemo It uses the second technique you mentioned. This mixin uses prototype's "observe" but could be tweaked to use jquery's "on".

Re: JavaScript method for context encoding

2014-04-12 Thread Ilya Obshadko
There is actually another solution (again, exactly like Select component does): handle internal (private) event using @RequestParameter annotation and trigger an external (public) event with server-side encoded context. It works, but that's an extra step. On Sun, Apr 13, 2014 at 4:13 PM, Ilya Ob

JavaScript method for context encoding

2014-04-12 Thread Ilya Obshadko
I'm working on a mixin which allows selection handling in jQuery AutoComplete (analogous to zone update on changing value in Select component). I need to pass selected value to an event handler via event context. However, I cannot find any JS method to encode selected value using Tapestry conventio