Thanks, Dusko!

This approach works!

Dusko Jovanovski <dusk...@gmail.com> написал:
Try this:

.tml:

<t:grid t:source="reports" t:row="evntRow"  t:exclude="${excludeColumn}" />

.java:

public String getExcludeColumn(){
    if(excludeCondition)
    return "somecolumn";
    else return null;
}

I didn't test this code, but it should work.

2012/1/31 Vladimir Bauer <vba...@slb.com>

> Good day everybody!
>
> I need to exclude a column from a grid component, by a condition.
> t:exclude parameter of a grid component provides ability to exclude any
> column, but with no condition.
>
> So far I have following code, but I think it is a bit ugly, because it is
> repeating same line with grid.
>
>          <t:if test="excludeCondition">
>              <t:grid t:source="reports" t:row="evntRow"
>  t:exclude="somecolumn" />
>
>                <p:else>
>                     <t:grid t:source="reports" t:row="evntRow" />
>                </p:else>
>
>          </t:if>
>
> Any idea how to do it more properly?
>
> Regards,
> Vladimir Bauer
>
>
>

Reply via email to