You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chawla, Yogesh" <yo...@hpsglobal.com> on 2003/09/18 16:45:54 UTC

REPOST: IMP :: Defining a single parameter when returning Collect ion of F orm Beans as Request Attribute

Hi,
I am returning a collection of Form Beans form where I iterate and get the
results of my serach page. This collection I put into the request attribute.

However, I have some common attributes like page no which are not bean
parameters but are one single value for the whole search page like a
parameter called "pageNo".

Now when I use the html:hidden, it requires the property="pageNo" to be a
bean parameter !!
And gives error when I pass this as request object. As under ::

<html:hidden property="pageNo"
value="<%=Integer.parseInt((String)request.getAttribute("pageNo"))%>">

Anybody can give ideas for this: 

Another Design Issue : Search Results page, how to return the set of Form
Beans ? Whats the best approach.

When the validate method fails, it is able to read any attributes which were
being picked from the request.getAttribute() call.


Thanks for your advice !!

Yogesh
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorised.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you.

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


Re: REPOST: IMP :: Defining a single parameter when returning Collection of F orm Beans as Request Attribute

Posted by Sgarlata Matt <sg...@bah.com>.
If you are using <html:hidden> then the hidden parameter you are passing
MUST be a property of the form bean.  A simple work-around is to just use
<input type="hidden"> directly instead of using the Struts HTML taglib.

Search results is a long discussion, and I'm not sure what the best
practices are.  There's no info in the archives?

Matt
----- Original Message ----- 
From: "Chawla, Yogesh" <yo...@hpsglobal.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Thursday, September 18, 2003 10:45 AM
Subject: REPOST: IMP :: Defining a single parameter when returning
Collection of F orm Beans as Request Attribute


>
> Hi,
> I am returning a collection of Form Beans form where I iterate and get the
> results of my serach page. This collection I put into the request
attribute.
>
> However, I have some common attributes like page no which are not bean
> parameters but are one single value for the whole search page like a
> parameter called "pageNo".
>
> Now when I use the html:hidden, it requires the property="pageNo" to be a
> bean parameter !!
> And gives error when I pass this as request object. As under ::
>
> <html:hidden property="pageNo"
> value="<%=Integer.parseInt((String)request.getAttribute("pageNo"))%>">
>
> Anybody can give ideas for this:
>
> Another Design Issue : Search Results page, how to return the set of Form
> Beans ? Whats the best approach.
>
> When the validate method fails, it is able to read any attributes which
were
> being picked from the request.getAttribute() call.
>
>
> Thanks for your advice !!
>
> Yogesh
> DISCLAIMER: The information in this message is confidential and may be
> legally privileged. It is intended solely for the addressee.  Access to
this
> message by anyone else is unauthorised.  If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or any
> action or omission taken by you in reliance on it, is prohibited and may
be
> unlawful.  Please immediately contact the sender if you have received this
> message in error. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> DISCLAIMER: The information in this message is confidential and may be
> legally privileged. It is intended solely for the addressee.  Access to
this
> message by anyone else is unauthorised.  If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or any
> action or omission taken by you in reliance on it, is prohibited and may
be
> unlawful.  Please immediately contact the sender if you have received this
> message in error. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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