Questions Tagged With htmluserdialoghttps://answers.axonivy.com/tags/htmluserdialog/?type=rss&user=trungdvquestions tagged <span class="tag">htmluserdialog</span>enThu, 30 Mar 2017 05:08:11 -0400Can we invoke Exit element programmatically?https://answers.axonivy.com/questions/2553/can-we-invoke-exit-element-programmatically<p>hi all</p> <p>I have html dialog and an event as below: <img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_8UWSnHt.png"> It look quite simple because normally we don't put much code on ivy script, we handle most of them on java class (able to test, less confliction) But because of our business we need to reach Process End or Exit element by some conditions in order to continue workflow. Somehow in java class i need to produce this condition value and return it back to ivy data class in order to use on Alternative element. </p> <p>So my question is can we call process End or Exit element in java? or maybe just Exit element or should we do that?</p> <p>Thanks</p>trungdvThu, 30 Mar 2017 05:08:11 -0400https://answers.axonivy.com/questions/2553/can-we-invoke-exit-element-programmaticallyhtmluserdialogMechanism to resolve data and logic of HtmlUserDialoghttps://answers.axonivy.com/questions/2549/mechanism-to-resolve-data-and-logic-of-htmluserdialog<p>Hi ivyteam</p> <p>As you know in HtlmUserDialog we can use #{data} or #{logic} to access the attribute/method on ivy from view(xhtml). No matter which component/page you have, you can use #{data} and #{logic} anywhere and it always work in correct context, There is no mistake that you use #{data} from component A but it return data of component B. That's great.</p> <p>So i have two questions: - Can you share the mechanism how did you resolve those keywords in ivy (ex: some class that i can explore by myself), i guess that there is a managed bean(view scope) behind the scene? - If i have the page with some components as below picture, can i access #{data} of any components i want programmatically? I tried to resolve EL #{data} after the page has been loaded and it always return data of <em>Page A</em></p> <p><img alt="alt text" src="http://answers.axonivy.com/upfiles/Untitled_IZPJdpz.png"></p>trungdvWed, 29 Mar 2017 09:24:57 -0400https://answers.axonivy.com/questions/2549/mechanism-to-resolve-data-and-logic-of-htmluserdialoghtmluserdialogOutOfScopeException: 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-scopedhtmluserdialogjsfprimefacesHow to access data of a htmlUserDialog in java classhttps://answers.axonivy.com/questions/1360/how-to-access-data-of-a-htmluserdialog-in-java-class<p>Hi all Now i'm using HtmlUserDialog in ivy 5 and i have a situation need your help. As you know now when we have a HtmlUserDialog, it contain 4 parts: interface, view, logic &amp; data. Data can be accessed by keyword data (ex: data.username}, but it just work on Ivy Scrip step</p> <p>So now i want to do the same behaviour in java class (access to data of htmlUserDialog)</p> <p>Can anyone have tried before? Please help me a solution.</p> <p>Thanks in advance</p>trungdvMon, 15 Jun 2015 06:18:20 -0400https://answers.axonivy.com/questions/1360/how-to-access-data-of-a-htmluserdialog-in-java-classhtmluserdialogivyscriptException when using ch.ivyteam.ivy.scripting.objects.List on Primefaceshttps://answers.axonivy.com/questions/1350/exception-when-using-ch-ivyteam-ivy-scripting-objects-list-on-primefaces<p>Hi all</p> <p>I'm using primefaces 5 with HtmlUserDialog, in my page i'm using &lt;p:selectmanycheckbox&gt; that binding with a instance of ch.ivyteam.ivy.scripting.objects.List, for example:</p> <pre><code>p:selectManyCheckbox value="#{data.selectedWeeklyDayList}" layout="pageDirection"&gt; f:selectItems value="#{data.listWeekDay}" var="weekDay" itemValue="#{weekDay}" itemLabel="#{weekDay.value}"/&gt; /p:selectManyCheckbox&gt; </code></pre> <p>And <code>selectedWeeklyDayList</code> and <code>listWeekDay</code> are instances of <code>ch.ivyteam.ivy.scripting.objects.List</code>. When i submit this page, after several times, i got this exception:</p> <pre><code>IllegalAccessException: Class javax.faces.component.UIComponentBase can not access a member of class ch.ivyteam.ivy.scripting.objects.List with modifiers "private" RuntimeException: java.lang.IllegalAccessException: Class javax.faces.component.UIComponentBase can not access a member of class ch.ivyteam.ivy.scripting.objects.List with modifiers "private" IllegalStateException: Error restoring component: addNewEditForm_5649:selectedWeeklyDayList </code></pre> <p>Now i just have temporary solution to avoid this exception is i change from <code>ch.ivyteam.ivy.scripting.objects.List</code> to <code>java.util.List</code></p> <p>Why do i face this issue? and is there any solutions to avoid it but i still can use <code>ch.ivyteam.ivy.scripting.objects.List</code>? because i need to use some features of this class (for ex: clone() method)</p> <p>Thanks all.</p>trungdvWed, 03 Jun 2015 06:50:29 -0400https://answers.axonivy.com/questions/1350/exception-when-using-ch-ivyteam-ivy-scripting-objects-list-on-primefaceshtmluserdialogivyHow to get param ln when loading a HtmlUserDialog pagehttps://answers.axonivy.com/questions/1106/how-to-get-param-ln-when-loading-a-htmluserdialog-page<p>Hi all,</p> <p>I have a HtmlUserDialog project and have a page which included some js/css file. Normally we just use the tag like this:</p> <pre><code>&lt;script src="#{resource['ivy-webcontent:js/xportal-common.js']}" /&gt; </code></pre> <p>And i can see after the page was loaded, the code will be:</p> <pre><code>&lt;script src="/ivy/faces/javax.faces.resource/js/xportal-common.js?ln=xpertivy-5-webContent"&gt; </code></pre> <p>You can see this &lt;script&gt;, it is always end with param <strong>ln=xpertivy-&lt;number&gt;-webContent</strong> The &lt;number&gt; here is different. So, for example, when i use some third party js libraries, it have some code to load some others js files by javascript after page loaded, but it can't because i don't have the right &lt;number&gt; of param <strong>ln</strong>. If anyone here used to use RequireJS, you can understand the situation.</p> <p>My question is: There is any way to know exactly the parameter <strong>ln</strong> that ivy will put to the end of &lt;script&gt; ?</p> <p>Note: Actually i can get this value by using javascript to read other existing &lt;script&gt; and copy from there but i really don't like that way.</p> <p>Anyone can have me?</p>trungdvTue, 06 Jan 2015 13:05:58 -0500https://answers.axonivy.com/questions/1106/how-to-get-param-ln-when-loading-a-htmluserdialog-pagehtmluserdialogjavascriptHow can i register a custom taglib in ivy 5?https://answers.axonivy.com/questions/760/how-can-i-register-a-custom-taglib-in-ivy-5<p>Hello everybody.</p> <p>Now i'm using ivy 5 with HTML dialog(jsf) and i have a trouble with registering that taglib. Because of our requirement i have to create new custom taglib (put it in jar file) then i want to register it to use. But i can't do that in Ivy (don't have web.xml for each project). So i have to copy it to &lt;ivy folder=""&gt;\webapps\ivy\WEB-INF\lib\ everytime i make a new deployment/make some changes it that jar. My customer really now happy with that. What is alternative way to register it directly in our project?</p> <p>Anyone has ever met that problem and give me any suggestions? Thanks in advance!</p>trungdvTue, 10 Jun 2014 11:07:07 -0400https://answers.axonivy.com/questions/760/how-can-i-register-a-custom-taglib-in-ivy-5htmluserdialogivytags