You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kris16 <kr...@tietoenator.com> on 2007/06/15 14:58:53 UTC

Gets ParametersInterceptor error when trying to set values in a list, eg. tmpList[0].name

Hi,
we have problems with setting HIDDEN values in an array list on a web page.
The problem code in the jsp page looks like this:


<s:submit method="addProducts" value="Lägg till" theme="simple"/>	

<s:iterator value="existingProductOfferings" status="row">

 <s:hidden name="existingProductOfferings[%{#row.index}].productOffering.id"
value="%{productOffering.id}"/>

 <s:hidden
name="existingProductOfferings[%{#row.index}].productOffering.name"
value="%{productOffering.name}"/>

</s:iterator>	




The problem seems to be that the object that are to be set is a list,
existingProductOfferings[%{#row.index}]


The error appeared when we upgraded the following libraries:
Struts2-core from 2.0.6 to 2.0.8
Struts-menu from 2.4.2 to 2.4.3
Struts2-spring-plugun 2.0.6 to 2.0.8


With the old libraries it works fine, but with the new libraries the HIDDEN
values are not set when we do a submit, and run the action method
addProducts.

When we do the submit we get the following error:

[ERROR,2007-06-15
14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
'existingProductOfferings[0].productOffering.id' on 'class
com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
expression 'existingProductOfferings[0].productOffering.id' with value
'[Ljava.lang.String;@1aa7a6a'

[ERROR,2007-06-15
14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
'existingProductOfferings[0].productOffering.name' on 'class
com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
expression 'existingProductOfferings[0].productOffering.name' with value
'[Ljava.lang.String;@14ae5cd'

Is this a bug in the new libraries ?

/Regards Krister



-- 
View this message in context: http://www.nabble.com/Gets-ParametersInterceptor-error-when-trying-to-set-values-in-a-list%2C-eg.-tmpList-0-.name-tf3927728.html#a11138980
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Gets ParametersInterceptor error when trying to set values in a list, eg. tmpList[0].name

Posted by Musachy Barroso <mu...@gmail.com>.
http://struts.apache.org/2.x/docs/type-conversion.html

regards
musachy

On 6/17/07, kris16 <kr...@tietoenator.com> wrote:
>
>
> Hi Adam,
> I tried to search for a "conversions.properties" file in the documentation
> but dit not find any example.
> I have never used the "conversions.properties" file, so could you please
> explain the solution a bit more or give me an example ?
>
> /Regards Krister
>
>
>
> Adam Ruggles wrote:
> >
> > Try adding a conversions.properties file to your action.
> >
> > kris16 wrote:
> >> Hi,
> >> we have problems with setting HIDDEN values in an array list on a web
> >> page.
> >> The problem code in the jsp page looks like this:
> >>
> >>
> >> <s:submit method="addProducts" value="Lägg till" theme="simple"/>
> >>
> >> <s:iterator value="existingProductOfferings" status="row">
> >>
> >>  <s:hidden
> >> name="existingProductOfferings[%{#row.index}].productOffering.id"
> >> value="%{productOffering.id}"/>
> >>
> >>  <s:hidden
> >> name="existingProductOfferings[%{#row.index}].productOffering.name"
> >> value="%{productOffering.name}"/>
> >>
> >> </s:iterator>
> >>
> >>
> >>
> >>
> >> The problem seems to be that the object that are to be set is a list,
> >> existingProductOfferings[%{#row.index}]
> >>
> >>
> >> The error appeared when we upgraded the following libraries:
> >> Struts2-core from 2.0.6 to 2.0.8
> >> Struts-menu from 2.4.2 to 2.4.3
> >> Struts2-spring-plugun 2.0.6 to 2.0.8
> >>
> >>
> >> With the old libraries it works fine, but with the new libraries the
> >> HIDDEN
> >> values are not set when we do a submit, and run the action method
> >> addProducts.
> >>
> >> When we do the submit we get the following error:
> >>
> >> [ERROR,2007-06-15
> >> 14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
> >> ParametersInterceptor - [setParameters]: Unexpected Exception caught
> >> setting
> >> 'existingProductOfferings[0].productOffering.id' on 'class
> >> com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
> >> expression 'existingProductOfferings[0].productOffering.id' with value
> >> '[Ljava.lang.String;@1aa7a6a'
> >>
> >> [ERROR,2007-06-15
> >> 14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
> >> ParametersInterceptor - [setParameters]: Unexpected Exception caught
> >> setting
> >> 'existingProductOfferings[0].productOffering.name' on 'class
> >> com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
> >> expression 'existingProductOfferings[0].productOffering.name' with
> value
> >> '[Ljava.lang.String;@14ae5cd'
> >>
> >> Is this a bug in the new libraries ?
> >>
> >> /Regards Krister
> >>
> >>
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Gets-ParametersInterceptor-error-when-trying-to-set-values-in-a-list%2C-eg.-tmpList-0-.name-tf3927728.html#a11163063
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: Gets ParametersInterceptor error when trying to set values in a list, eg. tmpList[0].name

Posted by kris16 <kr...@tietoenator.com>.
Hi Adam,
I tried to search for a "conversions.properties" file in the documentation
but dit not find any example.
I have never used the "conversions.properties" file, so could you please
explain the solution a bit more or give me an example ?

/Regards Krister



Adam Ruggles wrote:
> 
> Try adding a conversions.properties file to your action.
> 
> kris16 wrote:
>> Hi,
>> we have problems with setting HIDDEN values in an array list on a web
>> page.
>> The problem code in the jsp page looks like this:
>>
>>
>> <s:submit method="addProducts" value="Lägg till" theme="simple"/>	
>>
>> <s:iterator value="existingProductOfferings" status="row">
>>
>>  <s:hidden
>> name="existingProductOfferings[%{#row.index}].productOffering.id"
>> value="%{productOffering.id}"/>
>>
>>  <s:hidden
>> name="existingProductOfferings[%{#row.index}].productOffering.name"
>> value="%{productOffering.name}"/>
>>
>> </s:iterator>	
>>
>>
>>
>>
>> The problem seems to be that the object that are to be set is a list,
>> existingProductOfferings[%{#row.index}]
>>
>>
>> The error appeared when we upgraded the following libraries:
>> Struts2-core from 2.0.6 to 2.0.8
>> Struts-menu from 2.4.2 to 2.4.3
>> Struts2-spring-plugun 2.0.6 to 2.0.8
>>
>>
>> With the old libraries it works fine, but with the new libraries the
>> HIDDEN
>> values are not set when we do a submit, and run the action method
>> addProducts.
>>
>> When we do the submit we get the following error:
>>
>> [ERROR,2007-06-15
>> 14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
>> ParametersInterceptor - [setParameters]: Unexpected Exception caught
>> setting
>> 'existingProductOfferings[0].productOffering.id' on 'class
>> com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
>> expression 'existingProductOfferings[0].productOffering.id' with value
>> '[Ljava.lang.String;@1aa7a6a'
>>
>> [ERROR,2007-06-15
>> 14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
>> ParametersInterceptor - [setParameters]: Unexpected Exception caught
>> setting
>> 'existingProductOfferings[0].productOffering.name' on 'class
>> com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
>> expression 'existingProductOfferings[0].productOffering.name' with value
>> '[Ljava.lang.String;@14ae5cd'
>>
>> Is this a bug in the new libraries ?
>>
>> /Regards Krister
>>
>>
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Gets-ParametersInterceptor-error-when-trying-to-set-values-in-a-list%2C-eg.-tmpList-0-.name-tf3927728.html#a11163063
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Gets ParametersInterceptor error when trying to set values in a list, eg. tmpList[0].name

Posted by Adam Ruggles <a....@gmail.com>.
Try adding a conversions.properties file to your action.

kris16 wrote:
> Hi,
> we have problems with setting HIDDEN values in an array list on a web page.
> The problem code in the jsp page looks like this:
>
>
> <s:submit method="addProducts" value="Lägg till" theme="simple"/>	
>
> <s:iterator value="existingProductOfferings" status="row">
>
>  <s:hidden name="existingProductOfferings[%{#row.index}].productOffering.id"
> value="%{productOffering.id}"/>
>
>  <s:hidden
> name="existingProductOfferings[%{#row.index}].productOffering.name"
> value="%{productOffering.name}"/>
>
> </s:iterator>	
>
>
>
>
> The problem seems to be that the object that are to be set is a list,
> existingProductOfferings[%{#row.index}]
>
>
> The error appeared when we upgraded the following libraries:
> Struts2-core from 2.0.6 to 2.0.8
> Struts-menu from 2.4.2 to 2.4.3
> Struts2-spring-plugun 2.0.6 to 2.0.8
>
>
> With the old libraries it works fine, but with the new libraries the HIDDEN
> values are not set when we do a submit, and run the action method
> addProducts.
>
> When we do the submit we get the following error:
>
> [ERROR,2007-06-15
> 14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
> ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
> 'existingProductOfferings[0].productOffering.id' on 'class
> com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
> expression 'existingProductOfferings[0].productOffering.id' with value
> '[Ljava.lang.String;@1aa7a6a'
>
> [ERROR,2007-06-15
> 14:44:54,482,interceptor.ParametersInterceptor,http-8383-Processor22]
> ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
> 'existingProductOfferings[0].productOffering.name' on 'class
> com.teliasonera.serf.web.serviceprovider.AgreementAction: Error setting
> expression 'existingProductOfferings[0].productOffering.name' with value
> '[Ljava.lang.String;@14ae5cd'
>
> Is this a bug in the new libraries ?
>
> /Regards Krister
>
>
>
>   


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