You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dwi Ardi Irawan <dw...@nwa.iao.co.id> on 2006/08/27 12:47:24 UTC

How To Set Selected Option For PropertySelection Component ?

i got a form that contain PropertySelection
i want when i change to edit Mode (DirectLink with parameter)....
the PropertySelection automatically to be set based on the parameter 
that i give in HTML

Grid(send the parameter) -> From (Edit Mode set the selected of 
propertySelction)
example
paramater : "a"
propertySelection = {"a", "b", "c"}

when i klik the DirectLink the "a" would be the selected of 
propertySelection

could anyone help me ? 

   




Re: How To Set Selected Option For PropertySelection Component ?

Posted by Dwi Ardi Irawan <dw...@nwa.iao.co.id>.
Thnx very much Shing

dwi ardi irawan
http://dwiardiirawan.blogs.or.id

Shing Hing Man wrote:
> In order to have a particular element selected when
> the page is rendered,
> you need to set the value parameter of your
> PropertySelection model to 
> the desired value.
>
> You can try the following.
> In the PageBeginRenderListener  method :
>
> if (not rewinding){
>   // In render mode
>   desiredElement = get it from your IPropertyModel;
>   set value of PropertySelection model to 
> desiredElement;
>
> }
>
> Shing
>
>
> --- Dwi Ardi Irawan <dw...@nwa.iao.co.id> wrote:
>
>   
>> i got a form that contain PropertySelection
>> i want when i change to edit Mode (DirectLink with
>> parameter)....
>> the PropertySelection automatically to be set based
>> on the parameter 
>> that i give in HTML
>>
>> Grid(send the parameter) -> From (Edit Mode set the
>> selected of 
>> propertySelction)
>> example
>> paramater : "a"
>> propertySelection = {"a", "b", "c"}
>>
>> when i klik the DirectLink the "a" would be the
>> selected of 
>> propertySelection
>>
>> could anyone help me ? 
>>
>>    
>>
>>
>>
>>
>>     
>
>
> Home page :
>   http://uk.geocities.com/matmsh/index.html
>
>
> 		
> ___________________________________________________________ 
> Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
>   

Re: How To Set Selected Option For PropertySelection Component ?

Posted by Shing Hing Man <ma...@yahoo.com>.
In order to have a particular element selected when
the page is rendered,
you need to set the value parameter of your
PropertySelection model to 
the desired value.

You can try the following.
In the PageBeginRenderListener  method :

if (not rewinding){
  // In render mode
  desiredElement = get it from your IPropertyModel;
  set value of PropertySelection model to 
desiredElement;

}

Shing


--- Dwi Ardi Irawan <dw...@nwa.iao.co.id> wrote:

> i got a form that contain PropertySelection
> i want when i change to edit Mode (DirectLink with
> parameter)....
> the PropertySelection automatically to be set based
> on the parameter 
> that i give in HTML
> 
> Grid(send the parameter) -> From (Edit Mode set the
> selected of 
> propertySelction)
> example
> paramater : "a"
> propertySelection = {"a", "b", "c"}
> 
> when i klik the DirectLink the "a" would be the
> selected of 
> propertySelection
> 
> could anyone help me ? 
> 
>    
> 
> 
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html

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