You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <p....@albourne.com> on 2007/03/01 13:41:56 UTC

Tapestry 4.1.1 Hidden field truncates characters

Hi all,

In my page I use a hidden field to store a name bound to  a string 
property, this works fine most of the time, but I have an unusual 
situation sometimes when I submit, and the value is a sequence of say 
three characters ('ccc'), it gets truncated. Surely someone has had a 
similar situation, have I missed something? might this have something to 
do with the type casting mechanism in the framework for the 'Hidden' 
component? As soon as I change the component to a TextField, magically 
it no longer truncates...  I do use JavaScript to submit, but that 
shouldn't make any difference, any ideas?

This is the basic outline:
<script>

function SubmitForm(){
    ....//some processing
    document.forms[0].pname.value = 
document.getElementById('CopiedPortfolio').value;
    document.forms[0].submit();
}
</script>

<form jwcid="@Form" listener="listener:formSubmit" method="post">
    <input jwcid="pname@Hidden" value="ognl:portfolioName"/>


    <input id="CopiedPortfolio" type="text" value="">


    <input type="button" onclick="SubmitForm()" value="Create Portfolio">
</form>

I am forced to use this as a workaround:

<span style="display:none;">
    <input jwcid="pname@TextField" value="ognl:portfolioName"/>
</span>

Kind regards,
Peter

-- 
Peter Stavrinides
Albourne Partners (Cyprus) Ltd
Tel: +357 22 750652 

If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. 



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


Re: Tapestry 5 screencasts for download ?

Posted by Renat Zubairov <re...@gmail.com>.
I guess you can directly download them from the page by the source

For example

http://howardlewisship.com/screencasts/tapestry5_screencast5.mov

From

http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-project/trunk/src/site/resources/screencast_5.html?view=markup

On 06/03/07, Dwi Ardi Irawan <dw...@nwa.iao.co.id> wrote:
> Is there Tapestry 5 screencasts for download ?
>
>
> dwi ardi irawan
>
> http://dwiardiirawan.blogspot.com
>


-- 
Best regards,
Renat Zubairov

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


Tapestry 5 screencasts for download ?

Posted by Dwi Ardi Irawan <dw...@nwa.iao.co.id>.
Is there Tapestry 5 screencasts for download ?


dwi ardi irawan

http://dwiardiirawan.blogspot.com

Re: Tapestry 4.1.1 Hidden field truncates characters

Posted by Jesse Kuhnert <jk...@gmail.com>.
Yeah...I'm sure 'c' is claimed by one of the DataSqueezer
implementations for encoding data.

On 3/1/07, Julian Wood <wo...@ucalgary.ca> wrote:
> Have you tried setting encode to false on the hidden field?
>
> J
>
> On 1-Mar-07, at 5:41 AM, Peter Stavrinides wrote:
>
> > Hi all,
> >
> > In my page I use a hidden field to store a name bound to  a string
> > property, this works fine most of the time, but I have an unusual
> > situation sometimes when I submit, and the value is a sequence of
> > say three characters ('ccc'), it gets truncated. Surely someone has
> > had a similar situation, have I missed something? might this have
> > something to do with the type casting mechanism in the framework
> > for the 'Hidden' component? As soon as I change the component to a
> > TextField, magically it no longer truncates...  I do use JavaScript
> > to submit, but that shouldn't make any difference, any ideas?
> >
> > This is the basic outline:
> > <script>
> >
> > function SubmitForm(){
> >    ....//some processing
> >    document.forms[0].pname.value = document.getElementById
> > ('CopiedPortfolio').value;
> >    document.forms[0].submit();
> > }
> > </script>
> >
> > <form jwcid="@Form" listener="listener:formSubmit" method="post">
> >    <input jwcid="pname@Hidden" value="ognl:portfolioName"/>
>
> --
> Julian Wood <wo...@ucalgary.ca>
>
> Software Engineer
> Teaching & Learning Centre
> University of Calgary
>
> http://tlc.ucalgary.ca
>
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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


Re: Tapestry 4.1.1 Hidden field truncates characters

Posted by Julian Wood <wo...@ucalgary.ca>.
Have you tried setting encode to false on the hidden field?

J

On 1-Mar-07, at 5:41 AM, Peter Stavrinides wrote:

> Hi all,
>
> In my page I use a hidden field to store a name bound to  a string  
> property, this works fine most of the time, but I have an unusual  
> situation sometimes when I submit, and the value is a sequence of  
> say three characters ('ccc'), it gets truncated. Surely someone has  
> had a similar situation, have I missed something? might this have  
> something to do with the type casting mechanism in the framework  
> for the 'Hidden' component? As soon as I change the component to a  
> TextField, magically it no longer truncates...  I do use JavaScript  
> to submit, but that shouldn't make any difference, any ideas?
>
> This is the basic outline:
> <script>
>
> function SubmitForm(){
>    ....//some processing
>    document.forms[0].pname.value = document.getElementById 
> ('CopiedPortfolio').value;
>    document.forms[0].submit();
> }
> </script>
>
> <form jwcid="@Form" listener="listener:formSubmit" method="post">
>    <input jwcid="pname@Hidden" value="ognl:portfolioName"/>

--
Julian Wood <wo...@ucalgary.ca>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca