struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ajac2010-forward@yahoo.de" <ajac2010-forw...@yahoo.de>
Subject Help with sj:autocompleter
Date Tue, 16 Oct 2012 18:32:01 GMT
Hi all,

i'd like to use the autocompleter as textfield to load a list of database objects when typing
some characters. Everything's working fine (action roundtrips after 3 characters) except refreshing
the list of the autocompleter. The list is still empty after setting the property in the Struts
action class.

I guess i need some kind of javascript event to refresh the list - but i haven't found the
correct property yet. Can anybody help?

############ JSP 

<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>

<s:url var="stringingAutocomplete" action="StringingAction_searchTennisStrings"/>
               
                   <sj:autocompleter
                                id="tennisString"
                                name="tennisString"
                                href="%{stringingAutocomplete}"
                                list="%{stringList}"
                                listValue="name"
                                listKey="id"
                                loadMinimumCount="3"
                                reloadTopics="true"
                                
                        />



############ Action class 

    public String searchTennisStrings() throws Exception {


        // database call to look for tennis strings
        this.stringList = stringingService.findTennisStringsByName(this.term);

        return SUCCESS;
    }



Thanks 

André

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message