You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Martin Schneider <ma...@gmail.com> on 2014/08/30 16:50:21 UTC

Trigger custom JS events and handle them on the server side

What is the best way to do this with Tapestry 5.4? The jQuery bind mixin
seems to have done this for Tapestry 5.3 (
http://tapestry5-jquery.com/mixins/docsbind).

Basically, what I'm trying to achieve is, to allow palette components to
behave like the select components in this example:
http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/selectdependency1

The selected values of the first, determine what can be selected in the
next one.

There do not seem to be any suitable events triggered when adding or
removing elements in a palette or am I missing something?

Any help is highly appreciated. Thanks in advance!

Re: Trigger custom JS events and handle them on the server side

Posted by Martin Schneider <ma...@gmail.com>.
Hi François,

Thanks! I will have a look.

Martin


On Mon, Sep 1, 2014 at 7:27 PM, françois facon <fr...@gmail.com> wrote:

> Hi Martin,
>
> please have a look at the branch 5.4.
>
> https://github.com/got5/tapestry5-jquery/commit/a979f03a1feedb40a2fd1fbeb410f197d5e7bcf2
> .
>
> Regards
> François
>

Re: Trigger custom JS events and handle them on the server side

Posted by françois facon <fr...@gmail.com>.
Hi Martin,

please have a look at the branch 5.4.
https://github.com/got5/tapestry5-jquery/commit/a979f03a1feedb40a2fd1fbeb410f197d5e7bcf2
.

Regards
François

Re: Trigger custom JS events and handle them on the server side

Posted by Martin Schneider <ma...@gmail.com>.
The got5-mixin is not supported for 5.4 and the way java script support has
changed since 5.3 I am not sure this is the right way to go. Maybe someone
can tell me, if the mixin can be modified for Tapestry 5.4:
https://github.com/got5/tapestry5-jquery/blob/5dee73c32c2d584decc76231a905d26c01c02eb3/src/main/resources/org/got5/tapestry5/jquery/assets/mixins/bind/bind.js

When I try to use the approach described in the Jumpstart example for
palettes (instead of selects), there is no exception page/stack trace. The
event handler just doesn't get called (because the Palette component
doesn't trigger these events).

It would also be interesting to know, why Tapestry doesn't support this out
of the box. Is this a c
<http://www.dict.cc/englisch-deutsch/conscious.html>onscious
decision <http://www.dict.cc/englisch-deutsch/decision.html> or is this a
feature which may be added to the Palette in a later version? In my opinion
it's a valid usecase (given, that a Palette is the right choice for my UI
design).

Re: Trigger custom JS events and handle them on the server side

Posted by Chris Mylonas <ch...@opencsta.org>.
Are you getting an exception page and or stack trace first of all?

Any ideas what/where the code have have changed for 5.4

Any tests that would help devs?

Cm
On 31/08/2014 12:51 am, "Martin Schneider" <ma...@gmail.com> wrote:

> What is the best way to do this with Tapestry 5.4? The jQuery bind mixin
> seems to have done this for Tapestry 5.3 (
> http://tapestry5-jquery.com/mixins/docsbind).
>
> Basically, what I'm trying to achieve is, to allow palette components to
> behave like the select components in this example:
>
> http://jumpstart.doublenegative.com.au/jumpstart7/examples/ajax/selectdependency1
>
> The selected values of the first, determine what can be selected in the
> next one.
>
> There do not seem to be any suitable events triggered when adding or
> removing elements in a palette or am I missing something?
>
> Any help is highly appreciated. Thanks in advance!
>