Select combo component is not reloading when click to open.

26 views
Skip to first unread message

Lucas samberg

unread,
Jun 22, 2017, 3:39:37 PM6/22/17
to struts2-jquery
Hello guys, I`ve been some of trouble to upgrade struts version to 2.5.10.1 and struts2-jquery-plugin to 4.0.2.

We have select component like this:

 function createEnumComponent(numValues, filterValue) {
       
var id = '#value' + numValues; //this is a html select
        jQuery
.struts2_jquery.bind(jQuery(id), getOptionsValue(numValues, filterValue));
}

function getOptionsValue(numValues, filterValue) {
           
var options_value = {};
            options_value
.datatype = "json";
            options_value
.type = 'select';
            options_value
.delay = 300;
            options_value
.list = 'searchTermList';
            options_value
.emptyoption = true;
            options_value
.autocomplete = true;
            options_value
.icon = true;
            options_value
.minimum = 2;
            options_value
.jqueryaction = 'select';
            options_value
.id = 'value' + numValues;
            options_value
.name = 'value' + numValues;
            options_value
.onbef = "valueLoading";
            options_value
.oncom = "valueLoaded";
            options_value
.href = "termlist.action";
            options_value
.hrefparameter = "selectedFilterId="+filterValue+"&advancedSearchFiltersJson="+JSON.stringify(getJsonFromScreenObjects());
           
           
return options_value;
       
}

Previously when we clicked to open the select combo it first went to the action and load the list of values. But now this does not happens anymore. It only load the values once (when it is rendering the component) This is causing several problems to us since we need this to always load the values when trying to open it.

Sorry for my bad english but can you guys please help me? I am stuck with it for several days.
Reply all
Reply to author
Forward
0 new messages