You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa" <da...@xs4all.nl> on 2004/02/14 18:58:54 UTC

java.lang.Long, which does not inherit from java.lang.String?

Sorry guys,

In b3 this worked fine.
I know Long does not inherit from String but where does this come from?

The getField2bEdited() only retrieves the value (in this case a Long) and 
sends it away (as usual).

Parameter value (0) is an instance of java.lang.Long, which does not 
inherit from java.lang.String.
binding: 	ExpressionBinding[TreeTableTestFlexible field2bEdited]
location: 	classpath:/org/dcg/tests/treetable/TreeTableTestFlexible.page, 
line 144
Stack Trace:

     * 
org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:270)
     * org.apache.tapestry.form.TextField.readValue(TextField.java:77)

Debugger gives a Long with value 0. fieldName.toString() yields a String 
with value 0.

Any suggestions?

TIA
Fermin DCG


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


Re: java.lang.Long, which does not inherit from java.lang.String?

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Someone else had exactly the same problem yesterday. I am not sure how 
this worked in b3 but per specification this is not supposed to work. 
TextField can only be bound to String properties. Other types can only 
be enforced with the ValidField and an appropriate validator AFAIK.

-Harish

F. Da Costa wrote:

> Sorry guys,
>
> In b3 this worked fine.
> I know Long does not inherit from String but where does this come from?
>
> The getField2bEdited() only retrieves the value (in this case a Long) 
> and sends it away (as usual).
>
> Parameter value (0) is an instance of java.lang.Long, which does not 
> inherit from java.lang.String.
> binding:     ExpressionBinding[TreeTableTestFlexible field2bEdited]
> location:     
> classpath:/org/dcg/tests/treetable/TreeTableTestFlexible.page, line 144
> Stack Trace:
>
>     * 
> org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:270) 
>
>     * org.apache.tapestry.form.TextField.readValue(TextField.java:77)
>
> Debugger gives a Long with value 0. fieldName.toString() yields a 
> String with value 0.
>
> Any suggestions?
>
> TIA
> Fermin DCG
>
>
> ---------------------------------------------------------------------
> 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