You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by martin stanik <ma...@hotmail.com> on 2005/05/12 14:54:43 UTC
BindingException
Hallo,
i am getting BindingException, when my program tries save data from form to
bean.
My page file is following:
<page-specification class="examples.CreateAccountPage">
<property-specification name="account" type="examples.Account"/>
<component id="balance" type="TextField">
<binding name="value" expression="account.balance"/>
</component>
In exception dump is stated, that my class does not have setBalance(String)
method.
This is right, as there is just setBalance(BigDecimal) method.
I am complete beginner and i do not know how to configure this
without duplication properties of examples.Account in
examples.CreateAccountPage.
Can I somehow explain to tapestry type of account.balance property?
thanks martin
_________________________________________________________________
Flirt bez vyslovenia jedineho slova s MSN Messenger 6.2
http://messenger.msn.sk/
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: BindingException
Posted by martin stanik <ma...@hotmail.com>.
Yes, it makes sense - in order to obtain a number from user, at least basic
(number format)
validation is necessary. TextField probably does not provide any. There is
only way here - read component reference. If i spent a week reading it, i
could save 2 sick days :-)))
Many thanks, Erik!
>
>TextField only works with String (sadly).
>
>You will either need to convert to/from a String or use the ValidField
>component instead (check the docs to get the details on how to use
>ValidField).
>
> Erik
_________________________________________________________________
MSN Pocasie vam umozni naplanovat si den a tyzden. http://www.msn.sk/weather
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: BindingException
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 12, 2005, at 8:54 AM, martin stanik wrote:
> Hallo,
>
> i am getting BindingException, when my program tries save data from
> form to bean.
> My page file is following:
>
> <page-specification class="examples.CreateAccountPage">
> <property-specification name="account" type="examples.Account"/>
>
> <component id="balance" type="TextField">
> <binding name="value" expression="account.balance"/>
> </component>
>
> In exception dump is stated, that my class does not have setBalance
> (String) method.
> This is right, as there is just setBalance(BigDecimal) method.
> I am complete beginner and i do not know how to configure this
> without duplication properties of examples.Account in
> examples.CreateAccountPage.
> Can I somehow explain to tapestry type of account.balance property?
TextField only works with String (sadly).
You will either need to convert to/from a String or use the
ValidField component instead (check the docs to get the details on
how to use ValidField).
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org