Just use an ognl expression for the "columns" attribute of the table. <table jwcid="@contrib:Table" columns="ognl:'column1, column2, column3' + (isAdminUser ? ',deleteColumn', '')" ...>

Never underestimate the coolness of the terniary operator.

-Steve

[EMAIL PROTECTED] wrote:
Anybody know a simple way to dynamically add a column to a table (using Contrib:Table)? I 
want a table to have a new column with a "Delete" link if the user is an admin. 
I have it working if I by always including the Delete column and the Delete links only 
appear for admins, but I want the column itself to only appear for admins.Any help 
appreciated.
_________________________________________________________________
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to