Hi,
   Here is the image tag at the generated page's source <img src="
./charttestpage.chart:chart/200/150<http://localhost:8089/rcd/reports/charttestpage.chart:chart/200/150>
"/>
This line means, a chart event with parameters of width=200, and height=150
is to be fired. As a result of this event, onChart() (which is the event
handler for Chart event)  will return a StreamResponse. Isn't this response
returned to client (browser) automatically? Should i add some other handler
to redirect the response to client?

Note: Used the component and page at
http://wiki.apache.org/tapestry/Tapestry5HowToCreateGenericGraphComponent
wiki example class without modification .
Tapestry 5.1.0.5 is used.

Thanks,
Ruksen




On Fri, Aug 27, 2010 at 3:50 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

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

Reply via email to