You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ralf Edmund Stranzenbach <ra...@reswi.de> on 2008/08/18 14:10:22 UTC

"Decorating" Grid rows

Hi,

one of my application should provide some context aware assistance on  
the rows of a grid component. While it was really easy to provide some  
feedback by creating specific css classes for the rows, adding of a  
context aware menu is more complicated.

How can i provide some additional code for any row visible in a grid  
component (a solution with additional columns is in place, but that's  
not what i want).

With regards,
Ralf E. Stranzenbach

Re: "Decorating" Grid rows

Posted by Howard Lewis Ship <hl...@gmail.com>.
What Davor's gettng at is that there isn't a mechanism in the Grid
component for accomplishing exactly what you want. No single component
can be all things to all people.

It's quite easy to create your own Grid component by subclassing Grid
and overriding its template a little.  This can be a bit more work
than we'd like ... there may be an AbstractGrid in the future that
makes it easier to subclass without duplicating a lot of code and
work.

Davor's approach is to make up the difference on the client side: use
the CSS class for the table rows as a trigger, using Prototype's $$()
function to select just those <TR> elements and attach the necessary
event handling JavaScript.

On Mon, Aug 18, 2008 at 6:45 AM, Davor Hrg <hr...@gmail.com> wrote:
> you can use rowClass to mark rows,
> and set global context menu handler on the table,
> and then in the handler find out row's class attribute : row.className
> then based on that decide what to show in context menu...
>
> Davor Hrg
>
> On Mon, Aug 18, 2008 at 3:27 PM, Stranzenbach, Ralf <
> ralf.stranzenbach@bearingpoint.com> wrote:
>
>> This seems to be a really good solution to create the zebar effect. I-ve
>> tried this using the getter based solution - which worked pretty well. I'll
>> give it a try later this evening.
>>
>> But i need to provide some additional JavaScript code to any row to provide
>> parametrized JavaScript code to activate additional functionality based on
>> the row selected.
>>
>> Sincerly
>> Ralf
>>
>>
>> ________________________________
>>
>> Von: Marcelo Lotif [mailto:mlotifjava@gmail.com]
>> Gesendet: Mo 18.08.2008 15:11
>> An: Tapestry users
>> Betreff: Re: "Decorating" Grid rows
>>
>>
>>
>> Maybe this thread helps you
>>
>> http://www.nabble.com/T5%3A-Grid%27s-rowClass-td13810748s302.html#a13810748
>>
>> read the third post from angelo chen, there's an explanation on how to
>> do the "zebra effect"...
>>
>> Cheers.
>>
>> On Mon, Aug 18, 2008 at 9:10 AM, Ralf Edmund Stranzenbach <ra...@reswi.de>
>> wrote:
>> > Hi,
>> >
>> > one of my application should provide some context aware assistance on the
>> > rows of a grid component. While it was really easy to provide some
>> feedback
>> > by creating specific css classes for the rows, adding of a context aware
>> > menu is more complicated.
>> >
>> > How can i provide some additional code for any row visible in a grid
>> > component (a solution with additional columns is in place, but that's not
>> > what i want).
>> >
>> > With regards,
>> > Ralf E. Stranzenbach
>>
>>
>>
>> --
>> Atenciosamente,
>>
>> Marcelo Lotif
>> Programador Java e Tapestry
>> FIEC - Federação das Indústrias do Estado do Ceará
>> (85) 3477-5910
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>
>>
>> ***************************************************************************************************
>> The information in this email is confidential and may be legally
>> privileged. Access to this email by anyone other than the intended addressee
>> is unauthorized. If you are not the intended recipient of this message, any
>> review, disclosure, copying, distribution, retention, or any action taken or
>> omitted to be taken in reliance on it is prohibited and may be unlawful. If
>> you are not the intended recipient, please reply to or forward a copy of
>> this message to the sender and delete the message, any attachments, and any
>> copies thereof from your system.
>>
>> ***************************************************************************************************
>>
>> BearingPoint GmbH
>> Geschäftsführer: Peter Mockler (Vorsitzender), Marcel Nickler (stellv.
>> Vorsitzender), Wilfried Erber, Werner Kreutzmann, Hans-Werner Wurzel
>> Aufsichtsratsvorsitzender: Roderick McGeary
>> Sitz: Frankfurt am Main
>> Registergericht: Amtsgericht Frankfurt am Main HRB 55490
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: "Decorating" Grid rows

Posted by Davor Hrg <hr...@gmail.com>.
you can use rowClass to mark rows,
and set global context menu handler on the table,
and then in the handler find out row's class attribute : row.className
then based on that decide what to show in context menu...

Davor Hrg

On Mon, Aug 18, 2008 at 3:27 PM, Stranzenbach, Ralf <
ralf.stranzenbach@bearingpoint.com> wrote:

