You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Inge Solvoll <ta...@ingenett.com> on 2005/09/29 16:48:27 UTC

Editing int/Integer in a TextField component

For T3

I have run into a problem I didn't except to run into.

I have an object with a property of type int, which I would like to edit 
in a TextField on my page. But I get the following error:

"Parameter value (2) is an instance of java.lang.Integer, which does not 
inherit from java.lang.String."

Is there a solution for this, or do I have to provide a new field of 
type String, that I convert myself? I would not like to do this, since 
it would force me into a less clean solution.

Inge

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


Re: Editing int/Integer in a TextField component

Posted by Peter Ertl <pe...@gmx.org>.
this worked for me

page class:

   @Component(type = "TextField", bindings = { "value=test" })
   public abstract TextField getTestInputField();

   public abstract float getTest();

html template:

<input type="text" jwcid="testInputField" translator="translator:number"/>






> --- Ursprüngliche Nachricht ---
> Von: Inge Solvoll <ta...@ingenett.com>
> An: Tapestry users <ta...@jakarta.apache.org>
> Betreff: Editing int/Integer in a TextField component
> Datum: Thu, 29 Sep 2005 16:48:27 +0200
> 
> For T3
> 
> I have run into a problem I didn't except to run into.
> 
> I have an object with a property of type int, which I would like to edit 
> in a TextField on my page. But I get the following error:
> 
> "Parameter value (2) is an instance of java.lang.Integer, which does not 
> inherit from java.lang.String."
> 
> Is there a solution for this, or do I have to provide a new field of 
> type String, that I convert myself? I would not like to do this, since 
> it would force me into a less clean solution.
> 
> Inge
> 
> ---------------------------------------------------------------------
> 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


Re: Editing int/Integer in a TextField component

Posted by Peter Ertl <pe...@gmx.org>.
I tried it and it works...

Do you have some code snippets?


> --- Ursprüngliche Nachricht ---
> Von: Inge Solvoll <ta...@ingenett.com>
> An: Tapestry users <ta...@jakarta.apache.org>
> Betreff: Editing int/Integer in a TextField component
> Datum: Thu, 29 Sep 2005 16:48:27 +0200
> 
> For T3
> 
> I have run into a problem I didn't except to run into.
> 
> I have an object with a property of type int, which I would like to edit 
> in a TextField on my page. But I get the following error:
> 
> "Parameter value (2) is an instance of java.lang.Integer, which does not 
> inherit from java.lang.String."
> 
> Is there a solution for this, or do I have to provide a new field of 
> type String, that I convert myself? I would not like to do this, since 
> it would force me into a less clean solution.
> 
> Inge
> 
> ---------------------------------------------------------------------
> 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