Re: Bean editor model for User already contains a property model for property 'account'

2009-10-02 Thread neo anderson
You are right. I think this is the scenario issue. I should use other way (e.g. intermediate bean) for gethering User information. Thanks for all your help. That helps me have better understanding on related Tapestry mechanism. I appreacite it. : ) cordenier christophe wrote: > > If your pu

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-30 Thread cordenier christophe
If your purpose is to secure your bean property, i think you should create an intermediate bean for your User creation. Tapestry Form properties are mapped to bean properties, and properties are set simply via accessors. Tapestry requires an empty constructor to your bean, and this is how Tapestry

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread Martin Strand
I didn't read the entire thread, but if this particular field has no setter you can add a synthetic property with model.add("account", null) and then provide a proper block override as outlined in the guide under "Property Editor Overrides": http://tapestry.apache.org/tapestry5.1/guide/beaneditf

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread neo anderson
The reason to remove the setter method (setAccount(String)) is because the filed `account' is originally purposed to be created once only when e.g. user registers. Therefore, the account field would not be changed/ edited after User object created. But it looks like BeanModel can not add e.g. ac

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread Thiago H. de Paula Figueiredo
Em Tue, 29 Sep 2009 18:35:39 -0300, neo anderson escreveu: If I tried to delete the account property first (e.g. exclude("account"). Is this correct?), then adding using model.add("account"). The error becomes You should use model.add("account", somePropertyConduitInstance) in this case

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread neo anderson
The reason why setAccount is removed is because account field is purposed to be created only when user registers. It is not purposed to be altered once the account is created. So the to remove setAccount(String) is to prevent other class falsely calling setAccount(String) accidentally. In fact,

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread neo anderson
If I tried to delete the account property first (e.g. exclude("account"). Is this correct?), then adding using model.add("account"). The error becomes Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Expression 'user.account' for class org.jecommerce.pages.Register is read-on

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread Kalle Korhonen
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, 2

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread Thiago H. de Paula Figueiredo
Em Tue, 29 Sep 2009 15:17:39 -0300, neo anderson escreveu: 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). Have you tried to delete the property

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread neo anderson
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{

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread cordenier christophe
But i see in your code Does the User bean has an account property ?

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread neo anderson
) >> >> so >> >> > that it won't throw this error? >> >> > >> >> > Thanks for help. >> >> > >> >> > >> >> > >> >> > Thiago H. de Paula Figueiredo wrote: >> >> >> >> >> &g

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-29 Thread cordenier christophe
t;> > >> > >> > http://www.nabble.com/T5%3A-Working-with-BeanModel-td18231888.html#a18352011 > >> > >> > >> > >> > >> ccordenier wrote: > >> > > >> > What corresponds to line 92 in your code ? >

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-28 Thread neo anderson
t; >> > What corresponds to line 92 in your code ? >> > >> > -----Message d'origine- >> > De : neo anderson [mailto:javadeveloper...@yahoo.co.uk] >> > Envoyé : lundi 28 septembre 2009 14:23 >> > À : users@tapestry.

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-28 Thread cordenier christophe
odel-td18231888.html#a18352011 > > > > > ccordenier wrote: > > > > What corresponds to line 92 in your code ? > > > > -Message d'origine- > > De : neo anderson [mailto:javadeveloper...@yahoo.co.uk] > > Envoyé : lundi 28 septembre 2009 14:

RE: Bean editor model for User already contains a property model for property 'account'

2009-09-28 Thread neo anderson
rote: > > What corresponds to line 92 in your code ? > > -Message d'origine- > De : neo anderson [mailto:javadeveloper...@yahoo.co.uk] > Envoyé : lundi 28 septembre 2009 14:23 > À : users@tapestry.apache.org > Objet : Re: Bean editor model for User already conta

RE: Bean editor model for User already contains a property model for property 'account'

2009-09-28 Thread Cordenier Christophe
What corresponds to line 92 in your code ? -Message d'origine- De : neo anderson [mailto:javadeveloper...@yahoo.co.uk] Envoyé : lundi 28 septembre 2009 14:23 À : users@tapestry.apache.org Objet : Re: Bean editor model for User already contains a property model for property &#x

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-28 Thread neo anderson
ean editor model for User does not >> contain a property named 'account'. Available properties: address, name, >> password, sex. > > You can't reorder a model using some property that doesn't exist. > >> Caused by: java.lang.RuntimeException: Bean editor m

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-23 Thread Thiago H. de Paula Figueiredo
del for User does not contain a property named 'account'. Available properties: address, name, password, sex. You can't reorder a model using some property that doesn't exist. Caused by: java.lang.RuntimeException: Bean editor model for User already contains a property model for

Re: Bean editor model for User already contains a property model for property 'account'

2009-09-23 Thread neo anderson
Sorry, the User object should be public class User{ private String account; public User(... String account, ...){ ... this.account = account; } ... public String getAccount(){ return this.account } // public void setAccount(String account){ // this.account

Bean editor model for User already contains a property model for property 'account'

2009-09-23 Thread neo anderson
gister (the display of beaneditform for the html web page Register.tml is correctly shown on the browser). Error: Caused by: java.lang.RuntimeException: Bean editor model for User already contains a property model for property 'account'. at org.apache.tapestry5.internal.be