Re: Eventlink event "was not handled; you must provide a matching event handler method"

2015-06-18 Thread Thiago H de Paula Figueiredo
On Thu, 18 Jun 2015 16:22:35 -0300, Casey Link   
wrote:


Ugh, sorry. That was a failure on my part to correctly write the example  
code for the email.


By the way, you haven't posted the template nor the corresponding code  
(instead of just the event handler method names), so it's hard to know  
what's happening.


--
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: Eventlink event "was not handled; you must provide a matching event handler method"

2015-06-18 Thread Casey Link
On Thursday, June 18, 2015 04:01:43 PM Thiago H de Paula Figueiredo wrote:
> On Thu, 18 Jun 2015 14:47:51 -0300, Casey Link   
> wrote:
> 
> > Hi again,
> 
> Hi!
> 
> >  Request event 'remove' (on component mypackage/MyPage) was not  
> > handled; you must provide a matching event handler method in the  
> > component or in one of its containers.
> >Object onRemoveItem(Long id) {
> >Object onAddCourseModule(Long id) {
> 
> Your event handlers are not matching the event names, so they don't  
> actually handle the event. For a "remove" event, the event handler method  
> name should be "onRemove" (or any method annotated with  
> @OnEvent("remove"). The context of the EventLink must also match the event  
> handler method parameters.

Ugh, sorry. That was a failure on my part to correctly write the example code 
for the email.

I doubled checked, and the event handlers method names do match the EventLink 
names, and the contexts do match.

Like I said, the event handlers work fine on a normal page refresh, but only 
when I do the "add" and "remove" on the _same_ item without a page refresh in 
between do I experience the issue.

I'm not sure what Tapestry is doing in the background, but do I need to do 
something to tell Tapestry "Hey, there's a new possible item context that can 
be called for the event!"?

What's strange, is I can "add" on A, then "remove" on B and it works (showing 
that the handler exists and works!), but if I "remove" on A instead, it blows 
up :\ 

Casey

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



Re: Eventlink event "was not handled; you must provide a matching event handler method"

2015-06-18 Thread Thiago H de Paula Figueiredo
On Thu, 18 Jun 2015 14:47:51 -0300, Casey Link   
wrote:



Hi again,


Hi!

 Request event 'remove' (on component mypackage/MyPage) was not  
handled; you must provide a matching event handler method in the  
component or in one of its containers.

   Object onRemoveItem(Long id) {
   Object onAddCourseModule(Long id) {


Your event handlers are not matching the event names, so they don't  
actually handle the event. For a "remove" event, the event handler method  
name should be "onRemove" (or any method annotated with  
@OnEvent("remove"). The context of the EventLink must also match the event  
handler method parameters.


--
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



Eventlink event "was not handled; you must provide a matching event handler method"

2015-06-18 Thread Casey Link
Hi again,


Big thanks to Thiago and everyone else who answers questions on this list.

I have a standard pattern in my app an EventLink inside a zone that shuffles 
items between lists. I based the code on the AJAX EventLink jumpstart [1]

The two eventlinks are "add" and "remove".

>From a full page refresh if I perform an "add" on an Object instance A, then a 
>"remove" on the same A I get the error:

 Request event 'remove' (on component mypackage/MyPage) was not handled; 
you must provide a matching event handler method in the component or in one of 
its containers.

However, if I refresh the page after the "add" and before the "remove", it 
works fine. If I perform the "add" and then "remove" on Object B, which was 
there since the page refresh, it works fine.

Here's a sample of my event handlers:

   Object onRemoveItem(Long id) {
Item item = itemFetcher(id);
_listOfItems.remove(item); // a Set that backs the Grid component 
I'm using
_listOfItemsToAdd.add(item); // a Set for the list of addable 
items
dbDelete(item);
if (_request.isXHR()) {
return _itemZone.getBody();
}
return null;
}

Object onAddCourseModule(Long id) {
Item item = itemFetcher(id);
_listOfItems.add(item);
_listOfItemsToAdd.remove(item);
 dbAdd(item);
if (_request.isXHR()) {
return _itemZone.getBody();
}
return null;
}



Thanks,

Casey

[1]: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/eventlink


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



Re: Event Handler Method

2011-04-25 Thread Howard Lewis Ship
You're better off looking at the framework's OnEventWorker class and
seeing how that operates.

On Sun, Apr 24, 2011 at 10:47 PM, Moritz Gmelin  wrote:
> Hi,
>
> If I have an event link for a request. I can find the target component (with 
> its proper class) with the ComponentSourceService.
> Is there a more elegant way to find the event handler method that will be 
> invoked on the component than to search through matching method names in the 
> component class (by reflection) and compare parameters (or check OnEvent 
> annotations)?
> Background is that I want to create a new Annotation on an event handler 
> method and need to check this when creating a special link in a custom 
> ComponentEventLinkEncoder.
>
> Thanks
>
> Moritz
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



Event Handler Method

2011-04-24 Thread Moritz Gmelin
Hi,

If I have an event link for a request. I can find the target component (with 
its proper class) with the ComponentSourceService. 
Is there a more elegant way to find the event handler method that will be 
invoked on the component than to search through matching method names in the 
component class (by reflection) and compare parameters (or check OnEvent 
annotations)?
Background is that I want to create a new Annotation on an event handler method 
and need to check this when creating a special link in a custom 
ComponentEventLinkEncoder.

Thanks

Moritz

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



Access to the event handler method annotation during rendering of compoment

2010-07-08 Thread Blšták Peter
Hi

Is it possible to get access to the event handler method annotation during 
rendering of compoment, which triggers corresponding event ?
How is it possible (the best way) ?

Let say I have a custom link component SecuredLink placed in TestPage and event 
handler for SecuredLink event on the same page.
I would like to access @Secured annotation content during render of SecuredLink 
compoment (to be able to make the link conditionally inaccessible).


public class TestPage {

@Component
private SecuredLink securedLink;


@Secured({Roles.ADMIN})
void onActionFromSecuredLink() {
...
}

...
}

I know how to make "SecuredInterceptor" for the event listener method, which 
prevents for unauthorized invocation of the listener. As I say I would like to 
use annotation also during render of corresponding "triggering" component.

Thanks

P.


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



RE: Getting the result of a component event handler method.

2008-02-01 Thread Mahen Perera
Thanks Chris, I get your point. silly me :)  ,, too much tapestry for
the day .. 

i think i know how to solve the issue now... Thanks again..

-Original Message-
From: Chris Lewis [mailto:[EMAIL PROTECTED] 
Sent: 01 February 2008 15:30
To: Tapestry users
Subject: Re: Getting the result of a component event handler method.

I think you are :-). If you're server-side handler is retu

response.put("testID", "Show Results");

You are returning "" markup in your JSON response,
which Tapestry doesn't process (it just sends text and you provide it). 
Therefore if you look at the source of you rendered page you'll see that
what is returned is a raw Tapestry-like tag, instead of a properly
rendered link tag. Since you're returning this from an AJAX request you
may have to use an alert() box to verify it, or perhaps you can use
Firefox/Firebug. At any rate what you have to do is have T5 generate
your link for you. Take a look at the source for the Autocomplete mixin
to see how this is done.

chris

Mahen Perera wrote:
> Thanks Howard for the reply. But the issue is, the mark up that i am 
> returning is not properly rendered..
> i.e when i am returning a mark up such as ,  t:id="showResults" context="1">Show Results what is 
> getting rendered is just the Text "Show Results" , and the hyperlink 
> is not rendered,, which should be there for a actionlink component. i 
> think i am missing something obvious..
>
>
> -Original Message-
> From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> Sent: 01 February 2008 15:01
> To: Tapestry users
> Subject: Re: Getting the result of a component event handler method.
>
> On an Ajax request, if you return a component or block from an event 
> handler method, Tapestry will render the result as a JSON reply, 
> putting the markup inside a "content" key.  I'm still working on 
> handling errors nicely, and handling the case where additional 
> JavaScript is generated as part of the render. All of this is 
> fundamental to the Zone component support.
>
> Don't forget that you can check Request.isXHR() to see if the request 
> is Ajax or traditional.
>
> On Feb 1, 2008 6:27 AM, Mahen Perera <[EMAIL PROTECTED]>
wrote:
>   
>> Hi all,
>>
>> I have written a component where it has an associated component event

>> handler method. This event handler method is getting called thru a 
>> Ajax request when the user performs some action in the browser.
>> I need this event handler method to return a mark up such as 
>> following; Show 
>> Results
>>
>> I will be then using this markup to do something like
>>
>> document.getElementByID.innerHTML = markup ;
>>
>> in the onComplete of the Ajax request.
>>
>>
>>
>> Currently i am returning a JSON object from the component event 
>> handler method.. where this JSON object is populated as following:
>>
>> JSONObject response = new JSONObject();
>>
>> response.put("testID", "> context=\""+execution.getId()+"\">Show Results");
>>
>>  However, when the page is updated, i dont see the link of this 
>> markup... i mean i see only the text "Show Results" .. and not a link

>> for it.. which i am trying to have..
>>
>> I know that i can return either a StreamResponse or a Block Component

>> in the event handler method.. but i am not sure how to do it.. i mean

>> to do in such a way so that the link of the "actionLink" is properly 
>> displayed.
>>
>> Thanks in advance for any help..
>>
>> Hope my question is clear..
>>
>>
>>
>>
>> The information contained in this email is strictly confidential and
>> 
> for the use of the addressee only, unless otherwise indicated. If you 
> are not the intended recipient, please do not read, copy, use or 
> disclose to others this message or any attachment. Please also notify 
> the sender by replying to this email or by telephone (+44 (0)20 7896
> 0011) and then delete the email and any copies of it. Opinions, 
> conclusions (etc.) that do not relate to the official business of this

> company shall be understood as neither given nor endorsed by it. IG 
> Index plc is a company registered in England and Wales under number 
> 01190902. VAT registration number 761 2978 07. Registered Office: 
> Friars House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and

> regulated by the Financial Services Authority. FSA Register number 
> 114059.
>   
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -

Re: Getting the result of a component event handler method.

2008-02-01 Thread Chris Lewis
I just looked at the first sentence I wrote - sorry for that :-(. It was 
supposed to say:


"I think you are :-). If your server-side handler is returning:"

Chris Lewis wrote:

I think you are :-). If you're server-side handler is retu

response.put("testID", "context=\""+execution.getId()+"\">Show Results");


You are returning "" markup in your JSON response, 
which Tapestry doesn't process (it just sends text and you provide 
it). Therefore if you look at the source of you rendered page you'll 
see that what is returned is a raw Tapestry-like tag, instead of a 
properly rendered link tag. Since you're returning this from an AJAX 
request you may have to use an alert() box to verify it, or perhaps 
you can use Firefox/Firebug. At any rate what you have to do is have 
T5 generate your link for you. Take a look at the source for the 
Autocomplete mixin to see how this is done.


chris

Mahen Perera wrote:

Thanks Howard for the reply. But the issue is, the mark up that i am
returning is not properly rendered..
i.e when i am returning a mark up such as , Show Results what is
getting rendered is just the Text "Show Results" , and the hyperlink is
not rendered,, which should be there for a actionlink component. i think
i am missing something obvious..

-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: 01 February 
2008 15:01

To: Tapestry users
Subject: Re: Getting the result of a component event handler method.

On an Ajax request, if you return a component or block from an event
handler method, Tapestry will render the result as a JSON reply, putting
the markup inside a "content" key.  I'm still working on handling errors
nicely, and handling the case where additional JavaScript is generated
as part of the render. All of this is fundamental to the Zone component
support.

Don't forget that you can check Request.isXHR() to see if the request is
Ajax or traditional.

On Feb 1, 2008 6:27 AM, Mahen Perera <[EMAIL PROTECTED]> wrote:
 

Hi all,

I have written a component where it has an associated component 
event handler method. This event handler method is getting called 
thru a Ajax request when the user performs some action in the browser.
I need this event handler method to return a mark up such as 
following; Show 
Results


I will be then using this markup to do something like

document.getElementByID.innerHTML = markup ;

in the onComplete of the Ajax request.



Currently i am returning a JSON object from the component event 
handler method.. where this JSON object is populated as following:


JSONObject response = new JSONObject();

response.put("testID", "Show Results");

 However, when the page is updated, i dont see the link of this 
markup... i mean i see only the text "Show Results" .. and not a 
link for it.. which i am trying to have..


I know that i can return either a StreamResponse or a Block 
Component in the event handler method.. but i am not sure how to do 
it.. i mean to do in such a way so that the link of the "actionLink" 
is properly displayed.


Thanks in advance for any help..

Hope my question is clear..




The information contained in this email is strictly confidential and


for the use of the addressee only, unless otherwise indicated. If you
are not the intended recipient, please do not read, copy, use or
disclose to others this message or any attachment. Please also notify
the sender by replying to this email or by telephone (+44 (0)20 7896
0011) and then delete the email and any copies of it. Opinions,
conclusions (etc.) that do not relate to the official business of this
company shall be understood as neither given nor endorsed by it. IG
Index plc is a company registered in England and Wales under number
01190902. VAT registration number 761 2978 07. Registered Office: Friars
House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and
regulated by the Financial Services Authority. FSA Register number
114059.
 



--
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

The information contained in this email is strictly confidential and 
for the use of the addressee only, unless otherwise indicated. If you 
are not the intended recipient, please do not read, copy, use or 
disclose to others this message or any attachment. Please also notify 
the sender by replying to this email or by telephone (+44 (0)20 7896 
0011) and then delete the email and any copies of it. Opinions, 
conclusions (etc.) that do not relate to the official business of 
this company shall be understood as neither given nor endorsed by it. 
IG Index plc is a company registered in England and Wales under 
number 01190902. VAT r

Re: Getting the result of a component event handler method.

2008-02-01 Thread Chris Lewis

I think you are :-). If you're server-side handler is retu

response.put("testID", "Show Results");

You are returning "" markup in your JSON response, 
which Tapestry doesn't process (it just sends text and you provide it). 
Therefore if you look at the source of you rendered page you'll see that 
what is returned is a raw Tapestry-like tag, instead of a properly 
rendered link tag. Since you're returning this from an AJAX request you 
may have to use an alert() box to verify it, or perhaps you can use 
Firefox/Firebug. At any rate what you have to do is have T5 generate 
your link for you. Take a look at the source for the Autocomplete mixin 
to see how this is done.


chris

Mahen Perera wrote:

Thanks Howard for the reply. But the issue is, the mark up that i am
returning is not properly rendered..
i.e when i am returning a mark up such as , Show Results what is
getting rendered is just the Text "Show Results" , and the hyperlink is
not rendered,, which should be there for a actionlink component. i think
i am missing something obvious.. 



-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: 01 February 2008 15:01

To: Tapestry users
Subject: Re: Getting the result of a component event handler method.

On an Ajax request, if you return a component or block from an event
handler method, Tapestry will render the result as a JSON reply, putting
the markup inside a "content" key.  I'm still working on handling errors
nicely, and handling the case where additional JavaScript is generated
as part of the render. All of this is fundamental to the Zone component
support.

Don't forget that you can check Request.isXHR() to see if the request is
Ajax or traditional.

On Feb 1, 2008 6:27 AM, Mahen Perera <[EMAIL PROTECTED]> wrote:
  

Hi all,

I have written a component where it has an associated component event 
handler method. This event handler method is getting called thru a 
Ajax request when the user performs some action in the browser.
I need this event handler method to return a mark up such as 
following; Show 
Results


I will be then using this markup to do something like

document.getElementByID.innerHTML = markup ;

in the onComplete of the Ajax request.



Currently i am returning a JSON object from the component event 
handler method.. where this JSON object is populated as following:


JSONObject response = new JSONObject();

response.put("testID", "Show Results");

 However, when the page is updated, i dont see the link of this 
markup... i mean i see only the text "Show Results" .. and not a link 
for it.. which i am trying to have..


I know that i can return either a StreamResponse or a Block Component 
in the event handler method.. but i am not sure how to do it.. i mean 
to do in such a way so that the link of the "actionLink" is properly 
displayed.


Thanks in advance for any help..

Hope my question is clear..




The information contained in this email is strictly confidential and


for the use of the addressee only, unless otherwise indicated. If you
are not the intended recipient, please do not read, copy, use or
disclose to others this message or any attachment. Please also notify
the sender by replying to this email or by telephone (+44 (0)20 7896
0011) and then delete the email and any copies of it. Opinions,
conclusions (etc.) that do not relate to the official business of this
company shall be understood as neither given nor endorsed by it. IG
Index plc is a company registered in England and Wales under number
01190902. VAT registration number 761 2978 07. Registered Office: Friars
House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and
regulated by the Financial Services Authority. FSA Register number
114059.
  




--
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Index plc is a company registered in England and Wales under number 
01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 
157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




RE: Getting the result of a component event handler method.

2008-02-01 Thread Mahen Perera
Thanks Howard for the reply. But the issue is, the mark up that i am
returning is not properly rendered..
i.e when i am returning a mark up such as , Show Results what is
getting rendered is just the Text "Show Results" , and the hyperlink is
not rendered,, which should be there for a actionlink component. i think
i am missing something obvious.. 


-Original Message-
From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
Sent: 01 February 2008 15:01
To: Tapestry users
Subject: Re: Getting the result of a component event handler method.

On an Ajax request, if you return a component or block from an event
handler method, Tapestry will render the result as a JSON reply, putting
the markup inside a "content" key.  I'm still working on handling errors
nicely, and handling the case where additional JavaScript is generated
as part of the render. All of this is fundamental to the Zone component
support.

Don't forget that you can check Request.isXHR() to see if the request is
Ajax or traditional.

On Feb 1, 2008 6:27 AM, Mahen Perera <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have written a component where it has an associated component event 
> handler method. This event handler method is getting called thru a 
> Ajax request when the user performs some action in the browser.
> I need this event handler method to return a mark up such as 
> following; Show 
> Results
>
> I will be then using this markup to do something like
>
> document.getElementByID.innerHTML = markup ;
>
> in the onComplete of the Ajax request.
>
>
>
> Currently i am returning a JSON object from the component event 
> handler method.. where this JSON object is populated as following:
>
> JSONObject response = new JSONObject();
>
> response.put("testID", " context=\""+execution.getId()+"\">Show Results");
>
>  However, when the page is updated, i dont see the link of this 
> markup... i mean i see only the text "Show Results" .. and not a link 
> for it.. which i am trying to have..
>
> I know that i can return either a StreamResponse or a Block Component 
> in the event handler method.. but i am not sure how to do it.. i mean 
> to do in such a way so that the link of the "actionLink" is properly 
> displayed.
>
> Thanks in advance for any help..
>
> Hope my question is clear..
>
>
>
>
> The information contained in this email is strictly confidential and
for the use of the addressee only, unless otherwise indicated. If you
are not the intended recipient, please do not read, copy, use or
disclose to others this message or any attachment. Please also notify
the sender by replying to this email or by telephone (+44 (0)20 7896
0011) and then delete the email and any copies of it. Opinions,
conclusions (etc.) that do not relate to the official business of this
company shall be understood as neither given nor endorsed by it. IG
Index plc is a company registered in England and Wales under number
01190902. VAT registration number 761 2978 07. Registered Office: Friars
House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and
regulated by the Financial Services Authority. FSA Register number
114059.
>



--
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Index plc is a company registered in England and Wales under number 
01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 
157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Getting the result of a component event handler method.

2008-02-01 Thread Howard Lewis Ship
On an Ajax request, if you return a component or block from an event
handler method, Tapestry will render the result as a JSON reply,
putting the markup inside a "content" key.  I'm still working on
handling errors nicely, and handling the case where additional
JavaScript is generated as part of the render. All of this is
fundamental to the Zone component support.

Don't forget that you can check Request.isXHR() to see if the request
is Ajax or traditional.

On Feb 1, 2008 6:27 AM, Mahen Perera <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have written a component where it has an associated component event
> handler method. This event handler method is getting called thru a Ajax
> request when the user performs some action in the browser.
> I need this event handler method to return a mark up such as following;
> Show Results
>
> I will be then using this markup to do something like
>
> document.getElementByID.innerHTML = markup ;
>
> in the onComplete of the Ajax request.
>
>
>
> Currently i am returning a JSON object from the component event handler
> method.. where this JSON object is populated as following:
>
> JSONObject response = new JSONObject();
>
> response.put("testID", " context=\""+execution.getId()+"\">Show Results");
>
>  However, when the page is updated, i dont see the link of this
> markup... i mean i see only the text "Show Results" .. and not a link
> for it.. which i am trying to have..
>
> I know that i can return either a StreamResponse or a Block Component in
> the event handler method.. but i am not sure how to do it.. i mean to do
> in such a way so that the link of the "actionLink" is properly
> displayed.
>
> Thanks in advance for any help..
>
> Hope my question is clear..
>
>
>
>
> The information contained in this email is strictly confidential and for the 
> use of the addressee only, unless otherwise indicated. If you are not the 
> intended recipient, please do not read, copy, use or disclose to others this 
> message or any attachment. Please also notify the sender by replying to this 
> email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
> copies of it. Opinions, conclusions (etc.) that do not relate to the official 
> business of this company shall be understood as neither given nor endorsed by 
> it. IG Index plc is a company registered in England and Wales under number 
> 01190902. VAT registration number 761 2978 07. Registered Office: Friars 
> House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by 
> the Financial Services Authority. FSA Register number 114059.
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Getting the result of a component event handler method.

2008-02-01 Thread Mahen Perera
 
Hi all,
 
I have written a component where it has an associated component event
handler method. This event handler method is getting called thru a Ajax
request when the user performs some action in the browser. 
I need this event handler method to return a mark up such as following;
Show Results

I will be then using this markup to do something like 

document.getElementByID.innerHTML = markup ;  

in the onComplete of the Ajax request.

 

Currently i am returning a JSON object from the component event handler
method.. where this JSON object is populated as following:

JSONObject response = new JSONObject();

response.put("testID", "Show Results"); 

 However, when the page is updated, i dont see the link of this
markup... i mean i see only the text "Show Results" .. and not a link
for it.. which i am trying to have..

I know that i can return either a StreamResponse or a Block Component in
the event handler method.. but i am not sure how to do it.. i mean to do
in such a way so that the link of the "actionLink" is properly
displayed.

Thanks in advance for any help..

Hope my question is clear.. 

 

 
The information contained in this email is strictly confidential and for the 
use of the addressee only, unless otherwise indicated. If you are not the 
intended recipient, please do not read, copy, use or disclose to others this 
message or any attachment. Please also notify the sender by replying to this 
email or by telephone (+44 (0)20 7896 0011) and then delete the email and any 
copies of it. Opinions, conclusions (etc.) that do not relate to the official 
business of this company shall be understood as neither given nor endorsed by 
it. IG Index plc is a company registered in England and Wales under number 
01190902. VAT registration number 761 2978 07. Registered Office: Friars House, 
157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the 
Financial Services Authority. FSA Register number 114059.


Re: T5: Event Handler Method Convention Names

2007-09-03 Thread Nick Westgate

Yeah, I think it's only mentioned in the component docs for Submit.
http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html

Cheers,
Nick.


Joshua Jackson wrote:

Thanks Nick

It works now. I was confused since I could not find this in the documentation.

Cheers, :)

On 9/4/07, Nick Westgate <[EMAIL PROTECTED]> wrote:

The Submit component's event notification is "Selected".
So you can use:

void onSelected() // or onSelectedFromFormName




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Event Handler Method Convention Names

2007-09-03 Thread Joshua Jackson
Thanks Nick

It works now. I was confused since I could not find this in the documentation.

Cheers, :)

On 9/4/07, Nick Westgate <[EMAIL PROTECTED]> wrote:
> The Submit component's event notification is "Selected".
> So you can use:
>
> void onSelected() // or onSelectedFromFormName

-- 
It's not just about coding, it's a matter of fulfilling your core being

YM!: thejavafreak
Blog: http://joshuajava.wordpress.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Event Handler Method Convention Names

2007-09-03 Thread Nick Westgate

The Submit component's event notification is "Selected".
So you can use:

void onSelected() // or onSelectedFromFormName

Cheers,
Nick.


Joshua Jackson wrote:

Dear all,

I've tried what is written from here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/event.html
regarding method convention names event handler.

But it seems that it only worked for ActionLink component but not Submit.

Is it true? Do we have to use OnEvent annotation for Submit component?

Thanks in advance



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5: Event Handler Method Convention Names

2007-09-03 Thread Joshua Jackson
Dear all,

I've tried what is written from here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/event.html
regarding method convention names event handler.

But it seems that it only worked for ActionLink component but not Submit.

Is it true? Do we have to use OnEvent annotation for Submit component?

Thanks in advance

-- 
It's not just about coding, it's a matter of fulfilling your core being

YM!: thejavafreak
Blog: http://joshuajava.wordpress.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]