Re: Handle specific bubbled up validate event

2015-04-28 Thread Thiago H de Paula Figueiredo

Yes, it is. :)

On Tue, 28 Apr 2015 04:48:47 -0300, Nathan Quirynen  
nat...@pensionarchitects.be wrote:



On 28/04/15 09:40, Nathan Quirynen wrote:

Hi,

In a page I have a component that contains multiple forms. Now I want  
to handle the bubbled up validate event from one of these forms in my  
page.
I know I can handle the validate event with  
onValidateFrom[ComponentName](), but this handles all bubbled up  
validate events from the component I think and is not specific enough.  
I need something like onValidateFrom[ComponentName]From[FormName]().  
Is there a way with naming convention to do this? Or do I need to do  
something else?


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



I was too fast with asking. I just fixed it with following:

In the onValidateFrom[FormId] inside my component I added following:

componentResources.triggerEvent(validate[FormId], null, null);

and then in my page I can use following event:

onValidate[FormId]From[ComponentId]()

I hope this is the correct way of fixing this?


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Handle specific bubbled up validate event

2015-04-28 Thread Lance Java
The page sees the component as a black box and doesn't know about its
internal component structure. This encapsulation is by design. If you want
more specific events you'll need to trigger them from your component.


Handle specific bubbled up validate event

2015-04-28 Thread Nathan Quirynen

Hi,

In a page I have a component that contains multiple forms. Now I want to 
handle the bubbled up validate event from one of these forms in my page.
I know I can handle the validate event with 
onValidateFrom[ComponentName](), but this handles all bubbled up 
validate events from the component I think and is not specific enough. I 
need something like onValidateFrom[ComponentName]From[FormName](). Is 
there a way with naming convention to do this? Or do I need to do 
something else?


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Handle specific bubbled up validate event

2015-04-28 Thread Nathan Quirynen

On 28/04/15 09:40, Nathan Quirynen wrote:

Hi,

In a page I have a component that contains multiple forms. Now I want 
to handle the bubbled up validate event from one of these forms in my 
page.
I know I can handle the validate event with 
onValidateFrom[ComponentName](), but this handles all bubbled up 
validate events from the component I think and is not specific enough. 
I need something like onValidateFrom[ComponentName]From[FormName](). 
Is there a way with naming convention to do this? Or do I need to do 
something else?


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



I was too fast with asking. I just fixed it with following:

In the onValidateFrom[FormId] inside my component I added following:

componentResources.triggerEvent(validate[FormId], null, null);

and then in my page I can use following event:

onValidate[FormId]From[ComponentId]()

I hope this is the correct way of fixing this?


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org