You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by RajaSekhar KS <ks...@gmail.com> on 2005/06/03 18:37:29 UTC

How to Set default object in PropertySelection.

I have a property selection(DropDown list) and it contains a list of
users and i created usersmodel class for iteration and i am getting
the drop down list displayed.
Now what i want to know is how do i set the default user in that drop downlist.

Example:
i have user1 to user100 in drop down list, and now i have to set
user22 as default.

Regards,
RajaSekhar K S

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


Re: How to Set default object in PropertySelection.

Posted by Srinivasan Ranganathan <sr...@gmail.com>.
If you have a list of User objects called userList that the
PropertySelect uses, make sure you assign the user object that you
want to use as the default to the value parameter of PropertySelect.
you may have to go through the userList to select the default one if
you don't already have it to do this.

Srini


On 6/4/05, Andreas Andreou <an...@di.uoa.gr> wrote:
> In the property component you also specify a value argument, which will
> store
> the selected item ( value="ognl:selectedUsed" ).
> However, this value is also used during rendering to specify which of
> the "combo" items will be the
> selected one.
> So, you just need to initialize (for instance in pageLoad) the
> selectedUser object...
> 
> RajaSekhar KS wrote:
> 
> >I have a property selection(DropDown list) and it contains a list of
> >users and i created usersmodel class for iteration and i am getting
> >the drop down list displayed.
> >Now what i want to know is how do i set the default user in that drop downlist.
> >
> >Example:
> >i have user1 to user100 in drop down list, and now i have to set
> >user22 as default.
> >
> >Regards,
> >RajaSekhar K S
> >
> >---------------------------------------------------------------------
> >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
> 
>

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


Re: How to Set default object in PropertySelection.

Posted by Andreas Andreou <an...@di.uoa.gr>.
In the property component you also specify a value argument, which will 
store
the selected item ( value="ognl:selectedUsed" ).
However, this value is also used during rendering to specify which of 
the "combo" items will be the
selected one.
So, you just need to initialize (for instance in pageLoad) the 
selectedUser object...

RajaSekhar KS wrote:

>I have a property selection(DropDown list) and it contains a list of
>users and i created usersmodel class for iteration and i am getting
>the drop down list displayed.
>Now what i want to know is how do i set the default user in that drop downlist.
>
>Example:
>i have user1 to user100 in drop down list, and now i have to set
>user22 as default.
>
>Regards,
>RajaSekhar K S
>
>---------------------------------------------------------------------
>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