On Thu, 22 Nov 2012 09:09:53 -0200, membersound <[email protected]> wrote:

So am I doing it this way?

<t:if test="isSelectDrowdownToBeShown">
   <t:delegate to="selectBlock" />
</t:if>


<t:block t:id="selectBlock">
   <t:select .../>
</t:block>


Is this the proper way of using blocks for my need in Q2?

Nope if you want to add stuff to your form when using the component your created. You don't need blocks for just using the If component in the way you used above.

One example, not tested:

In the component class:

@Parameter(defaultPrefix = BindingConstants.LITERAL)
@Property
private Block additionalStuff;

In the component template:

<t:form>
        ...
        <t:delegate to="additionalStuff"/>
        ...
</t:form>

Usage:

<t:thecomponentyoucreatedwiththeforminside>
        <p:additionalStuff>
                anything you want
        </p:additionalStuff>
</t:thecomponentyoucreatedwiththeforminside>

--
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to