You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bart Kummel <bk...@gmail.com> on 2010/03/16 12:59:46 UTC

Re: [Trinidad] How to get control over tr:table detail disclose link table cell?

Hi Elmar,

You should use Trinidad Skinning for this. You can take an existing skin and
change the elements you want to change the appearance of. See [1] for more
information.

Best regards,
Bart

[1] http://myfaces.apache.org/trinidad/devguide/skinning.html

On Wed, Mar 10, 2010 at 11:58, Elmar Kretzer <e....@symentis.com> wrote:

> Hi all,
>
> is it possible to get control over the appearance of the disclose link in a
> tr:table?
>
> Currently it seems like the td with the disclose link get automagically
> rendered with class af_column_cell-text and OraTableBorder1111 when you add
> the detail stamp.
>
> Like:
> <td nowrap="" class="af_column_cell-text OraTableBorder1111"
> headers="j_id1"><div>....</div></td>
>
> Is there any hook to change the style class of this td?
>
> We want to mark the disclosed rows + details with a different background
> color.
> The only problem now is that the disclose link able cell has always the
> same style class .
>
> Thx for any suggestions.
>
> Elmar
>
>


-- 
___________________________________________________________
Bart Kummel

Author of the book "Apache MyFaces 1.2 Web Application Development"
See http://tinyurl.com/am12wad

Re: [Trinidad] How to get control over tr:table detail disclose link table cell?

Posted by Bart Kummel <bk...@gmail.com>.
Hi Elmar,

Yeah, I got your problem. In skinning terms, I think you can summarize your
problem by saying that a "af|table::disclosureCell" skinning selector is
missing, right?

I can think of a couple of solutions, you also mentioned some. I think for a
lot of use cases the addition of aforementioned skinning selector is a good
solution. This way the cell with the disclosure link and everything that is
in that cell can be styled as you like. (This includes hiding it.)

Adding a "discloser" facet, as you suggest, gives even more flexibility,
especially when combined with one or more extra skinning selectors. A
downside of adding such a facet might be that it can make things overly
complex.

I'm not a fan of extra styleClass attributes. I think it is better to have
enough skinning selectors. In my opinion, using styleClass attributes is
very close to mixing View code with Controller logic, which should be
prevented.

Long story short: I don't think what you want is possible yet. However, you
can always create an enhancement request in Jira and/or supply a patch...

Best regards,
Bart

On Wed, Mar 17, 2010 at 09:26, Elmar Kretzer <e....@symentis.com> wrote:

> Hi Bart,
>
> the skinning support for the automatic disclose link is not sufficient as
> far as i can see.
>
> E.g. in <tr:column> i can set the style class via EL so i have full control
> over the styles in a rendered table row,
> and I can explicitly change the style class of a disclosed row's table
> cells.
>
> But there is no possibility to change the style class of the cell with the
> built-in disclose link of a disclosed row.
>
> i am missing something like:
>
> 1.
>  <f:facet name="discloser" ></f:facet>
> or
>
> 2.
> an attribute in tr:table like:
> discloseLinkCellStyleClass="{#xxx.yyy}"
> or
>
> 3.
> any way to hide the built-in disclose link (cell).
> we already implemented an own listener for enhanced control over the row
> disclosing which we place inside a normal tr:column.
> but there is no way to hide the built-in disclose link (cell). As soon as i
> add the necessary detail facet, the cell gets rendered.
>
> you see my problem?
> =)
>
> Best regards,
> Elmar
>
>
>
> > Hi Elmar,
> >
> > You should use Trinidad Skinning for this. You can take an existing skin
> and
> > change the elements you want to change the appearance of. See [1] for
> more
> > information.
> >
> > Best regards,
> > Bart
> >
> > [1] http://myfaces.apache.org/trinidad/devguide/skinning.html
> >
> > On Wed, Mar 10, 2010 at 11:58, Elmar Kretzer <e....@symentis.com>
> wrote:
> >
> >> Hi all,
> >>
> >> is it possible to get control over the appearance of the disclose link
> in a
> >> tr:table?
> >>
> >> Currently it seems like the td with the disclose link get automagically
> >> rendered with class af_column_cell-text and OraTableBorder1111 when you
> add
> >> the detail stamp.
> >>
> >> Like:
> >> <td nowrap="" class="af_column_cell-text OraTableBorder1111"
> >> headers="j_id1"><div>....</div></td>
> >>
> >> Is there any hook to change the style class of this td?
> >>
> >> We want to mark the disclosed rows + details with a different background
> >> color.
> >> The only problem now is that the disclose link able cell has always the
> >> same style class .
> >>
> >> Thx for any suggestions.
> >>
> >> Elmar
> >>
> >>
> >
> >
> > --
> > ___________________________________________________________
> > Bart Kummel
> >
> > Author of the book "Apache MyFaces 1.2 Web Application Development"
> > See http://tinyurl.com/am12wad
>
>


-- 
___________________________________________________________
Bart Kummel

Author of the book "Apache MyFaces 1.2 Web Application Development"
See http://tinyurl.com/am12wad

Re: [Trinidad] How to get control over tr:table detail disclose link table cell?

Posted by Elmar Kretzer <e....@symentis.com>.
Hi Bart,

the skinning support for the automatic disclose link is not sufficient as far as i can see.

E.g. in <tr:column> i can set the style class via EL so i have full control over the styles in a rendered table row,
and I can explicitly change the style class of a disclosed row's table cells.

But there is no possibility to change the style class of the cell with the built-in disclose link of a disclosed row.

i am missing something like:

1.
 <f:facet name="discloser" ></f:facet> 
or

2.
an attribute in tr:table like: 
discloseLinkCellStyleClass="{#xxx.yyy}"
or

3.
any way to hide the built-in disclose link (cell). 
we already implemented an own listener for enhanced control over the row disclosing which we place inside a normal tr:column.
but there is no way to hide the built-in disclose link (cell). As soon as i add the necessary detail facet, the cell gets rendered.

you see my problem? 
=)

Best regards,
Elmar



> Hi Elmar,
> 
> You should use Trinidad Skinning for this. You can take an existing skin and
> change the elements you want to change the appearance of. See [1] for more
> information.
> 
> Best regards,
> Bart
> 
> [1] http://myfaces.apache.org/trinidad/devguide/skinning.html
> 
> On Wed, Mar 10, 2010 at 11:58, Elmar Kretzer <e....@symentis.com> wrote:
> 
>> Hi all,
>> 
>> is it possible to get control over the appearance of the disclose link in a
>> tr:table?
>> 
>> Currently it seems like the td with the disclose link get automagically
>> rendered with class af_column_cell-text and OraTableBorder1111 when you add
>> the detail stamp.
>> 
>> Like:
>> <td nowrap="" class="af_column_cell-text OraTableBorder1111"
>> headers="j_id1"><div>....</div></td>
>> 
>> Is there any hook to change the style class of this td?
>> 
>> We want to mark the disclosed rows + details with a different background
>> color.
>> The only problem now is that the disclose link able cell has always the
>> same style class .
>> 
>> Thx for any suggestions.
>> 
>> Elmar
>> 
>> 
> 
> 
> -- 
> ___________________________________________________________
> Bart Kummel
> 
> Author of the book "Apache MyFaces 1.2 Web Application Development"
> See http://tinyurl.com/am12wad