struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: OGNL error --- Unexpected Exception caught setting ... on 'class.........
Date Thu, 27 Aug 2015 01:10:52 GMT



> From: zyxrm@hotmail.com
> To: user@struts.apache.org
> Subject: OGNL error --- Unexpected Exception caught setting ... on 'class.........
> Date: Wed, 26 Aug 2015 19:42:36 -0400
> 
>  Have a Publisher class with attributes
> Publisher --->class
> name
> code
>  
> Action class
> private String[] publisherName;             //why is this an Array of String instead
of String publisherName;    
MG>where are you setting the publisherName?.......... in constructor of Action class?

> List<Publisher> publishers= new ArrayList<Publisher>();
>  
> getters and setters for the same too in it.
>  
>  
> JSP
> 		<sj:autocompleter
> id="publisherNameId"
> 
> name="publisherName"
> 
> list="%{publishers}"
> 
> listValue="name"
> 
> listKey="code"
> 
> listLabel="code"
> 
> selectBox="true"
> 
> selectBoxIcon="true"
> 
> key="label.publisherName"
> 
> onChangeTopics="publisherNameChange"
> 
> onFocusTopics="publisherNameFocus"
> 
> onSelectTopics="publisherNameSelect"
> 
> size="34"
> 
> maxlength="34"
> 
> />
MG>where is your subscribe javascript function?
>  
> When I don't select anything in autocompleter and submit the form seeing this in console
> Unexpected Exception caught setting 'publisherName' on 'class com.xxx.createAction: Error
setting expression 'publisherName' with value ['', ]
>  
> when I select something in autocompleter and submit the form seeing this in console
> Unexpected Exception caught setting 'publisherName' on 'class com.xxx.createAction: Error
setting expression 'publisherName' with value ['macode2', ]
> Unexpected Exception caught setting 'publisherName_widget' on 'class com.xxx.createAction:
Error setting expression 'publisherName_widget' with value ['macode2', ]

MG>Looks like corruption of values for variables publisherName and publisherName_widget
MG>can you get a senior guy from your team to oversee what you're doing?
>  
> Is this the right way to declare in the Action class for autocompleter?
MG>if none of your action variables are populated then the answer would be no

> Please need help on this.
>  
>  		 	   		  
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message