You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Andreou <an...@di.uoa.gr> on 2010/01/09 03:40:37 UTC

Re: @Insert not working when converting tapestry page into a byteoutputstream

When a form is submitted, Tapestry 4 enters the rewind phase (note that T5
doesn't need/use this concept)
That's similar to a normal render and it helps Tapestry find out what values
were submitted and by which controls. Many components can behave
differently when rendering and when rewinding - @Insert is such a case,
during rewind it does nothing!

Anyway, what is happening in your case, is that you're capturing the rewind
(just check the value of cycle.isRewinding() )... also, you're
probably rendering
the page twice (once to save as file and once to return to client). I
believe there's
some code in the wiki that describes how to do this in a more efficient manner.


On Fri, Jan 8, 2010 at 11:32, roquejo <ro...@yahoo.com> wrote:
>
> I just found out that this happens when the submission was made by the @Form
> component, but if it was submitted by the @Directlink component, it worked
> fine.
>
> Do the @Form component accept a paramater to let it bahave like a
> DirectLink? That  @Insert component will be rendered immediately?
> --
> View this message in context: http://old.nabble.com/%40Insert-not-working-when-converting-tapestry-page-into-a-byteoutputstream-tp27071981p27073383.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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


Re: @Insert not working when converting tapestry page into a byteoutputstream

Posted by roquejo <ro...@yahoo.com>.
I got it to work already..

I used cycle.render instead of page.render..thanks for your reply 

Andreas Andreou-4 wrote:
> 
> When a form is submitted, Tapestry 4 enters the rewind phase (note that T5
> doesn't need/use this concept)
> That's similar to a normal render and it helps Tapestry find out what
> values
> were submitted and by which controls. Many components can behave
> differently when rendering and when rewinding - @Insert is such a case,
> during rewind it does nothing!
> 
> Anyway, what is happening in your case, is that you're capturing the
> rewind
> (just check the value of cycle.isRewinding() )... also, you're
> probably rendering
> the page twice (once to save as file and once to return to client). I
> believe there's
> some code in the wiki that describes how to do this in a more efficient
> manner.
> 
> 
> On Fri, Jan 8, 2010 at 11:32, roquejo <ro...@yahoo.com> wrote:
>>
>> I just found out that this happens when the submission was made by the
>> @Form
>> component, but if it was submitted by the @Directlink component, it
>> worked
>> fine.
>>
>> Do the @Form component accept a paramater to let it bahave like a
>> DirectLink? That  @Insert component will be rendered immediately?
>> --
>> View this message in context:
>> http://old.nabble.com/%40Insert-not-working-when-converting-tapestry-page-into-a-byteoutputstream-tp27071981p27073383.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/%40Insert-not-working-when-converting-tapestry-page-into-a-byteoutputstream-tp27071981p27086517.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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