Why do you want to include the field then? For display purposes? Why
don't you just simply:
       public void setAccount(String account){
               // do nothing
       }

then override the property in the template just to output the value
rather than render a field?

Kalle

On Tue, Sep 29, 2009 at 11:17 AM, neo anderson
<javadeveloper...@yahoo.co.uk> wrote:
>
> Yes, the User bean contains property named account. But inside the bean it
> does not provide setter method because it is purposed to setup when the bean
> is created e.g. new User(id, account).
>
> The User bean looks as below:
>
> @Entity
> @Table(name="USERS")
> public class User implements Serializable{
>
>       �...@id
>        private String id;
>
>       �...@column(name="ACCOUNT")
>        private String account;
>
>        ...
>
>        public User(String id, String account, String name, String password){
>                this.id = id;
>                this.account = account;
>                this.name = name;
>                this.password = password;
>        }
>
>
>        public String getAccount(){
>                return this.account;
>        }
>
>        /*
>        public void setAccount(String account){
>                this.account = account;
>        }
>        */
>        ...
> }
>
>
> cordenier christophe wrote:
>>
>> But i see in your code
>>
>> <t:textField t:id="account" t:model="user" t:value="user.account"
>> t:validate="required,regexp"/>
>>
>> Does the User bean has an account property ?
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Bean-editor-model-for-User-already-contains-a-property-model-for-property-%27account%27-tp25531292p25668232.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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

Reply via email to