You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by da...@ps.ge.com on 2004/01/22 14:54:50 UTC

3.0-beta-3 DataSqueezer problem

I have a page that has a field in a form that looks like this:

<input jwcid="passwordField@Hidden" value="ognl:password"/>

The field contains a hex md5 hash.  Upon submitting the form that this is
in, I receive this error:

------------------------------------------
java.lang.NumberFormatException 
For input string: "7d468948a3d31225dee615ba85f37d7f" 
Stack Trace: 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48
) 
java.lang.Integer.parseInt(Integer.java:435) 
java.lang.Integer.<init>(Integer.java:567) 
org.apache.tapestry.util.io.IntegerAdaptor.unsqueeze(IntegerAdaptor.java:97)

org.apache.tapestry.util.io.DataSqueezer.unsqueeze(DataSqueezer.java:268) 
org.apache.tapestry.form.Hidden.renderComponent(Hidden.java:128) 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:880) 
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:657)

org.apache.tapestry.form.Form.renderComponent(Form.java:396) 
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:880) 
org.apache.tapestry.form.Form.rewind(Form.java:602) 
org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:475) 
org.apache.tapestry.form.Form.trigger(Form.java:616) 
org.apache.tapestry.engine.DirectService.service(DirectService.java:210) 
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:912) 
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238
) 
org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:367) 
------------------------------------------

After this happened, I did some research and then tried to set the "encode"
parameter to false:

<input jwcid="passwordField@Hidden" value="ognl:password" encode="false"/>

I still get the same error with this.

Is this a known bug in Tapestry 3.0b3, or am I doing something wrong here?
I am not sure why that DataSqueezer wants to make this value into an
integer, when it is clearly not an integer.  Any help is appreciated.

-Dave

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


Re: 3.0-beta-3 DataSqueezer problem

Posted by Programozás <pr...@hotmail.com>.
I had problems with encoded DirectLink parameters. I had several DirectLinks
(generated by a Foreach), and each DirectLink had Calendar instances as
parameters. The generated URLs were very long, and IE6 did not invoke these
links. Mozilla and Opera was OK.

My fix was very simple, I changed the type of the parameters from Calendar
to int, using Calendar.getTime().getTime(). Although my listener code became
a little bit more complex.

N.

----- Original Message ----- 
From: <da...@ps.ge.com>
To: <ta...@jakarta.apache.org>
Sent: Thursday, January 22, 2004 2:54 PM
Subject: 3.0-beta-3 DataSqueezer problem


> I have a page that has a field in a form that looks like this:
>
> <input jwcid="passwordField@Hidden" value="ognl:password"/>
>
> The field contains a hex md5 hash.  Upon submitting the form that this is
> in, I receive this error:
>
> ------------------------------------------
> java.lang.NumberFormatException
> For input string: "7d468948a3d31225dee615ba85f37d7f"
> Stack Trace:
>
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48
> )
> java.lang.Integer.parseInt(Integer.java:435)
> java.lang.Integer.<init>(Integer.java:567)
>
org.apache.tapestry.util.io.IntegerAdaptor.unsqueeze(IntegerAdaptor.java:97)
>
> org.apache.tapestry.util.io.DataSqueezer.unsqueeze(DataSqueezer.java:268)
> org.apache.tapestry.form.Hidden.renderComponent(Hidden.java:128)
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:880)
>
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:657)
>
> org.apache.tapestry.form.Form.renderComponent(Form.java:396)
> org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:880)
> org.apache.tapestry.form.Form.rewind(Form.java:602)
> org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:475)
> org.apache.tapestry.form.Form.trigger(Form.java:616)
> org.apache.tapestry.engine.DirectService.service(DirectService.java:210)
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:912)
>
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238
> )
> org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:367)
> ------------------------------------------
>
> After this happened, I did some research and then tried to set the
"encode"
> parameter to false:
>
> <input jwcid="passwordField@Hidden" value="ognl:password" encode="false"/>
>
> I still get the same error with this.
>
> Is this a known bug in Tapestry 3.0b3, or am I doing something wrong here?
> I am not sure why that DataSqueezer wants to make this value into an
> integer, when it is clearly not an integer.  Any help is appreciated.
>
> -Dave
>
> ---------------------------------------------------------------------
> 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: 3.0-beta-3 DataSqueezer problem

Posted by Richard Kirby <rb...@capdm.com>.
david.dombrosky@ps.ge.com wrote:

>I have a page that has a field in a form that looks like this:
>
><input jwcid="passwordField@Hidden" value="ognl:password"/>
>
>The field contains a hex md5 hash.  Upon submitting the form that this is
>in, I receive this error:
>
>------------------------------------------
>java.lang.NumberFormatException 
>For input string: "7d468948a3d31225dee615ba85f37d7f" 
>Stack Trace: 
>java.lang.NumberFormatException.forInputString(NumberFormatException.java:48
>) 
>java.lang.Integer.parseInt(Integer.java:435) 
>java.lang.Integer.<init>(Integer.java:567) 
>org.apache.tapestry.util.io.IntegerAdaptor.unsqueeze(IntegerAdaptor.java:97)
>
>org.apache.tapestry.util.io.DataSqueezer.unsqueeze(DataSqueezer.java:268) 
>org.apache.tapestry.form.Hidden.renderComponent(Hidden.java:128) 
>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:880) 
>org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:657)
>
>org.apache.tapestry.form.Form.renderComponent(Form.java:396) 
>org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:880) 
>org.apache.tapestry.form.Form.rewind(Form.java:602) 
>org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:475) 
>org.apache.tapestry.form.Form.trigger(Form.java:616) 
>org.apache.tapestry.engine.DirectService.service(DirectService.java:210) 
>org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:912) 
>org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238
>) 
>org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:367) 
>------------------------------------------
>
>After this happened, I did some research and then tried to set the "encode"
>parameter to false:
>
><input jwcid="passwordField@Hidden" value="ognl:password" encode="false"/>
>
>I still get the same error with this.
>  
>

You are on the right lines - try encode="ognl:false". The problem as you 
probably guessed, is that the DataSqueezer is trying to convert a string 
that happens to start with a number, into a number. The encode property 
is there to stop this from happening.

Richard.


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