You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Christopher Corde <cc...@yahoo.com> on 2004/02/17 21:04:58 UTC

setting the "selected" attribute of a PropertySelection

Hey,

  Anyone know the easiest way to set the "selected"
value of a PropertySelection? I am using a custom
SelectionModel, which consists simple objects. I tried
setting the "value" property to the one I want
selected, but that does not seem to work.

Thanks,
Chris

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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


Re: setting the "selected" attribute of a PropertySelection

Posted by Harish Krishnaswamy <hk...@comcast.net>.
The getOption() is supposed to return the option object not just the 
value. Well not necesarily but certainly the ideal way. That way when an 
option is selected what you get back in your bound value property is the 
actual object like you would expect.

-Harish

Christopher Corde wrote:

>Thanks, that worked.
>
>I guess where I got confused was I was returning the
>entire object from the getOption() method, where I
>should have been returning the value.
>
>Thanks,
>Chris
>
>--- Harish Krishnaswamy <hk...@comcast.net>
>wrote:
>  
>
>>If that doesn't work it means the object provided
>>your SelectionModel 
>>does not .equals() the value you set in the value
>>property.
>>
>>IOW, SelectionModel.getOption().equals(getValue())
>>should be true.
>>
>>-Harish
>>
>>Christopher Corde wrote:
>>
>>    
>>
>>>Hey,
>>>
>>> Anyone know the easiest way to set the "selected"
>>>value of a PropertySelection? I am using a custom
>>>SelectionModel, which consists simple objects. I
>>>      
>>>
>>tried
>>    
>>
>>>setting the "value" property to the one I want
>>>selected, but that does not seem to work.
>>>
>>>Thanks,
>>>Chris
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>Yahoo! Finance: Get your refund fast by filing
>>>      
>>>
>>online.
>>    
>>
>>>http://taxes.yahoo.com/filing.html
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>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
>>
>>    
>>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Finance: Get your refund fast by filing online.
>http://taxes.yahoo.com/filing.html
>
>---------------------------------------------------------------------
>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


Re: setting the "selected" attribute of a PropertySelection

Posted by Christopher Corde <cc...@yahoo.com>.
Thanks, that worked.

I guess where I got confused was I was returning the
entire object from the getOption() method, where I
should have been returning the value.

Thanks,
Chris

--- Harish Krishnaswamy <hk...@comcast.net>
wrote:
> If that doesn't work it means the object provided
> your SelectionModel 
> does not .equals() the value you set in the value
> property.
> 
> IOW, SelectionModel.getOption().equals(getValue())
> should be true.
> 
> -Harish
> 
> Christopher Corde wrote:
> 
> >Hey,
> >
> >  Anyone know the easiest way to set the "selected"
> >value of a PropertySelection? I am using a custom
> >SelectionModel, which consists simple objects. I
> tried
> >setting the "value" property to the one I want
> >selected, but that does not seem to work.
> >
> >Thanks,
> >Chris
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Finance: Get your refund fast by filing
> online.
> >http://taxes.yahoo.com/filing.html
> >
>
>---------------------------------------------------------------------
> >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
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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


Re: setting the "selected" attribute of a PropertySelection

Posted by Harish Krishnaswamy <hk...@comcast.net>.
If that doesn't work it means the object provided your SelectionModel 
does not .equals() the value you set in the value property.

IOW, SelectionModel.getOption().equals(getValue()) should be true.

-Harish

Christopher Corde wrote:

>Hey,
>
>  Anyone know the easiest way to set the "selected"
>value of a PropertySelection? I am using a custom
>SelectionModel, which consists simple objects. I tried
>setting the "value" property to the one I want
>selected, but that does not seem to work.
>
>Thanks,
>Chris
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Finance: Get your refund fast by filing online.
>http://taxes.yahoo.com/filing.html
>
>---------------------------------------------------------------------
>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