Questions Tagged With ajaxhttps://answers.axonivy.com/tags/ajax/?type=rssquestions tagged <span class="tag">ajax</span>enWed, 11 Dec 2019 23:40:42 -0500How to switch off validation for ajax call?https://answers.axonivy.com/questions/4271/how-to-switch-off-validation-for-ajax-call<p>Hi Ivy Team</p> <p>I have a autocomplete. The autocomplete is required field. In autocomplete. I have ajax to handle change event. When autocomplete changes, some fields will be updated below. But When I clear data from autocomplete. The message required is display and some fields are no more update. So I want to do validation only when a button is clicked which submits the form but not when autocomplete changes. How I can do this?</p> <p>Note: I try using "immediate" attribute in ajax to switch off validation but it is not work.</p> <pre><code>&lt;p:autoComplete id="select-vendor" widgetVar="select-vendor" value="#{purchase.vendor}" dropdown="true" scrollHeight="400" completeMethod="#{tenderInformationBean.completeVendor}" var="vendor" itemLabel="#{vendor.vendorName}" itemValue="#{vendor}" maxlength="50" converter="pojoConverter" cache="true" queryDelay="500" rendered="#{!tenderInformationBean.isVendorNotFound}" binding="#{tenderInformationBean.vendorNameAutoComplete}" disabled="#{isReadOnlySupplier}" forceSelection="true" requiredMessage="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/requiredFieldMessage')}" &gt; &lt;p:ajax event="change" update="vendor-information-fieldset" global="false" listener="#{tenderInformationBean.onSelectVendorName(purchase)}" onstart="if(PF('select-vendor').panel.is(':visible')) return false;" immediate="true"/&gt; &lt;p:ajax event="itemSelect" update="vendor-information-fieldset" global="false" listener="#{tenderInformationBean.onSelectVendorName(purchase)}" /&gt; &lt;f:validator validatorId="awsValidator" /&gt; &lt;/p:autoComplete&gt; </code></pre> <p>Thanks</p>anhleWed, 11 Dec 2019 23:40:42 -0500https://answers.axonivy.com/questions/4271/how-to-switch-off-validation-for-ajax-calljsfajaxprimefacesHow to find the root cause of error 500, frequently occuring in the logshttps://answers.axonivy.com/questions/3795/how-to-find-the-root-cause-of-error-500-frequently-occuring-in-the-logs<p>Some of users of my wf-app seem to face an error 500 while working. The errors show a viewExpiredException as cause of the problem. Generally this points to a session timeout issue. But as the user fires several request within seconds it doesn't make much sense, that one of the requests should fail with error 500 while others can be served as expected.</p> <p>Unfortunately the behaviour is not 100% reproducible on any dialog. The logs expose the problem for several users but there is no clear pattern to find out which behaviour leads to these errors. Do I have any chance to isolate the real issue behind these error 500 logs?</p>SupportIvyTeamMon, 13 May 2019 07:02:36 -0400https://answers.axonivy.com/questions/3795/how-to-find-the-root-cause-of-error-500-frequently-occuring-in-the-logsrequestjsfloggingajaxlog4jAjax call from HTML Dialog to consume Web Service and REST Servicehttps://answers.axonivy.com/questions/1837/ajax-call-from-html-dialog-to-consume-web-service-and-rest-service<p>Hi All,</p> <p>I have the situation where from HTML dialog I need to make custom Ajax call to ivy Web Service in the same process. I`m wandering what would be the implications of this approach regarding the security context.</p> <p>The Ajax call will send a HTTP request with the cookie session of the currently logged user. Will this be enough for ivy engine to identify the user ?</p> <p>This question is also valid for the future release 6.2 when it comes to REST services.</p> <p>Best Regards, Yordan</p>Stelt0Thu, 23 Jun 2016 17:40:38 -0400https://answers.axonivy.com/questions/1837/ajax-call-from-html-dialog-to-consume-web-service-and-rest-servicehtmldialogsecurityajaxrestAutocomplete-Box in Process Web-Pagehttps://answers.axonivy.com/questions/466/autocomplete-box-in-process-web-page<p>We try to create a HTML form with web pages that includes a auto complete box. How can I process the AJAX request in the backend (e.g. if I want to fill the content of the box by a DB query)?</p>Thomas GünterTue, 21 Aug 2012 09:40:46 -0400https://answers.axonivy.com/questions/466/autocomplete-box-in-process-web-pageajaxhtmlwebpages