On Fri, 27 Aug 2010 09:41:21 -0300, ruksen inanir <ruksenina...@gmail.com>
wrote:
Hi,
Isn't the onActivate() method's return type void?
Absolutetly no. See
http://tapestry.apache.org/tapestry5.1/guide/pagenav.html.
Should you get the
outputStream and out the response to the stream in the onActivate() ?
You can do that. That's what I do in these scenarios: I create a page just
for returning dynamic charts, for example.
How is the response handled which onChart() method returns at the example
http://wiki.apache.org/tapestry/Tapestry5HowToCreateGenericGraphComponent
?
Every event has an URL. That example feeds this URL into the src attribute
of an <img> tag.
Should I do something explicitly to handle this response, in the
example there is no code which seems to handle this response. In the
.tml of example
<t:chart width="200" height="150" chart="lineChart"/>
this line creates a component with specified width and height and the
data
from lineChart. Then onChart() of the component is called which in turn
returns StreamResponse. To the this point everything seems rigth but,
this response is not handled.
Try requesting the image URL by hand and please post the result.
How is this response handled? Should i do something else to handle the
StreamReponse to make the image appear on the page. (
StreamResponse holds the the stream of a JFreeChart Image)
Just have an <img> tag pointing to the URL that generates images, be it a
page or component event or a Tapestry page.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org