Re: Trying to create a custom mixin which will update zone.

2013-11-02 Thread Lance Java
Nice, I'm not too familiar with 5.4 so the data attributes + dom stuff is all new to me. NB jquery has built in support for data attributes so $field.attr("data-update-zone", spec.zone) can be written as $field.data("update-zone", spec.zone)

Re: Trying to create a custom mixin which will update zone.

2013-11-01 Thread George Christman
Lance, haven't tested it with a multifield scenario, but altered the js to work with require.js. (function() { define(["t5/core/events", "t5/core/dom", "t5/core/zone", "./jquery"], function(events, dom, zone, $) { int = function(spec) { var $field = $("#" + spec.id);

Re: Trying to create a custom mixin which will update zone.

2013-10-31 Thread George Christman
This looks great Lance, I'll give it a whirl in the am. Thanks. On Thu, Oct 31, 2013 at 5:27 PM, Lance Java wrote: > Take a look at the onEvent mixin in tapestry-stitch > http://tapestry-stitch.uklance.cloudbees.net/oneventdemo > > > > On 31 October 2013 19:44, George Christman > wrote: > > > I

Re: Trying to create a custom mixin which will update zone.

2013-10-31 Thread Lance Java
Take a look at the onEvent mixin in tapestry-stitch http://tapestry-stitch.uklance.cloudbees.net/oneventdemo On 31 October 2013 19:44, George Christman wrote: > I was semi able to get it to work using the following code, but it looks as > if the onDocument method doesn't have a blur event hand

Re: Trying to create a custom mixin which will update zone.

2013-10-31 Thread George Christman
I was semi able to get it to work using the following code, but it looks as if the onDocument method doesn't have a blur event handler? (function() { define(["t5/core/events", "t5/core/dom", "t5/core/zone", "./jquery"], function(events, dom, zone, $) { int = function(spec) {

Trying to create a custom mixin which will update zone.

2013-10-31 Thread George Christman
I'm trying to create a mixin that on blur will grab the field value and pass it to an event handler followed by a zone refresh. I continue to get a null pointer on the zone refresh, I'm not sure what I'm missing. tml. mixins @Events( {EventConstants.VALIDATE, "fieldUpdated" + " when '