fixed javascript methods to search dbtr or cdtr

This commit is contained in:
Ralph Soika 2022-11-25 10:56:45 +01:00
parent 2fdd3510bc
commit 700b8168f8
2 changed files with 5 additions and 7 deletions

View file

@ -21,7 +21,7 @@
https://dzone.com/articles/execute-a-jsf-ajax-request-by-just-a-function-call
https://www.w3schools.com/howto/howto_js_autocomplete.asp
-->
<h:commandScript name="cargosoftSearch" action="#{cargosoftController.searchCreditor(searchmode)}"
<h:commandScript name="cargosoftCdtrSearch" action="#{cargosoftController.searchCreditor(searchmode)}"
render="autocomplete-resultlist-cargosoft" onevent="autocompleteShowResult" />
@ -35,7 +35,7 @@
var creditorField= $("input[data-item='cdtr.number']");
$(creditorField).each(function() {
$(this).addClass("imixs-ml");
autocompleteInitInput(this,cargosoftSearch,'autocomplete-resultlist-cargosoft',selectCdtrCallback);
autocompleteInitInput(this,cargosoftCdtrSearch,'autocomplete-resultlist-cargosoft',selectCdtrCallback);
});
// add cargsoft label if available
var cdtrName="#{workflowController.workitem.item['cdtr.name.cargosoft']}";
@ -115,9 +115,6 @@
</div>
</ui:repeat>
</h:panelGroup>
</ui:composition>

View file

@ -21,7 +21,7 @@
https://dzone.com/articles/execute-a-jsf-ajax-request-by-just-a-function-call
https://www.w3schools.com/howto/howto_js_autocomplete.asp
-->
<h:commandScript name="cargosoftSearch" action="#{cargosoftController.searchDebitor()}"
<h:commandScript name="cargosoftDbtrSearch" action="#{cargosoftController.searchDebitor()}"
render="autocomplete-resultlist-cargosoft" onevent="autocompleteShowResult" />
<h:commandScript name="updateDbtrNumber" action="#{opListController.updateDbtrNumber()}"
render="#{opListContainer.clientId}" onevent="ajaxUpdateInvoiceSelection" />
@ -35,7 +35,8 @@
var creditorField= $("input[data-item='dbtr.number']");
$(creditorField).each(function() {
$(this).addClass("imixs-ml");
autocompleteInitInput(this,cargosoftSearch,'autocomplete-resultlist-cargosoft',selectDbtrCallback);
// set callback function...
autocompleteInitInput(this,cargosoftDbtrSearch,'autocomplete-resultlist-cargosoft',selectDbtrCallback);
});
// add cargsoft label if available
var dbtrName="#{workflowController.workitem.item['dbtr.name']}";