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:actionlink
t:id="showResults" context="1">Show Results</t:actionlink> 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; <t:actionlink t:id="showResults" context="1">Show
Results</t:actionlink>
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", "<t:actionlink t:id=\"showResults\"
context=\""+execution.getId()+"\">Show Results</t:actionlink>");
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]