You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by imran ali <al...@rediffmail.com> on 2003/10/31 20:04:47 UTC
sending object with query.
Hi All,
I am sending a parameter with query request in this way:
<script>
function foo()
{
url = "/LoanGeniusWeb/pricingQuoteDetail.do?";
url += &object + 'abcd';
document.quoteListForm.action = url;
document.quoteListForm.submit();
}
</script>
Now instead of 'abcd' If I want to pass a collection of object.
How should I do it. I tried it by replacing 'abcd' with a collection.
But it seems this is the way of passing 'parameters' not 'attributes'.
So even if I pass a collection in this way I am getting string representation of collection, not the collection object.
How should I go about it.
Help please. thanx a lot
Imran.
Imran
Re: sending object with query.
Posted by Rajat Pandit <ra...@centergroupinc.com>.
wondering if object serialiazlisation will work for u? the serialized
object can then be passed as a hidden object. ur class will have to
implement an interface.
Affan Qureshi wrote:
> You will have to create a string from the collection of objects you have
> and send it as a hidden variable or query parameter(if length allows)
>
> Affan
>
> imran ali wrote:
>
>> Hi All,
>>
>> I am sending a parameter with query request in this way:
>>
>> <script>
>> function foo()
>> {
>> url = "/LoanGeniusWeb/pricingQuoteDetail.do?";
>> url += &object + 'abcd';
>> document.quoteListForm.action = url;
>> document.quoteListForm.submit();
>> }
>> </script>
>>
>> Now instead of 'abcd' If I want to pass a collection of object.
>> How should I do it. I tried it by replacing 'abcd' with a collection.
>> But it seems this is the way of passing 'parameters' not 'attributes'.
>> So even if I pass a collection in this way I am getting string
>> representation of collection, not the collection object.
>> How should I go about it.
>> Help please. thanx a lot
>>
>> Imran.
>>
>>
>>
>> Imran
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
--
Rajat Pandit | rajatp@centergroupinc.com
+91 612 3117606
[ Developer and Part Time Human Being]
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: sending object with query.
Posted by Affan Qureshi <aq...@etilize.com>.
You will have to create a string from the collection of objects you have
and send it as a hidden variable or query parameter(if length allows)
Affan
imran ali wrote:
> Hi All,
>
> I am sending a parameter with query request in this way:
>
> <script>
> function foo()
> {
> url = "/LoanGeniusWeb/pricingQuoteDetail.do?";
> url += &object + 'abcd';
> document.quoteListForm.action = url;
> document.quoteListForm.submit();
> }
> </script>
>
> Now instead of 'abcd' If I want to pass a collection of object.
> How should I do it. I tried it by replacing 'abcd' with a collection.
> But it seems this is the way of passing 'parameters' not 'attributes'.
> So even if I pass a collection in this way I am getting string representation of collection, not the collection object.
> How should I go about it.
> Help please. thanx a lot
>
> Imran.
>
>
>
> Imran
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: sending object with query.
Posted by Manish Singla <Ma...@Sun.COM>.
"attribute" ( and getAttribute ) is utility of java servlet container.
You cannot have attributes in client script...
General HTTP request do not support "attribute".
imran ali wrote:
> Hi All,
>
> I am sending a parameter with query request in this way:
>
> <script>
> function foo()
> {
> url = "/LoanGeniusWeb/pricingQuoteDetail.do?";
> url += &object + 'abcd';
> document.quoteListForm.action = url;
> document.quoteListForm.submit();
> }
> </script>
>
> Now instead of 'abcd' If I want to pass a collection of object.
> How should I do it. I tried it by replacing 'abcd' with a collection.
> But it seems this is the way of passing 'parameters' not 'attributes'.
> So even if I pass a collection in this way I am getting string representation of collection, not the collection object.
> How should I go about it.
> Help please. thanx a lot
>
> Imran.
>
>
>
> Imran
--
Thanks
Manish Singla
x73166
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org