> This seems to be a really good solution to create the zebar effect. I-ve
> tried this using the getter based solution - which worked pretty well. I'll
> give it a try later this evening.
>
> But i need to provide some additional JavaScript code to any row to provide
> parametrized JavaScript code to activate additional functionality based on
> the row selected.
>
> Sincerly
> Ralf
>
>
> ________________________________
>
> Von: Marcelo Lotif [mailto:mlotifjava@gmail.com]
> Gesendet: Mo 18.08.2008 15:11
> An: Tapestry users
> Betreff: Re: "Decorating" Grid rows
>
>
>
> Maybe this thread helps you
>
> http://www.nabble.com/T5%3A-Grid%27s-rowClass-td13810748s302.html#a13810748
>
> read the third post from angelo chen, there's an explanation on how to
> do the "zebra effect"...
>
> Cheers.
>
> On Mon, Aug 18, 2008 at 9:10 AM, Ralf Edmund Stranzenbach <ra...@reswi.de>
> wrote:
> > Hi,
> >
> > one of my application should provide some context aware assistance on the
> > rows of a grid component. While it was really easy to provide some
> feedback
> > by creating specific css classes for the rows, adding of a context aware
> > menu is more complicated.
> >
> > How can i provide some additional code for any row visible in a grid
> > component (a solution with additional columns is in place, but that's not
> > what i want).
> >
> > With regards,
> > Ralf E. Stranzenbach
>
>
>
> --
> Atenciosamente,
>
> Marcelo Lotif
> Programador Java e Tapestry
> FIEC - Federação das Indústrias do Estado do Ceará
> (85) 3477-5910
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>
>
> ***************************************************************************************************
> The information in this email is confidential and may be legally
> privileged. Access to this email by anyone other than the intended addressee
> is unauthorized. If you are not the intended recipient of this message, any
> review, disclosure, copying, distribution, retention, or any action taken or
> omitted to be taken in reliance on it is prohibited and may be unlawful. If
> you are not the intended recipient, please reply to or forward a copy of
> this message to the sender and delete the message, any attachments, and any
> copies thereof from your system.
>
> ***************************************************************************************************
>
> BearingPoint GmbH
> Geschäftsführer: Peter Mockler (Vorsitzender), Marcel Nickler (stellv.
> Vorsitzender), Wilfried Erber, Werner Kreutzmann, Hans-Werner Wurzel
> Aufsichtsratsvorsitzender: Roderick McGeary
> Sitz: Frankfurt am Main
> Registergericht: Amtsgericht Frankfurt am Main HRB 55490
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

AW: "Decorating" Grid rows

Posted by "Stranzenbach, Ralf" <ra...@bearingpoint.com>.
This seems to be a really good solution to create the zebar effect. I-ve tried this using the getter based solution - which worked pretty well. I'll give it a try later this evening.
 
But i need to provide some additional JavaScript code to any row to provide parametrized JavaScript code to activate additional functionality based on the row selected.
 
Sincerly
Ralf
 

________________________________

Von: Marcelo Lotif [mailto:mlotifjava@gmail.com]
Gesendet: Mo 18.08.2008 15:11
An: Tapestry users
Betreff: Re: "Decorating" Grid rows



Maybe this thread helps you

http://www.nabble.com/T5%3A-Grid%27s-rowClass-td13810748s302.html#a13810748

read the third post from angelo chen, there's an explanation on how to
do the "zebra effect"...

Cheers.

On Mon, Aug 18, 2008 at 9:10 AM, Ralf Edmund Stranzenbach <ra...@reswi.de> wrote:
> Hi,
>
> one of my application should provide some context aware assistance on the
> rows of a grid component. While it was really easy to provide some feedback
> by creating specific css classes for the rows, adding of a context aware
> menu is more complicated.
>
> How can i provide some additional code for any row visible in a grid
> component (a solution with additional columns is in place, but that's not
> what i want).
>
> With regards,
> Ralf E. Stranzenbach



--
Atenciosamente,

Marcelo Lotif
Programador Java e Tapestry
FIEC - Federação das Indústrias do Estado do Ceará
(85) 3477-5910

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org




***************************************************************************************************
The information in this email is confidential and may be legally privileged. Access to this email by anyone other than the intended addressee is unauthorized. If you are not the intended recipient of this message, any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you are not the intended recipient, please reply to or forward a copy of this message to the sender and delete the message, any attachments, and any copies thereof from your system.
*************************************************************************************************** 
 
BearingPoint GmbH
Geschäftsführer: Peter Mockler (Vorsitzender), Marcel Nickler (stellv. Vorsitzender), Wilfried Erber, Werner Kreutzmann, Hans-Werner Wurzel
Aufsichtsratsvorsitzender: Roderick McGeary
Sitz: Frankfurt am Main
Registergericht: Amtsgericht Frankfurt am Main HRB 55490

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: "Decorating" Grid rows

Posted by Marcelo Lotif <ml...@gmail.com>.
Maybe this thread helps you

http://www.nabble.com/T5%3A-Grid%27s-rowClass-td13810748s302.html#a13810748

read the third post from angelo chen, there's an explanation on how to
do the "zebra effect"...

Cheers.

On Mon, Aug 18, 2008 at 9:10 AM, Ralf Edmund Stranzenbach <ra...@reswi.de> wrote:
> Hi,
>
> one of my application should provide some context aware assistance on the
> rows of a grid component. While it was really easy to provide some feedback
> by creating specific css classes for the rows, adding of a context aware
> menu is more complicated.
>
> How can i provide some additional code for any row visible in a grid
> component (a solution with additional columns is in place, but that's not
> what i want).
>
> With regards,
> Ralf E. Stranzenbach



-- 
Atenciosamente,

Marcelo Lotif
Programador Java e Tapestry
FIEC - Federação das Indústrias do Estado do Ceará
(85) 3477-5910

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org