This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Autocompleter - NoSuchMethodException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Autocompleter - NoSuchMethodException" Watch "Autocompleter - NoSuchMethodException" New topic

Autocompleter - NoSuchMethodException

Mike Cobelmach

Joined: Jun 17, 2009
Posts: 19
Hi, migrate from Struts 2.0.14 to and have now problem with autocompleters in my project. See next example:




and autocompleter.jsp

In action class I have method input, because I want preset value. In complex case, I want do it dynamicly but just this simple example doesn't work.

If I go to url /actionClass_input.action I have preseleced value in state autocompleter which is "Czech republic", but doesnt have key (in this case stateKey = 4). If you look into, you may see setter for stateKey property. But in log I see warning:

But I don't send stateKey with String value, but with Integer. In next autocompleter (with city codes) I have not values for state "Czech republic" (see json.CityCodes and method getCityCodes()) - because stateKey is not set!

Next - on page in autocompleter.jsp I have debug prints - value[...] and key[...]. They print correct values if I get on url /actionClass_input:

value[state]: Czech republic
key[state]: 4

This autocompleter start work properly if I select value manually. But this is not user friendly.

In my previous version (Struts 2.0.14) it works correctly. I use for json "struts2-json-plugin" library with version and "dojo-plugin" with same version.

Thank for your help!
I agree. Here's the link:
subject: Autocompleter - NoSuchMethodException
Similar Threads
Problem in struts 2.0 autocompleter tag.
jquery + struts2 => JSON autocompleter example?
S2: autocompleter - how to populate a list based on user's input?
File and autocompleter tags doesn't work together
Autocompleter Struts2 not working for me:: Please help