Hm... I am a bit lost here. According to the example

public class Img
{
    @Parameter(required=true, allowNull=false,
defaultPrefix=BindingConstants.ASSET)
    private Asset src;

    @Mixin
    private RenderInformals renderInformals;

    void beginRender(MarkupWriter writer)
    {
        writer.element("img", "src", src);
    }

    boolean beforeRenderBody(MarkupWriter writer)
    {
        writer.end();
        return false;
    }
}


I need to make sure that I "manually" render an element and then to close
it. This will allow I guess to the mixin to do its magic. There is no
mention of the afterRender() so I am not sure how to use it.

The only thing I can come up is to create this writer call for each one of
my fields?

Thanks


On Tue, Jun 25, 2013 at 11:43 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Tue, 25 Jun 2013 18:27:10 -0300, Boris Horvat <horvat.z.bo...@gmail.com>
> wrote:
>
>  My problem is that I have around 5-6 different use cases
>>
>> textfield, textarea, progress, textfield with autocomplete, upload and so
>> on...
>>
>> So I would like not to have a bunch of beginRender method that have
>> conditions :(
>>
>
> You don't need a bunch of beginRender() methods. Most probably just one
> afterRender() method (without beginRender()) will suffice.
>
>
>  Is there any way to avoid this?
>>
>
> I haven't tried, but I still think the suggestions I gave you might work.
>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org>
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Sincerely
*Boris Horvat*

Reply via email to