You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by sagarlotiya <sa...@aspl.in> on 2007/10/24 14:04:29 UTC

struts2 run time error

Hi 

I am using Coverter for following thing.

<s:select name="courseImplementation.department"
list="listPropertySelectionModel.departmentListOfSchool" listValue="name"
listKey="id" />

After submiting form when i will come back to the same page at that time it
gives me following error.

ERROR [runtime]
Method public boolean
org.apache.struts2.components.ListUIBean.contains(java.lang.Object,java.lang.Object)
threw an exception when invoked on
org.apache.struts2.components.Select@996f0e
The problematic instruction:
----------
==> if tag.contains(parameters.nameValue, itemKey) == true [on line 64,
column 9 in template/simple/select.ftl]
 in user-directive s.iterator [on line 41, column 1 in
template/simple/select.ftl]

Please see this if any one knows the cause of this problem.
Thanks in Advance

-- 
View this message in context: http://www.nabble.com/struts2-run-time-error-tf4683876.html#a13384259
Sent from the Struts - Dev mailing list archive at Nabble.com.


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


Re: struts2 run time error

Posted by Brian Pontarelli <br...@pontarelli.com>.
Yeah, definitely use the user list, but since I just ran into this as 
well... ;)

It is usually that you misspelled the property name or that the property 
is returning null or that the property is returning a list of objects 
and you have a listKey or listValue that is incorrect or returning null 
or generating a null pointer. Check all those and I bet you'll fix it.

-bp


sagarlotiya wrote:
> Hi 
>
> I am using Coverter for following thing.
>
> <s:select name="courseImplementation.department"
> list="listPropertySelectionModel.departmentListOfSchool" listValue="name"
> listKey="id" />
>
> After submiting form when i will come back to the same page at that time it
> gives me following error.
>
> ERROR [runtime]
> Method public boolean
> org.apache.struts2.components.ListUIBean.contains(java.lang.Object,java.lang.Object)
> threw an exception when invoked on
> org.apache.struts2.components.Select@996f0e
> The problematic instruction:
> ----------
> ==> if tag.contains(parameters.nameValue, itemKey) == true [on line 64,
> column 9 in template/simple/select.ftl]
>  in user-directive s.iterator [on line 41, column 1 in
> template/simple/select.ftl]
>
> Please see this if any one knows the cause of this problem.
> Thanks in Advance
>
>   


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