You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andriy <An...@gmail.com> on 2005/09/09 17:07:24 UTC

How select some value in PropertySelection component?

Hello!

I have a problem with PropertySelection component. I can not set any option as
selected when my page is displayed.
The "value" parameter for the component is defined correctly to some property
(this property changes after selecting some value). And this property is set
correctly when the page is shown. But PropertySelection component shows first
option (and in source of the page none of <option> elements is selected).

Is there any possible way to select some option but dynamically setting
corresponding property as first in the list?

Thanks in advance


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


Re: How select some value in PropertySelection component?

Posted by Ron Piterman <rp...@gmx.net>.
The component points to a value/property which it should set, and 
displays the current value of this property as the selected value when 
the page is displayed:

<select jwcid="@PropertySelection" value="ognl:color" .../>

public abstract Color getColor();

if you set the color property to blue, the PropSel. component will also 
display it.



ציטוט Andriy:
> Hello!
> 
> I have a problem with PropertySelection component. I can not set any option as
> selected when my page is displayed.
> The "value" parameter for the component is defined correctly to some property
> (this property changes after selecting some value). And this property is set
> correctly when the page is shown. But PropertySelection component shows first
> option (and in source of the page none of <option> elements is selected).
> 
> Is there any possible way to select some option but dynamically setting
> corresponding property as first in the list?
> 
> Thanks in advance
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


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