Re: Rendering block from Java

Lance Java <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <CAN7Z0vQrN8JqbwxvPHdo+ga0j6jzyKYmYsM6xPQ5qSf7-buUig@mail.gmail.com>
There's also the capture component
http://t5stitch-lazan.rhcloud.com/capturedemo

On 6 Jan 2017 5:17 p.m., "Nathan Quirynen" <[email protected]>
wrote:

> Hey,
>
> I'm not sure with blocks, but I do know that Lance (Tapestry committer)
> made a library to render pages and components in code. Maybe this can help
> you with your case?
>
> https://github.com/uklance/tapestry-offline
>
>
> Nathan
>
>
> Op 06/01/2017 om 18:12 schreef Jaroslav Ciml:
>
>> Hi,
>>
>> Is rendering of a block possible directly from Java code?
>>
>> I know that I can return a block from a rendering phase method:
>>
>> Object beginRender()
>> {
>>      if (someCondition) {
>>          return someBlock; // of type org.apache.tapestry5.Block
>>      }
>>      ...
>> }
>>
>> However, can I do something like
>>
>> Object beginRender(MarkupWriter writer)
>> {
>>      writer.write("Leading text");
>>      if (someBlock != null)
>>      {
>>          writer.renderBlock(someBlock); // this method does not actually
>> exist
>>      }
>>      writer.write("Trailing text");
>> }
>>
>> Thanks.
>> Jarda
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.