Conditional Command Columns

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Conditional Command Columns

Joel Turnbull

Is there a way to conditionally display the contents of a command column for certain rows of a MAReport?

Say I only wanted to be able to remove an object if it's name isn't 'b'

Name
a          edit   remove
b          edit
c          edit   remove


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Conditional Command Columns

Lukas Renggli
Try with something along ....

aReport addColumn: (MAColumn new
    format: [ :obj :html | self renderActionsFor: obj on: html ];
    title: '';
    yourself)

and implement #renderActionsFor:on: as you wish using Seaside code.

Lukas

On Mon, Mar 23, 2009 at 1:52 PM, Joel Turnbull <[hidden email]> wrote:

>
> Is there a way to conditionally display the contents of a command column for
> certain rows of a MAReport?
> Say I only wanted to be able to remove an object if it's name isn't 'b'
> Name
> a          edit   remove
> b          edit
> c          edit   remove
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Conditional Command Columns

Lukas Renggli
In reply to this post by Joel Turnbull
Try with something along ....

aReport addColumn: (MAColumn new
    title: '';
    format: [ :obj :html | self renderActionsFor: obj on: html ];
    yourself)

and implement #renderActionsFor:on: as you wish common Seaside rendering code.

Lukas

On Mon, Mar 23, 2009 at 1:52 PM, Joel Turnbull <[hidden email]> wrote:

>
> Is there a way to conditionally display the contents of a command column for
> certain rows of a MAReport?
> Say I only wanted to be able to remove an object if it's name isn't 'b'
> Name
> a          edit   remove
> b          edit
> c          edit   remove
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
http://www.lukas-renggli.ch



On Mon, Mar 23, 2009 at 1:52 PM, Joel Turnbull <[hidden email]> wrote:

>
> Is there a way to conditionally display the contents of a command column for
> certain rows of a MAReport?
> Say I only wanted to be able to remove an object if it's name isn't 'b'
> Name
> a          edit   remove
> b          edit
> c          edit   remove
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>



--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki