I got that to work, it's great, I hadn't notice all the values can have a prefix to change the scope.
The problem is that the method that returns the option values and sets the blankOption value is invoked after the blankOption getter. This is a problem I have hit before where a property value depends on the result of a property value that is invoked later. I don't really want to store results in the session and am wondering if I should use a cache instead. Is there any recomended approach in Tapestry? Maybe I should use ehCache? My typical example is a property that returns a collection from a DAO to iterate over for a table or select list, and then some other property whos state depends on that result in some way. So far I have been using intermediate helper beans to bind the related state data. John ----- Original Message ----- From: Geoff Callender To: Tapestry users Sent: Sunday, December 30, 2012 1:37 PM Subject: Re: select blankOption Ah, so you were. Same applies. On 31/12/2012, at 12:24 AM, John wrote: > I was talking about blankOption, but I'll try with the prop prefix. > ----- Original Message ----- > From: Geoff Callender > To: Tapestry users > Sent: Sunday, December 30, 2012 12:16 PM > Subject: Re: select blankOption > > > The default prefix is "literal". Use "prop", eg. blankLabel="prop:yourProperty". > > See Binding Expressions in http://tapestry.apache.org/component-parameters.html . > > Cheers, > > Geoff > > On 30/12/2012, at 11:07 PM, John wrote: > >> I would like to choose dynamically whether to display the blank option in my select component. >> >> I am using it to display an ALL value and don't want to show this if the select has only 1 option. >> >> Unfortunately the docs say that the blankOption is a literal and not a property. Is there any way to change that easily? >> >> Maybe it's easiest just to add a new option with the name and value I want? >> >> John > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org