Re: [Stripes-users] stripes:hidden malfunction ?

Subject:   Re: [Stripes-users] stripes:hidden malfunction ? (find more)
From:  
Date:   Dec 22, 2005 11:12

Return-Path: <hidden>
Received: by 10.65.249.6 with HTTP; Thu, 22 Dec 2005 08:12:18 -0800 (PST)
Message-ID: <hidden>
Date: Thu, 22 Dec 2005 17:12:18 +0100
From: Lukas Vlcek <hidden>
Reply-To: hidden
Sender: hidden
To: hidden
Subject: Re: [Stripes-users] stripes:hidden malfunction ?
In-Reply-To: <hidden>
Errors-To: hidden
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Original-To: hidden
Delivered-To: hidden
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
        b=gnFRaY2irkcNYogol8Z41Ot9qpgEd+08lSk4qrYql59pwHXStY4ijjFswEOogyGJrdG9A0jrfnIz8dN8QCPC0aQfYFApsxHRMWkikaLmWgOIZWttMA2/wbwrrPQ+B5ircii3//6MBdQrNghyAl96pWody73hDkQ384akx4xRfig=
Content-Disposition: inline
References: <hidden>
  <hidden>
X-Spam-Score: 0.0 (/)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
 See http://spamassassin.org/tag/ for more details.
 Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001
 0.0 RCVD_BY_IP             Received by mail server with no name
X-BeenThere: hidden
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
X-Reply-To: hidden
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/stripes-users&gt;,
 <mailto:hidden?subject=unsubscribe>
List-Id: A list for dicussing building applications with Stripes. <stripes-users.lists.sourceforge.net>
List-Post: <mailto:hidden>
List-Help: <mailto:hidden?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/stripes-users&gt;,
 <mailto:hidden?subject=subscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=stripes-users>
Status:

Tim,

Using *plain old* html hidden input tag should work I think.
I was so stripes centric that I didn't think of using other possibilities :=
-)
Thanks for tip, I'll give it a try.

Anyway, do you have any reason why you choose the specific order of
re-population strategy? Let's say I can make workaround for now using
directly html input tag and leaving stripes away. But what if I can't
leave stripes out the next time? I just won't be able to get desired
functionality with stripes! Doesn't this scare you? ;-D

Lukas

On 12/22/05, Tim Fennell <hidden> wrote:
> Hey Lukas,
>
> Right now there is no way to do what you want to do with the Stripes
> hidden field tag.  But, I think the simplest solution by far would
> just be to use a non-stripes hidden field.  The Stripes tags follow a
> strict re-population strategy that accepts the first non-null value
> found in the following order:
>         - HttpRequest parameters
>         - ActionBean properties
>         - Default values on the JSP
>
> But it sounds like what you're doing doesn't really need any of the
> "value-add" properties of the stripes:hidden tag like auto-
> repopulation under error etc.  More like you just want it to always
> hold a specific value from a bean in request scope.  In that case I'd
> just write:
>         <input type=3D"hidden" name=3D"foo" value=3D"${foo}"/>
> and leave it at that.  Will this work for you?
>
> -t
>
> On Dec 22, 2005, at 8:48 AM, Lukas Vlcek wrote:
>
> > Hi,
> >
> > I am experiencing strange behavior of stripes:hidden tag. I am not
> > sure if this is a bug or correct behavior, anyway here is the problem
> > description:
> >
> > I have a form on my JSP with hidden input foo. I populate its value
> > from javascript (form.foo.value =3D 'XYZ';) and then I call
> > form.submit().
> >
> > Thus request with URL parameter foo=3DXYZ is created and sent to action=
.
> >
> > In action I get value of foo and then I reset foo (setFoo("")) and
> > store *empty* foo value in request. Then forward to JSP. It is
> > important to note that it is the same/original JSP.
> >
> > In JSP I have something like
> > <c:out value=3D"${foo}"/>
> > <stripes:hiddne name=3D"foo" value=3D"${foo}">
> >
> > It is clear that there is still URLparameter foo=3DXYZ in the request.
> > However foo value stored in request score is empty (which I proved by
> > <c:out value=3D"${foo}"/>) but hidden input does not reflects that and
> > it takes the value from URL parameter. So the hidden input value of
> > foo is still XYZ which I don't think is correct.
> >
> > Interestingly, I found that if there is <stripes:hiddne name=3D"foo"
> > value=3D"dummy"> in JSP and this JSP is called with foo URL parameter
> > (again it can be foo=3DXYZ), then this hidden value is overriden. It
> > results to <input type=3Dhidden name=3D'foo' value=3D'XYZ'> instead of
> > <input type=3Dhidden name=3D'foo' value=3D'dummy'>.
> >
> > This seems very confusing to me.
> >
> > Is there any way how make stripes:hidden tag reflect the real value of
> > request scoped ${foo} instead of foo=3DXYZ URL parameter?
> >
> > Regards,
> > Lukas
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> > log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD
> > SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dclick
> > _______________________________________________
> > Stripes-users mailing list
> > hidden
> > https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id=16865&opclick
> _______________________________________________
> Stripes-users mailing list
> hidden
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log file=
s
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id=16865&op=3Dclick
_______________________________________________
Stripes-users mailing list
hidden
https://lists.sourceforge.net/lists/listinfo/stripes-users