You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kevin Menard <km...@servprise.com> on 2007/12/27 18:39:26 UTC
[T4]: Execute arbitrary JS from EventListener
Hey all,
I have the need to call arbitrary JS after updating components from an
EventListener. The use case is the following:
If client-side validation is disabled I show a div that display the error
message. When a form is submitted asynchronously, I can update the contents
of the div, but then I just end up with an empty div. What I'd like to do
is hide it. I had some code for jQuery to hide it after the DOM loads, but
that doesn't help me on the async update.
There's likely an obvious answer to this, but due to lack of experience I'm
just missing it. So, feel free to treat me as clueless.
--
Kevin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T4]: Execute arbitrary JS from EventListener
Posted by Martino Piccinato <ma...@gmail.com>.
I think you are looking for
http://tapestry.apache.org/tapestry4.1/jsdoc/index.html
in particular for
http://tapestry.apache.org/tapestry4.1/jsdoc/files/fx-js.html
On Dec 27, 2007 6:39 PM, Kevin Menard <km...@servprise.com> wrote:
> Hey all,
>
> I have the need to call arbitrary JS after updating components from an
> EventListener. The use case is the following:
>
> If client-side validation is disabled I show a div that display the error
> message. When a form is submitted asynchronously, I can update the contents
> of the div, but then I just end up with an empty div. What I'd like to do
> is hide it. I had some code for jQuery to hide it after the DOM loads, but
> that doesn't help me on the async update.
>
> There's likely an obvious answer to this, but due to lack of experience I'm
> just missing it. So, feel free to treat me as clueless.
>
> --
> Kevin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T4]: Execute arbitrary JS from EventListener
Posted by Jesse Kuhnert <jk...@gmail.com>.
You can always call any of the various add<FOo>Script methods
available on ResponseBuilder(IScriptProcessor). This was previously
broken if called within a listener method but has since been fixed in
at least the 4.1.4-SNAPSHOTs.
On Dec 27, 2007 12:39 PM, Kevin Menard <km...@servprise.com> wrote:
> Hey all,
>
> I have the need to call arbitrary JS after updating components from an
> EventListener. The use case is the following:
>
> If client-side validation is disabled I show a div that display the error
> message. When a form is submitted asynchronously, I can update the contents
> of the div, but then I just end up with an empty div. What I'd like to do
> is hide it. I had some code for jQuery to hide it after the DOM loads, but
> that doesn't help me on the async update.
>
> There's likely an obvious answer to this, but due to lack of experience I'm
> just missing it. So, feel free to treat me as clueless.
>
> --
> Kevin
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Jesse Kuhnert
Tapestry / OGNL / Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org