wood burning stoves*
The moose likes Struts and the fly likes Struts Dojo autocompleter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Dojo autocompleter" Watch "Struts Dojo autocompleter" New topic
Author

Struts Dojo autocompleter

Vishnu Naire
Greenhorn

Joined: Dec 01, 2010
Posts: 2
Hi ,
I am using struts -dojo plugin in my struts 2 application.I have a problem when i use the dojo autocompleter.I am not sure how I can call a javascript function using the onselect() event from the autocompleter.My idea was to get the selected value of the autocompleter into that js function.Any help would be greatly appreciated.Please forgive if there are any mistakes in the way the question has been raised as this is my first day here .

<sx:autocompleter name="" list="" id="jsauto" template="autocompleter.ftl" onselect="showKey()"/> (name and list values come from OGNL)

Js used :
function showKey() {
alert("Inside Autocompleter valiate");
var autoCompleter = dojo.widget.byId('jsauto');
alert("AutoCompleter Value"+autoCompleter.getSelectedKey());
}

Plss help

Regards,
Vishnu
Vishnu Naire
Greenhorn

Joined: Dec 01, 2010
Posts: 2
This issue was resolved . I called the js event onlick() of the submit button and it worked .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Dojo autocompleter
 
Similar Threads
struts newbie needs help with autocompleter
Problem in struts 2.0 autocompleter tag.
Struts2: Help in autocompleter tag
Autocompleter
Autocompleter - NoSuchMethodException