UI Page, ui_reference updating another ui_reference - AJAXTableCompleter

JulianP32954866
Tera Expert

I have a ui page that has a ui_reference to sys_scope

 
<g:ui_reference name="sys_scope" id="sys_scope" table="sys_scope" completer="AJAXTableCompleter"
						columns="scope" onchange="setUpdateSetsFilter()" displayvalue="Global" />

That works

I have a second ui reference that is set

<g:ui_reference name="sys_update_set" id="sys_update_set" table="sys_update_set"
						completer="AJAXTableCompleter" columns="state;application;sys_created_on;sys_updated_on"
						query="application=global^name=Default" />

The code for setUpdateSetsFilter() ultimately doing this after an Ajax call.

// console.log('answer : ' + answer);
var answer = '0,322d023c83f53610b9e29bc6feaad348,d4bc8e7883f53610b9e29bc6feaad3d2,7cac4a7883f53610b9e29bc6feaad3a6';
var updateSets = gel('lookup.sys_update_set');
updateSets.setAttribute('onclick', "mousePositionSave(event); reflistOpen( 'sys_update_set', 'not', 'sys_update_set', '', 'false','QUERY:active=true','sys_idIN" + answer + "', '')");
var updateSets = gel('sys_display.sys_update_set');
updateSets.setAttribute('onfocus',"if (!this.ac) new AJAXTableCompleter(this, 'sys_update_set', '', 'QUERY:sys_idIN0', 'sys_update_set');" );
var updateSets = gel('sys_display.sys_update_set');
updateSets.setAttribute('onfocus',"if (!this.ac) new AJAXTableCompleter(this, 'sys_update_set', '', 'QUERY:sys_idIN" + answer + "', 'sys_update_set');" );

The lookup works great.

The typing the name in the list - not so.

If the page loads and I set the value of the Scope very quickly, then it will show me the update sets I want. Any further updates of the Scope and the update set list is not changing at all

The code above you can see I am trying to clear it and set again - just incase that works, but to no avail

Is there anyway that the AJAXTableCompleter can be updated like the lookup version is ? - its almost like it needs a reset after each running the client script, but not sure if or how to achieve that.

 

0 REPLIES 0