Re: Question about select component

2008-05-17 Thread amebaliu

Hi Serge, thanks a lot, the problem is solved. thank you

SergeEby wrote:
> 
> Hey,
> 
> Assuming you are using version 5.0.11, you can add: blankoption="never" to
> the component definition.
> 
> See details here: 
> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Select.html
> 
> /Serge
> 
> 
> amebaliu wrote:
>> 
>> Hi all, I have a question about select componenet,somehow, my options
>> starts from null, then userone, then usertwo, rahter than start from
>> userone.. I really can not find where is the error..  Hope somebody can
>> help me, thanks a lot
>> Here is my code
>> select t:type="select" t:model="users" t:value="user"/>
>> 
>> @Inject
>>  private Messages messages;
>>  public SelectModel getUsers(){
>>  return new EnumSelectModel(Users.class,messages);
>>  }
>>  
>> @Persist
>>  private Users user;
>>  public Users getUser(){
>>  return this.user;
>>  }
>>  public void setUser(Users user){
>>  this.user = user;
>>  }
>> package test.todolist.model;
>> 
>> public enum Users {
>>  USERONE,USERTWO,USERTHREE
>> }
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-about-select-component-tp17291010p17291637.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Question about select component

2008-05-17 Thread SergeEby

Hey,

Assuming you are using version 5.0.11, you can add: blankoption="never" to
the component definition.

See details here: 
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Select.html

/Serge


amebaliu wrote:
> 
> Hi all, I have a question about select componenet,somehow, my options
> starts from null, then userone, then usertwo, rahter than start from
> userone.. I really can not find where is the error..  Hope somebody can
> help me, thanks a lot
> Here is my code
> select t:type="select" t:model="users" t:value="user"/>
> 
> @Inject
>   private Messages messages;
>   public SelectModel getUsers(){
>   return new EnumSelectModel(Users.class,messages);
>   }
>   
> @Persist
>   private Users user;
>   public Users getUser(){
>   return this.user;
>   }
>   public void setUser(Users user){
>   this.user = user;
>   }
> package test.todolist.model;
> 
> public enum Users {
>   USERONE,USERTWO,USERTHREE
> }
> 

-- 
View this message in context: 
http://www.nabble.com/Question-about-select-component-tp17291010p17291503.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]