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 Struts 2 getting key/value pairs 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 "Struts 2 getting key/value pairs" Watch "Struts 2 getting key/value pairs" New topic

Struts 2 getting key/value pairs

gopi thulasidoss

Joined: Sep 07, 2007
Posts: 8

Hi ranch experts,

I need you...................

I am using struts 2 framework, the problem is i want to get a auto completer id(1,2,3,4) instead of getting value (apple,banana.....).

The code works fine, it gets only (apple,banna..........) but i want to get the id(1,2..............)

function getFruits(fruits){
function registerFruits(){
var fruits = dojo.widget.byId('fruits');
dojo.event.connect(fruits, 'onValueChanged', 'getFruits')

<s:autocompleter name="test" list="#{'1':'apple','2':'banana','3':'grape','4':'pear'}" autoComplete="false" id="fruits"/>

Is there any way to get the id(key)
Expecting your suggestions...............
Thanks in advance,
Regards Gopi.
Don't get me started about those stupid light bulbs.
subject: Struts 2 getting key/value pairs
Similar Threads
STruts 2 radio
How to do s:if test of a value in the iterator?
cant retrieve data.
Using @DiscriminatorColumn for Inheritance
multibox , resultSet, logic:iterate