use <binding name="columns" value="ognl:visibleColumns"/> and add a method in your component class that each time returns whatever is appropriate...
[EMAIL PROTECTED] wrote: > Hi, > > I've simplified this example code to make things (hopefully) clearer, > because what I think I'm trying to do shouldn't be too hard... > > I have a page with a custom component that uses the Table component to > render a list of files that a user has uploaded to my system. > > On one screen, I want to show columns like this: > > | # | Filename | Size | Delete | Move Up | Move Down | > > On the next screen, I want to show columns like this: > > | Id | Filename | Size | PDF Version | > > The two pages are really operating on the same Collection of files, but > between the first and second pages, I do a bunch of processing on the > Collection and assign an ID to each file. (The "#" column on the first > page is just an ordinal numbering). > > The first page is "editable" in that users can click buttons and > manipulate the Collection. The second page is "read only"-- it just > displays what they've already uploaded. > > My question is: assuming I pass a "read only" parameter from the parent > page to the component like this: > > <component id="uploadFileTable" type="UploadFileTable"> > <binding name="files" value="files"/> > <binding name="readonly" value="false"/> <!--- !!! > </component> > > How do I dynamically adjust the binding value for "columns" within the > component's .jwc file? > > <component id="table" type="contrib:Table"> > <binding name="source" value="files"/> > <binding name="columns" > value="literal:!orderId:#:orderId, ? > filename, ? > size, ? > !delete: :delete, ? > !moveUp: :moveUp, ? > !moveDown: :moveDown"/> > </component> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]