Questions Tagged With primefaceshttps://answers.axonivy.com/tags/primefaces/?type=rss&user=Nikel%20Weisquestions tagged <span class="tag">primefaces</span>enTue, 26 Nov 2013 10:52:26 -0500How can I get enable sorting on a dataTable?https://answers.axonivy.com/questions/131/how-can-i-get-enable-sorting-on-a-datatable<p>I've dataTable-element and I want the content to be sortable. I'm using the following code:</p> <pre><code>&lt;p:dataTable value="#{data.projects}" var="project" paginator="true" rows="10" paginatorPosition="top"&gt; &lt;p:column sortBy="project['project_id']" headerText="Projekt-Nr."&gt; &lt;h:outputText value="#{project['project_id']}" /&gt; &lt;/p:column&gt; [...] </code></pre> <p>I think the sortBy-Attribute is wrong - I fiddled around a bit but no success. I'm thankful for help.</p>Nikel WeisTue, 26 Nov 2013 10:52:26 -0500https://answers.axonivy.com/questions/131/how-can-i-get-enable-sorting-on-a-datatableprimefacesHow to integrate custom PhaseListener in faces-config.xml?https://answers.axonivy.com/questions/117/how-to-integrate-custom-phaselistener-in-faces-config-xml<p>I want to implement a custom PhaseListener in my faces-config.xml like it is <a href="http://stackoverflow.com/questions/8388854/how-to-implement-a-phaselistener-which-runs-at-end-of-lifecycle">suggested</a> at stack overflow. So this is my faces-config.xml:</p> <pre><code>&lt;lifecycle&gt; &lt;phase-listener&gt;org.apache.myfaces.extensions.validator.core.startup.ExtValStartupListener&lt;/phase-listener&gt; &lt;phase-listener&gt;org.apache.myfaces.extensions.validator.beanval.startup.JSF2AwareBeanValidationStartupListener&lt;/phase-listener&gt; &lt;phase-listener&gt;org.apache.myfaces.extensions.validator.beanval.startup.BeanValidationStartupListener&lt;/phase-listener&gt; &lt;phase-listener&gt;de.azt.MyPhaseListener&lt;/phase-listener&gt; &lt;/lifecycle&gt; </code></pre> <p>And this is MyPhaseListener-Dummy: </p> <pre><code>public class MyPhaseListener implements PhaseListener { @Override public PhaseId getPhaseId() { return PhaseId.RENDER_RESPONSE; } @Override public void beforePhase(PhaseEvent event) { // Do your job here which should run right before the RENDER_RESPONSE. } @Override public void afterPhase(PhaseEvent event) { // Do your job here which should run right after the RENDER_RESPONSE. } } </code></pre> <p>But this approach leads the application server to crash:</p> <pre><code>HTTP Status 500 - serialFactory type Exception report message serialFactory description The server encountered an internal error that prevented it from fulfilling this request. exception javax.servlet.ServletException: serialFactory javax.faces.webapp.FacesServlet.service(FacesServlet.java:229) org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) ch.ivyteam.ivy.dialog.execution.jsf.controller.rest.IvyRestServiceFilter.doFilter(IvyRestServiceFilter.java:54) ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter.filterAsSystem(IvyFacesInstanceFilter.java:104) ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter.access$0(IvyFacesInstanceFilter.java:79) ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter$1.call(IvyFacesInstanceFilter.java:55) ch.ivyteam.ivy.dialog.execution.jsf.controller.IvyFacesInstanceFilter$1.call(IvyFacesInstanceFilter.java:1) ch.ivyteam.ivy.security.internal.SecurityManager.executeAsSystem(SecurityManager.java:1425) </code></pre> <p>So how is it possible to implement a custom PhaseListener?</p>Nikel WeisFri, 22 Nov 2013 16:31:49 -0500https://answers.axonivy.com/questions/117/how-to-integrate-custom-phaselistener-in-faces-config-xmlconfigurationprimefacesVersion informations neededhttps://answers.axonivy.com/questions/103/version-informations-needed<p>A lot of questions are rather Primefaces specific than Xpert.ivy specific. In order to get proper support at StackOverflow or the PrimeFaces-Board, what can I answer on the questions: What PrimeFaces version, JSF implementation name/version and the Server name/version information?</p>Nikel WeisFri, 22 Nov 2013 08:57:30 -0500https://answers.axonivy.com/questions/103/version-informations-neededprimefacesHow to prevent tab switching on validation errors using p:tabView?https://answers.axonivy.com/questions/97/how-to-prevent-tab-switching-on-validation-errors-using-p-tabview<p>How can I prevent a tab switch using a p:tabView after a form validation on the second tab fails?</p>Nikel WeisThu, 21 Nov 2013 09:16:58 -0500https://answers.axonivy.com/questions/97/how-to-prevent-tab-switching-on-validation-errors-using-p-tabviewprimefaces