struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JeffShelley <jshel...@stuntmansoftware.com>
Subject Re: struts2 map of maps
Date Fri, 08 Aug 2008 05:07:40 GMT

Thanks Dave.  It actually looks like adding the ticks doesn't work (though
I'll confirm that IS a reason why it wouldn't work).  

It's good to know someone's gotten something similar working, though... I'll
keep tinkering with it.

Is there any word on getting a more verbose error message than this?
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
'data[12][5][hi]' on 'class TestAction: Error setting expression
'data[12][5][hi]' with value '[Ljava.lang.String;@1b0b765'


Thanks again!





newton.dave wrote:
> 
> --- On Thu, 8/7/08, JeffShelley <jshelley@stuntmansoftware.com> wrote:
>> I'm trying to set a whole hierarchy (from a TON of checkboxes) coming 
>> in to a request and not having much luck.  I'm using the spring
>> object factory.  
> 
> Well at first glance, I'm pretty sure that "[hi]" isn't going to work,
> since the "hi" isn't enclosed in quotes, so will make a crappy string.
> 
>> I don't know whether the problem is in xwork, Spring,
>> Struts or me.  Is what I'm trying even possible?
> 
> I've used a slightly different, but similar, hierarchy without issues.
> 
> Not sure what Spring has to do with anything here.
> 
> Dave
> 
>> ------------EXAMPLE-------------------
>> 
>> Here's a simple case of what I'd like to do:
>> 
>> http://localhost:8080/picsWeb2/Test.action?data[12][5][hi]=true
>> 
>> Here's the error I'm getting:  ERROR -
>> ParametersInterceptor -
>> [setParameters]: Unexpected Exception caught setting
>> 'data[12][5][hi]' on
>> 'class TestAction: Error setting expression
>> 'data[12][5][hi]' with value
>> '[Ljava.lang.String;@1b0b765'
>> 
>> 
>> And here's the code:
>> public class TestAction extends ActionSupport {
>> 
>> 	protected Map<Integer, Map<Integer, Map<String,
>> Boolean>>> data = null;
>> 	
>> 	public String execute()
>> 	{
>> 		return SUCCESS;
>> 	}
>> 
>> 	public Map<Integer, Map<Integer, Map<String,
>> Boolean>>> getData() {
>> 		return data;
>> 	}
>> 
>> 	public void setData(Map<Integer, Map<Integer,
>> Map<String, Boolean>>> data)
>> {
>> 		this.data = data;
>> 	}
>> }
>> 
>> 
>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/struts2-map-of-maps-tp18882730p18882730.html
>> 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
> 
> ---------------------------------------------------------------------
> 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/struts2-map-of-maps-tp18882730p18885560.html
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


Mime
View raw message