You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Davor Miku <da...@gmail.com> on 2009/03/27 06:54:46 UTC

RSS Rome

Hi!

I'm using rome to build rss feed component.

    @BeginRender
    boolean init(MarkupWriter writer){
...
...
...
feed.setEntries(entries);
SyndFeedOutput output = new SyndFeedOutput();
writer.writeRaw(output.outputString(feed));

return false;
}


I'm using component like:

<t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <t:rss.RssFeedWriter />
</t:container>

But I'm getting exception:

Render queue error in AfterRender[Testing:rssfeedwriter]: This markup writer
does not have a current element. The current element is established with the
first call to element() and is maintained across subsequent calls.


I can't figure out how to solve this. I need some help urgently.

Thanks in advance.

Re: RSS Rome

Posted by Davor Miku <da...@gmail.com>.
Thanks in advance.

Anyway, there must be some way to build custom XML file, not just for RSS.

I'll  need to build google sitemap, soon,  so I need that badly.

On Fri, Mar 27, 2009 at 1:58 AM, Christian Edward Gruber <
christianedwardgruber@gmail.com> wrote:

> I have some code I used for the www.israfil.net site, but I haven't
> open-sourced it.  Let me go dig it out tomorrow and see if i can do that.
>
> I didn't write the raw feed, though.  I used the SyndEntry as a model
> object and created a display component and pulled data from the entry.
>
> regards,
> Christian.
>
>
> On 27-Mar-09, at 01:54 , Davor Miku wrote:
>
>  Hi!
>>
>> I'm using rome to build rss feed component.
>>
>>   @BeginRender
>>   boolean init(MarkupWriter writer){
>> ...
>> ...
>> ...
>> feed.setEntries(entries);
>> SyndFeedOutput output = new SyndFeedOutput();
>> writer.writeRaw(output.outputString(feed));
>>
>> return false;
>> }
>>
>>
>> I'm using component like:
>>
>> <t:container xmlns:t="
>> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>>   <t:rss.RssFeedWriter />
>> </t:container>
>>
>> But I'm getting exception:
>>
>> Render queue error in AfterRender[Testing:rssfeedwriter]: This markup
>> writer
>> does not have a current element. The current element is established with
>> the
>> first call to element() and is maintained across subsequent calls.
>>
>>
>> I can't figure out how to solve this. I need some help urgently.
>>
>> Thanks in advance.
>>
>
> Christian Edward Gruber
> e-mail: christianedwardgruber@gmail.com
> weblog: http://www.geekinasuit.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: RSS Rome

Posted by Christian Edward Gruber <ch...@gmail.com>.
I have some code I used for the www.israfil.net site, but I haven't  
open-sourced it.  Let me go dig it out tomorrow and see if i can do  
that.

I didn't write the raw feed, though.  I used the SyndEntry as a model  
object and created a display component and pulled data from the entry.

regards,
Christian.

On 27-Mar-09, at 01:54 , Davor Miku wrote:

> Hi!
>
> I'm using rome to build rss feed component.
>
>    @BeginRender
>    boolean init(MarkupWriter writer){
> ...
> ...
> ...
> feed.setEntries(entries);
> SyndFeedOutput output = new SyndFeedOutput();
> writer.writeRaw(output.outputString(feed));
>
> return false;
> }
>
>
> I'm using component like:
>
> <t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd 
> ">
>    <t:rss.RssFeedWriter />
> </t:container>
>
> But I'm getting exception:
>
> Render queue error in AfterRender[Testing:rssfeedwriter]: This  
> markup writer
> does not have a current element. The current element is established  
> with the
> first call to element() and is maintained across subsequent calls.
>
>
> I can't figure out how to solve this. I need some help urgently.
>
> Thanks in advance.

Christian Edward Gruber
e-mail: christianedwardgruber@gmail.com
weblog: http://www.geekinasuit.com/


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


Re: RSS Rome

Posted by Davor Miku <da...@gmail.com>.
Thanks!!!

On Fri, Mar 27, 2009 at 9:56 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Fri, Mar 27, 2009 at 2:54 AM, Davor Miku <da...@gmail.com> wrote:
> > Hi!
>
> Hello!
>
> > I'm using rome to build rss feed component.
> >    @BeginRender
> >    boolean init(MarkupWriter writer){
> > feed.setEntries(entries);
> > SyndFeedOutput output = new SyndFeedOutput();
> > writer.writeRaw(output.outputString(feed));
>
> The recommended way of doing this (sending content not generated by a
> Tapestry template) is returning a StreamResponse in the onActivate()
> method or any other event handler method. There's an example here:
> http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF. It
> deals with binary content, but it also applies to text content. It has
> the advantage of setting the right content type in the response.
>
> --
> Thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: RSS Rome

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, Mar 27, 2009 at 2:54 AM, Davor Miku <da...@gmail.com> wrote:
> Hi!

Hello!

> I'm using rome to build rss feed component.
>    @BeginRender
>    boolean init(MarkupWriter writer){
> feed.setEntries(entries);
> SyndFeedOutput output = new SyndFeedOutput();
> writer.writeRaw(output.outputString(feed));

The recommended way of doing this (sending content not generated by a
Tapestry template) is returning a StreamResponse in the onActivate()
method or any other event handler method. There's an example here:
http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF. It
deals with binary content, but it also applies to text content. It has
the advantage of setting the right content type in the response.

-- 
Thiago

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