Questions Tagged With jsfhttps://answers.axonivy.com/tags/jsf/?type=rssquestions tagged <span class="tag">jsf</span>enWed, 29 Apr 2020 03:18:53 -0400Primefaces Upload In Dialog Issueshttps://answers.axonivy.com/questions/4544/primefaces-upload-in-dialog-issues<p>Hello, We are trying to use primefaces upload inside a dialog/modal. On chrome, it is asking for a file twice, and on firefox nothing is showing at all. Has this ever happened before?</p> <p><a href="https://stackoverflow.com/questions/61496181/problems-with-primefaces-upload-inside-dialogs">https://stackoverflow.com/questions/61496181/problems-with-primefaces-upload-inside-dialogs</a></p>TareqKWed, 29 Apr 2020 03:18:53 -0400https://answers.axonivy.com/questions/4544/primefaces-upload-in-dialog-issueshtmluserdialogjsfprimefacesStatic JSF pages not found after updating to 8.0.4 / 9.1.0https://answers.axonivy.com/questions/4457/static-jsf-pages-not-found-after-updating-to-8-0-4-9-1-0<p>Since 8.0 you can create static JSF pages. Those pages can be accessed directly via a URL without being in an an HtmlDialog context. And until 8.0.3 they were still located in the <code>webContent</code> folder.</p> <p><strong>Are you affected?</strong></p> <p>If you used static pages and you upgrade to 8.0.4 your page will no longer be found by the engine.</p> <p><strong>What have changed?</strong></p> <p>To improve security, we changed the location to <code>webContent/view</code>. This helps you to decide which pages should be static and can be accessed directly. </p> <p><strong>How should your webContent folder look like?</strong></p> <p>If you use static pages, you should have a <code>view</code> folder, and if not, please do not use this folder. Your structure could look like something like the this:</p> <pre><code>webContent - META-INF/ - WEB-INF/ - view/ (static JSF pages -&gt; direct call possible) - includes/ (templates, dialogs, etc -&gt; no direct call allowed) - resources/ (images, css, js, etc. -&gt; no direct call allowed) </code></pre> <p><strong>Additional info</strong></p> <p>If you use static pages, you should consider securing them with a login.</p>Lukas LiebWed, 18 Mar 2020 03:02:35 -0400https://answers.axonivy.com/questions/4457/static-jsf-pages-not-found-after-updating-to-8-0-4-9-1-0securityjsfHow 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-calljsfajaxprimefacesJSF resource caching in Designer?https://answers.axonivy.com/questions/4135/jsf-resource-caching-in-designer<p>Hi</p> <p>I'm facing a problem when I do testing of Html Dialogs in the Designer. It seems that some of the resources get cached so I don't see my changes. Everything works on the Engine, but the pages don't get update in the Designer.</p> <p>Is caching for JSF pages enabled in the Designer and if yes, how can I disable it?</p>Andreas RuschMon, 04 Nov 2019 08:46:32 -0500https://answers.axonivy.com/questions/4135/jsf-resource-caching-in-designerjsfWhy does the JSF not reload when changing code in Axon.Ivy Developer 7.0?https://answers.axonivy.com/questions/3969/why-does-the-jsf-not-reload-when-changing-code-in-axon-ivy-developer-7-0<p>When working on JSF Views in the Axon.Ivy Desginer 7.0.11 I face sometimes the problem that need to completely restart the designer otherwise I do not see any changes in the browser. How can I solve this problem?</p>adamfThu, 12 Sep 2019 03:23:56 -0400https://answers.axonivy.com/questions/3969/why-does-the-jsf-not-reload-when-changing-code-in-axon-ivy-developer-7-0jsfdesignerHow 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-logsrequestjsfloggingajaxlog4jHow can I create a custom tag in Ivyhttps://answers.axonivy.com/questions/3610/how-can-i-create-a-custom-tag-in-ivy<p>Hi Ivy Team, I'm managing to create a custom tag in JSF. But it seems not work. Do I need to do something more ?</p> <p>This is my custom class</p> <pre><code> @FacesComponent(createTag = true, tagName = "helloComponent", namespace = "http://example.com/tags") public class HelloComponent extends UIComponentBase { @Override public String getFamily() { return "Greeting"; } @Override public void encodeBegin(FacesContext context) throws IOException { String message = (String) getAttributes().get("message"); ResponseWriter writer = context.getResponseWriter(); writer.startElement("p", this); writer.write("Messageeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee: " + message); writer.endElement("p"); } } </code></pre><code> </code><p><code></code></p> <p>This is my xhtml view : <img alt="alt text" src="https://image.prntscr.com/image/maP26toeQ5W6hVl4kanc3g.png"></p>tdtinMon, 14 Jan 2019 08:50:37 -0500https://answers.axonivy.com/questions/3610/how-can-i-create-a-custom-tag-in-ivyjsfSupport for @FacesComponent within an Axon.ivy project without putting jars into ivy/WEB-INF/lib?https://answers.axonivy.com/questions/3488/support-for-facescomponent-within-an-axon-ivy-project-without-putting-jars-into-ivy-web-inf-lib<p>Hi Ivy Team</p> <p>According to the Release Notes of Axon.ivy Engine</p> <pre><code>Changes in 5.0 (since product release 4.3.0.39578, 7.5.2012) * Issue #23896 (Feature): Support implementing JSF Converter in Xpert.ivy projects Update Release 5.1.8.50190 (22.10.2015) + 24770 Feature Respect @FacesValidator annotation Changes in 6.0.0.50515 (since product release 5.1.0.46949, 12.9.2014) 24.11.2015 - Faces validator support </code></pre> <p>So <code>@FacesConverter</code> and <code>@FacesValidator</code> are supported in project-scoped since v5.x and v6.0.</p> <p>Is it possible to create custom <code>@FacesComponent</code> in project-scope as well without the need of making JAR files and put it in <code>ivy/WEB-INF/lib</code>? on the latest version v7.0.x?</p>Genzer HawkerTue, 23 Oct 2018 00:06:34 -0400https://answers.axonivy.com/questions/3488/support-for-facescomponent-within-an-axon-ivy-project-without-putting-jars-into-ivy-web-inf-libjsffaces-config.xmlProblem with Facelet taghttps://answers.axonivy.com/questions/3395/problem-with-facelet-tag<p>I created a facelet tag and faced the problem that ivy components can not be rendered. Following are the steps which I created and used facelet tag:</p> <ol> <li>Create file template <img alt="alt text" src="https://answers.axonivy.com/upfiles/create-template_mUhxAdh.png"></li> <li>Create file xml tag lib <img alt="alt text" src="https://answers.axonivy.com/upfiles/create-xml-file_tzUFFMq.png"></li> <li>Register the context-param <strong>FACELETS_LIBRARIES</strong> with xml file in web.xml config <img alt="alt text" src="https://answers.axonivy.com/upfiles/context-param_8MucPFS.png"></li> <li>Use the facelet tag on the page <img alt="alt text" src="https://answers.axonivy.com/upfiles/apply-in-page_8ICj3e2.png"></li> <li>Result <img alt="alt text" src="https://answers.axonivy.com/upfiles/result_3IvPsmC.png"></li> </ol> <p>I realized that whenever I register the context-param <strong>FACELETS_LIBRARIES</strong> with xml file in web.xml config, the ivy components can not work. Do you have any idea for this problem?</p>dangnguyenFri, 17 Aug 2018 03:49:59 -0400https://answers.axonivy.com/questions/3395/problem-with-facelet-tagjsfivytagsProblem with handling exception by AjaxExceptionHandlerhttps://answers.axonivy.com/questions/3383/problem-with-handling-exception-by-ajaxexceptionhandler<p>Hi all,</p> <p>I faced a problem when trying to use AjaxExceptionHandler as follow link: <a href="https://www.primefaces.org/showcase/ui/misc/exceptionHandler.xhtml">https://www.primefaces.org/showcase/ui/misc/exceptionHandler.xhtml</a> that the implicit object pfExceptionHandler was not updated automatically when exception occured. Even if I have tried with AjaxExceptionHandler in managed bean.</p> <p>Like this:</p> <pre><code>AjaxExceptionHandler aeh = new AjaxExceptionHandler(); aeh.setType("ch.ivyteam.util.IvyRuntimeException"); aeh.setUpdate("exceptionInfo"); aeh.setOnexception("updateExceptionInfo();"); FacesContext context = FacesContext.getCurrentInstance(); context.getApplication().evaluateExpressionGet(context, "#{pfExceptionHandler}", ExceptionInfo.class); </code></pre> <p>but the exception content still not updated.</p> <p>Does any body experienced with this?</p> <p>Thanks, Tam Nguyen</p>tam_nguyenvanWed, 08 Aug 2018 02:39:32 -0400https://answers.axonivy.com/questions/3383/problem-with-handling-exception-by-ajaxexceptionhandlerexceptionhandlingjsfHow to access database in a faces Validatorhttps://answers.axonivy.com/questions/3364/how-to-access-database-in-a-faces-validator<p>Hi all, I am new to AXON IVY. Hope you can be patient with me.</p> <p>I am trying to use that code here: <a href="https://answers.axonivy.com/questions/314/using-db-connection-from-pis">https://answers.axonivy.com/questions/314/using-db-connection-from-pis</a> (provided by Ivy Support Team) in a Java class in a CustomValidator class to look up a database table. Somehow I could not resolve the Ivy object. </p> <p>I tried looking up getProcessEngineHook method in <a href="https://developer.axonivy.com/doc/latest/PublicAPI">https://developer.axonivy.com/doc/latest/PublicAPI</a> but the search doesn't return any results.</p> <p>My codes as follows:</p> <pre><code>package trial.facesValidation; import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.validator.FacesValidator; import javax.faces.validator.Validator; import javax.faces.validator.ValidatorException; import java.sql.Connection; // To validate if Item Name already existed in Parts table in Database @FacesValidator("trial.facesValidation.CustomItemValidator") public class CustomItemValidator implements Validator { @Override public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { //connect to the database Connection dbconnection = ivy.getProcessEngineHook().getDbConnection("TrialDBConn"); try { // execute some sql queries } finally { // close the connection dbconnection.close(); } </code></pre>wesingMon, 23 Jul 2018 23:32:38 -0400https://answers.axonivy.com/questions/3364/how-to-access-database-in-a-faces-validatorjsfdatabaseShow process model as header doesn't workhttps://answers.axonivy.com/questions/3333/show-process-model-as-header-doesn-t-work<p>We want to show the name of the process model with <code>&lt;h:outputText value="#{ivy.request.processModel.name}"&gt;</code> but the variable is empty.</p>jan dietscheMon, 18 Jun 2018 12:05:10 -0400https://answers.axonivy.com/questions/3333/show-process-model-as-header-doesn-t-workprocesseljsfManagedBean with @Viewscoped is cleared after reload page by clicking f5 or reload button on browserhttps://answers.axonivy.com/questions/3315/managedbean-with-viewscoped-is-cleared-after-reload-page-by-clicking-f5-or-reload-button-on-browser<p>Some @ManagedBean with @viewscoped will be cleared after reload page by clicking f5 or reload button on browser. If I correct, It should not be cleared.</p> <p>How can i fix it.</p>trunglamWed, 06 Jun 2018 23:08:22 -0400https://answers.axonivy.com/questions/3315/managedbean-with-viewscoped-is-cleared-after-reload-page-by-clicking-f5-or-reload-button-on-browserjsfviewscopeivyDoes Axon Ivy support pretty URL?https://answers.axonivy.com/questions/3311/does-axon-ivy-support-pretty-url<p>I've been a beginner in Axon Ivy for more than 1 month. </p> <p>One of my questions is how to make JSF's URL of Ivy more beautiful or at least, simpler. I already worked with something called pretty-config with JSF before, so. <strong><em>Does Axon Ivy support it and how can I integrate with Ivy?</em></strong></p>TuyenTue, 05 Jun 2018 00:04:35 -0400https://answers.axonivy.com/questions/3311/does-axon-ivy-support-pretty-urljsfivyFormular is loosing decimal pointhttps://answers.axonivy.com/questions/3245/formular-is-loosing-decimal-point<p>After sending the form, the decimal point is lost. For example, 0,78 becomes 78</p> <p>This happens whenever I map <code>p:inputNumber</code> to the data type <code>java.lang.Number</code>.</p>SupportIvyTeamMon, 30 Apr 2018 04:29:13 -0400https://answers.axonivy.com/questions/3245/formular-is-loosing-decimal-pointjsfHow to switch off compatibilitymode in Internetexplorerhttps://answers.axonivy.com/questions/3176/how-to-switch-off-compatibilitymode-in-internetexplorer<p>Hello together,</p> <p>maybe someone of you are facing the same issue as I do? We develop JSF Dialogs, in Firefox and other Browser everything is working fine but not with Internet Explorer.</p>rolandWed, 04 Apr 2018 08:37:03 -0400https://answers.axonivy.com/questions/3176/how-to-switch-off-compatibilitymode-in-internetexplorerjsfieiisinternetexplorerSession Fixation with Axon.ivyhttps://answers.axonivy.com/questions/3053/session-fixation-with-axon-ivy<p>Hi everyone, as far as I can find, every time user logs in with IVY Portal, the session is kept (not renewed). You can check this via <em>JSESSIONID</em>. Thus, it leads to <a href="https://www.owasp.org/index.php/Session_fixation">session fixation</a> attack.<br> May Axon.ivy provide a mechanism to prevent this kind of attack? I am using Axon.ivy 6.3.0.<br> Thank you.</p>Bao TranWed, 03 Jan 2018 04:25:25 -0500https://answers.axonivy.com/questions/3053/session-fixation-with-axon-ivyjsfsessionivyBest practices to reduce the memory that is used by a single Html Dialog?https://answers.axonivy.com/questions/2987/best-practices-to-reduce-the-memory-that-is-used-by-a-single-html-dialog<p>We have a huge Html Dialog that uses around 80 MB memory per session on the engine side. The dialog is like a wrapper for the full application. It contains multiple tabs and modal dialogs <code>&lt;p:dialog /&gt;</code>. </p> <p>Why is this Dialog consuming so much memory? Are there any best practices to build lightweight JSF dialogs?</p>SupportIvyTeamMon, 20 Nov 2017 07:54:54 -0500https://answers.axonivy.com/questions/2987/best-practices-to-reduce-the-memory-that-is-used-by-a-single-html-dialoghtmluserdialogjsfmemoryIntegrate Axon.ivy workflow front-end in existing Web solution via iFramehttps://answers.axonivy.com/questions/2982/integrate-axon-ivy-workflow-front-end-in-existing-web-solution-via-iframe<p>I'd like to embedd some Axon.ivy workflow screens, such as a tasklist, in my existing WebApplication. My idea was to use an iframe. How can I do this in a secure way?</p>SupportIvyTeamFri, 17 Nov 2017 07:23:13 -0500https://answers.axonivy.com/questions/2982/integrate-axon-ivy-workflow-front-end-in-existing-web-solution-via-iframehtmldialogjsfweb.xmlcspCan I reduce the session-views that are held in the engine memory?https://answers.axonivy.com/questions/2951/can-i-reduce-the-session-views-that-are-held-in-the-engine-memory<p>The Axon.ivy ivy Engine caches 20 JSF Dialog views per session. As I have a huge dialog with lots of sub-Dialogs this consuming a lot of memory on the Engine. Can I somehow reduce the amount of cached views?</p>SupportIvyTeamFri, 03 Nov 2017 04:49:22 -0400https://answers.axonivy.com/questions/2951/can-i-reduce-the-session-views-that-are-held-in-the-engine-memoryjsfsessionmemoryJSF View Scope can lead to memory leakhttps://answers.axonivy.com/questions/2918/jsf-view-scope-can-lead-to-memory-leak<p>JSF stores the View Scope (<code>@ViewScope</code>) in the session store. Can this lead to memory issues?</p>Alex SuterWed, 18 Oct 2017 10:52:04 -0400https://answers.axonivy.com/questions/2918/jsf-view-scope-can-lead-to-memory-leakjsfviewscopememoryHow to create cancel or park button in my Html Dialog?https://answers.axonivy.com/questions/2855/how-to-create-cancel-or-park-button-in-my-html-dialog<p>On what should I pay attention when I want to create a cancel or a park button in my Html Dialog?</p>Alex SuterFri, 08 Sep 2017 01:43:30 -0400https://answers.axonivy.com/questions/2855/how-to-create-cancel-or-park-button-in-my-html-dialoghtmluserdialoghtmldialogjsfDefault progress barhttps://answers.axonivy.com/questions/2790/default-progress-bar<p>Hello everyone, is there a way to change the default progress bar, because in one specific scenario i want to have different progress bar but not the default one?</p> <p>This is the progress bar that i want to change: <img alt="alt text" src="http://answers.axonivy.com/upfiles/ddaaaas.jpg"></p> <p>I want to do it for only one scenario, when the user presses a button and should wait for some methods to be executed. I have checked from primefaces showcase they provide some progress bar but I can put it somewhere in the screen and it is always there its not like this one in the image which takes the whole screen(makes the screen darker while loading and it is not possible to press anything) Thanks :)</p>Tano93Thu, 03 Aug 2017 01:20:15 -0400https://answers.axonivy.com/questions/2790/default-progress-barhtmluserdialogjsfportalStart process of Ivycomponent in ManagedBeanhttps://answers.axonivy.com/questions/2736/start-process-of-ivycomponent-in-managedbean<p>Hi everyone, I had a dialog, and an ivyComponent. component is included into dialog When i try to call process in Logic of Dialog like this, it work fine.</p> <pre><code> FacesContext context = FacesContext.getCurrentInstance(); ExpressionFactory elFactory = context.getApplication().getExpressionFactory(); ELContext elContext = context.getELContext(); MethodExpression methodExpression = elFactory .createMethodExpression(elContext, "#{logic.mainMethod()}", String.class, new Class[0]); MethodInfo info = methodExpression.getMethodInfo(elContext); methodExpression.invoke(elContext, new Object[0]); </code></pre> <p>But when i try to call componentMethod() in component logic, it show method not found error : method not found <strong>example.main.componentMethod().</strong></p> <p>Update : each dialog had it own ManagedBean, and i fail to call when i use component ManagedBean.</p> <p>Seem like current context is not belong to component, have anyone meet this before ?</p> <p>Thank you :)</p> <p><img alt="alt text" src="http://answers.axonivy.com/upfiles/Capture.PNG"></p>docvominhThu, 06 Jul 2017 09:47:34 -0400https://answers.axonivy.com/questions/2736/start-process-of-ivycomponent-in-managedbeanjsfHow to insert jpeg images from CMS into JSF?https://answers.axonivy.com/questions/2685/how-to-insert-jpeg-images-from-cms-into-jsf<p>Jpeg images from CMS are not displayed on jsf dialogs when using IE (Internet Explorer 11 and AxonIvy6.6). e.g &lt;h:graphicimage name="/images/Sonne" library="ivy-cms" width="300"/&gt; </p> <p>This is not a problem with png images from cms, not if the jpeg images come from the webcontent folder and also not if other browsers like Firefox or Chrome are used.</p> <p>Any recommendations?</p>Bruno BütlerThu, 08 Jun 2017 08:36:05 -0400https://answers.axonivy.com/questions/2685/how-to-insert-jpeg-images-from-cms-into-jsfjsfcmsdelete current tab and keep the other unsubmited tab data in the formhttps://answers.axonivy.com/questions/2658/delete-current-tab-and-keep-the-other-unsubmited-tab-data-in-the-form<p>I have accordion panel inside a form with tow button one for add tabs ,another for next.</p> <p>each tab have inputtexts and delete button to delete this tab.</p> <p>some of tab fields are required ,and I can not add a new tab if the required not filled but I can delete any tab .</p> <p>the problem : if I have aleady tabs and add a new one with some inputs filled then I want to delete previous tab ,the delete button will update the whole page and remove the last added tab data from the form without processing them.</p> <p>so how can I delete previous tab without validation the current tab and keep the data in current tab.</p> <pre><code>&lt;h:form id="form"&gt; &lt;p:accordionPanel var="job" value="#{data.JobSet.toArray()}"&gt; &lt;p:tab title="title"&gt; &lt;p:outputPanel&gt; &lt;p:panelGrid&gt; &lt;p:outputLabel for="Company" value="Company"&gt;&lt;/p:outputLabel&gt; &lt;p:inputText id="Company" required="true" styleClass="inputFullWidth" value="#{job.name}"&gt;&lt;/p:inputText&gt; &lt;p:outputLabel value="Industry"&gt;&lt;/p:outputLabel&gt; &lt;p:inputText value="#{job.industry}"&gt;&lt;/p:inputText&gt; &lt;/p:panelGrid&gt; &lt;/p:outputPanel&gt; &lt;p:commandButton immediate="true" value="Delete" actionListener="#{logic.deleteJob(job)}" update="#{cc.id}:form" icon="fa fa-trash-o"&gt;&lt;/p:commandButton&gt; &lt;/p:tab&gt; &lt;/p:accordionPanel&gt; &lt;div&gt; &lt;p:commandButton validateClient="true" value="Add" actionListener="#{logic.addPJob}" update="form" &gt; &lt;/p:commandButton&gt; &lt;p:commandButton validateClient="true" value="Next" actionListener="#{logic.send}" update="form" process="form" /&gt; &lt;/div&gt; &lt;/h:form&gt; </code></pre>hibanassarThu, 01 Jun 2017 03:27:46 -0400https://answers.axonivy.com/questions/2658/delete-current-tab-and-keep-the-other-unsubmited-tab-data-in-the-formjsfprimefacesHow to inject custom exception handler into Ivyhttps://answers.axonivy.com/questions/2488/how-to-inject-custom-exception-handler-into-ivy<p>Hi ivy team,</p> <p>Now, I need to use the component <strong>p:ajaxExceptionHandler</strong> which required to configure in faces configuration file (faces-config.xml). </p> <p>When I looked at this file in Ivy designer, I saw that you have already declared your own custom exception handler as <strong>RuntimeLogExceptionHandlerFactory</strong>. And inside that class, you always return <strong>RuntimeLogExceptionHandler</strong> instance </p> <p>Note: you can refer this link to take an example: <a href="https://wmarkito.wordpress.com/2012/04/05/adding-global-exception-handling-using-jsf-2-x-exceptionhandler/">https://wmarkito.wordpress.com/2012/04/05/adding-global-exception-handling-using-jsf-2-x-exceptionhandler/</a> <strong>Or</strong> primefaces user guide documentation in the 11.3 section (Exception handler)</p> <p>How can I inject my custom exception handler for using the component <strong>p:ajaxExceptionHandler</strong> ???</p> <p>Please help me ivyteam, thank in advance. :)</p> <p>Vuong Vu</p>vhsvuongFri, 10 Mar 2017 03:33:16 -0500https://answers.axonivy.com/questions/2488/how-to-inject-custom-exception-handler-into-ivyjsfAccess Ivy project classloader on jarhttps://answers.axonivy.com/questions/2337/access-ivy-project-classloader-on-jar<p>Hi all</p> <p>I'm using a htmlUserDialog wich JSF and i have a jsf custom tag, i build and put it on webapp folder of server. this is a custom tag that i will use on my xhtml. this tag somehow is a jsf event listener, it listen system event of jsf (ex: PostAddToView, PreRenderView,...)</p> <p>Sometime when i start ivy engine (via Windows services), i got exception:</p> <pre><code>ch.ivyteam.ivy.environment.EnvironmentNotAvailableException: Access to ivy environment outside a process request thread is not possible. Current thread: Thread[http-nio-8082-exec-1,5,main] at ch.ivyteam.ivy.environment.Ivy.getIvy(Ivy.java:574) at ch.ivyteam.ivy.environment.Ivy.getEnvironmentData(Ivy.java:553) at ch.ivyteam.ivy.environment.Ivy.getEnvironmentData(Ivy.java:548) at ch.ivyteam.ivy.environment.Ivy.request(Ivy.java:242) at ch.axonivy.fintech.guiframework.component.GuiEventListenerFactoryServiceProvider.getProjectClassLoader(GuiEventListenerFactoryServiceProvider.java:67) at ch.axonivy.fintech.guiframework.component.GuiEventListenerFactoryServiceProvider.getFactory(GuiEventListenerFactoryServiceProvider.java:32) at ch.axonivy.fintech.guiframework.component.GuiEventListenerComponent.&lt;init&gt;(GuiEventListenerComponent.java:46) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1469) at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:129) at org.apache.myfaces.extensions.validator.core.factory.ExtValApplicationWrapper.createComponent(ExtValApplicationWrapper.java:84) at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:129) at org.apache.myfaces.view.facelets.compiler.FaceletsCompilerSupport.loadLibraries(FaceletsCompilerSupport.java:141) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.loadLibraries(FaceletViewDeclarationLanguage.java:2526) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.createCompiler(FaceletViewDeclarationLanguage.java:2172) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.initialize(FaceletViewDeclarationLanguage.java:2464) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.&lt;init&gt;(FaceletViewDeclarationLanguage.java:309) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguageStrategy.&lt;init&gt;(FaceletViewDeclarationLanguageStrategy.java:52) at org.apache.myfaces.view.ViewDeclarationLanguageFactoryImpl.initialize(ViewDeclarationLanguageFactoryImpl.java:104) at org.apache.myfaces.view.ViewDeclarationLanguageFactoryImpl.getViewDeclarationLanguage(ViewDeclarationLanguageFactoryImpl.java:73) at org.apache.myfaces.application.ViewHandlerImpl.getViewDeclarationLanguage(ViewHandlerImpl.java:183) at javax.faces.application.ViewHandlerWrapper.getViewDeclarationLanguage(ViewHandlerWrapper.java:133) at org.apache.myfaces.shared.application.DefaultViewHandlerSupport.checkResourceExists(DefaultViewHandlerSupport.java:569) at org.apache.myfaces.shared.application.DefaultViewHandlerSupport.handleSuffixMapping(DefaultViewHandlerSupport.java:507) </code></pre> <p>In my jar file, i need to access to ivy project class loader, so i have this line:</p> <pre><code> ClassLoader cl = Ivy.request().getProject().getProjectClassLoader(); </code></pre> <p>I have a interface in this jar so i need to get class loader to find which class (from ivy project) is implementing my interface (vis ServiceLoader)</p> <p>I guess my jar is started before ivy initialize its environment. So how can i solve it ?</p> <p>P/S: when i try to start some more times, my engine can start but this exception is quite annoying imo</p> <p>Thanks</p>trungdvThu, 29 Dec 2016 12:03:45 -0500https://answers.axonivy.com/questions/2337/access-ivy-project-classloader-on-jarjsfOutOfScopeException: Cannot access scopedhttps://answers.axonivy.com/questions/2091/outofscopeexception-cannot-access-scoped<p>Hi all I'm using ivy 6.3.0 with JSF + Primefaces, when i test my website with multiple users at the same time, i got this:</p> <pre><code>12:36:49.661 ERROR [ch.ivyteam.ivy.dialog.execution.jsf.error] [http-nio-8443-exec-393] [requestId=2235134] Error during rendering of html dialog com.google.inject.ProvisionException: Unable to provision, see the following errors: 1) Error in custom provider, com.google.inject.OutOfScopeException: Cannot access scoped [ch.ivyteam.ivy.dialog.execution.DialogRuntimeManager]. Either we are not currently inside an HTTP Servlet request, or you may have forgotten to apply com.google.inject.servlet.GuiceFilter as a servlet filter for this request. </code></pre> <p>We also get this problem when i embed my page to another by using <em>iframe</em> </p> <p>We don't use any api from <em>com.google.inject</em>, it could come from ivy library i guess.</p> <p>Does anyone have any idea why this exception occurred? Thanks all </p>trungdvTue, 11 Oct 2016 04:12:15 -0400https://answers.axonivy.com/questions/2091/outofscopeexception-cannot-access-scopedhtmluserdialogjsfprimefacesHave jstl errorhttps://answers.axonivy.com/questions/2054/have-jstl-error<p>I am using ivy both 6.0 and 6.2, and I have a lot of error trace java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config I think it's because of missing jstl jar file in ivy engine. Is there any solution for that?</p>hungnamTue, 27 Sep 2016 14:21:16 -0400https://answers.axonivy.com/questions/2054/have-jstl-errorjsf