jsf-2

JSF: Respecting a component binding method after UI-driven events are processed in backing beans?

左心房为你撑大大i 提交于 2019-12-24 15:49:27
问题 Finally I've managed how to build a true dynamic table with the DOM -like approach in JSF when the data table structure is defined according to an external source. ( DataTable with dynamic columns exactly what I need) Basically, the following code is quite enough for me: <p:layoutUnit position="west"> <!-- 2 --> <p:tree value="#{tableViewsPageBean.root}" var="node" dynamic="true" cache="false" selectionMode="single" selection="#{tableViewsPageBean.selectedNode}"> <!-- 3 --> <p:ajax event=

submitForm() not defined for myfaces.JSF_JS_MODE 'minimal-modern'

妖精的绣舞 提交于 2019-12-24 15:36:49
问题 I tried to set up a simple JSF 2.2 application using MyFaces 2.2.8. Since MyFaces has some context parameters that I never used before, I tried to get familiar with those. So I got to use org.apache.myfaces.JSF_JS_MODE for the first time and ran into problems with h:commandLink . The commandLink is trying to call myfaces.oam.submitForm() which is not defined if I set the mode to minimal-modern . If I set the mode to minimal or normal it works. From reading some internet articles I assume this

OmniFaces highlight does not set focus with <p:ajax>

断了今生、忘了曾经 提交于 2019-12-24 15:19:54
问题 I got a simple login form. I am using <p:ajax> to invoke a <p:blockUI> (see this question). <h:commandButton id="anmeldung_button" action="#{benutzerAnmeldung.anmelden}" value="Anmelden" styleClass="btn btn-info btn-sm"> <p:ajax process="@form" update="@form"/> </h:commandButton> <p:blockUI id="block" block=":anmeldung" trigger="anmeldung_button" /> I am using <o:highlight /> to highlight invalid inputs. This works fine. It is working with a <f:ajax> perfectly, too. Apperently, it is not

h:commandButton fails in h:form after navigating from f:ajax request

…衆ロ難τιáo~ 提交于 2019-12-24 15:10:49
问题 I'm facing a wicked little problem, which has eluded me for almost 2 days now. I got a p:treeTable component, which serves as a method of navigating and editing a hierarchical data structure. The tree is displayed on the left side. By selecting a tree entry, the user selects an entry for editing, which is then displayed in the form on the right hand. There is also a button for adding new child nodes on the entry. Clicking this will create a new subnode of the selected node and the form on the

Why primefaces media dynamic doesn't work in view scope?

泄露秘密 提交于 2019-12-24 14:54:20
问题 I use the media primefaces tag to present pdf's but if the bean is @ViewScope the stream is always null, why? 回答1: Because the desired JSF view state isn't available when the webbrowser is about to download the PDF in an entirely separate(!!) HTTP request. This is essentially exactly the same problem as with PrimeFaces <p:graphicImage> as answered in the following questions: How to bind dynamic content using <p:media>? Display dynamic image from database with p:graphicImage and

Primefaces javascript defer parsing

£可爱£侵袭症+ 提交于 2019-12-24 14:36:13
问题 Primefaces 4.0 is generating lots of overhead during page loading as seen from PageSpeed Insights: **605.3KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page rendering.** http://localhost:8888/.../primefaces.js.xhtml?... (219.5KiB) http://localhost:8888/.../jquery-plugins.js.xhtml?... (191.8KiB) http://localhost:8888/.../jquery.js.xhtml?... (95.3KiB) http://localhost:8888/.../tooltip.js.xhtml?... (34.5KiB) http://localhost:8888/.../jsf.js

Prevent confirmation dialogue from opening when there's a validation error

徘徊边缘 提交于 2019-12-24 14:10:58
问题 I have a text area inside a tab of accordion panel which is a description. I am trying to edit a description and saving it. I am validating the text area so that max character shouldn't exceed 1000 character. I am using <p:message> to display validation message. Before the actual save, a confirmation dialogue will be shown to confirm the save. <p:messages showDetail="true" autoUpdate="true" /> <p:accordionPanel dynamic="true"> <p:tab id="_0" title="description"> <p:inputTextarea styleClass=

JSF Generic entity converter is not ThreadSafe

跟風遠走 提交于 2019-12-24 14:01:10
问题 I have been using the famouse entityConverter for a long time, but today I realised that this is not thread safe and it can generate concurrences errors. If one thread adds a element in the Hash, and another reads the hash at the same time, a java.util.ConcurrentModificationException exception will be threw Somebody can confirm this problem? Thanks The converter code : taken from BalusC post Generic JSF entity converter @FacesConverter(value="entityConverter") public class EntityConverter

Primefaces selectManyMenu-> loading default values

[亡魂溺海] 提交于 2019-12-24 13:54:53
问题 im using jsf 2.2 majorra and primefaces 5.1 to build a webapp i know this has probably been answered before, but i dont find my error... i took examples from the primefaces showcase and tried some stuff suggested by the internet, but it doesnt want to work <?xml version="1.0" encoding="UTF-8"?> <ui:composition template="/WEB-INF/template/master.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces

JSF <h:inputText> / <h:outputText> not rendering according to boolean value

雨燕双飞 提交于 2019-12-24 13:53:58
问题 I have a <h:dataTable> that is populated from an Entity class and displays different products. I want to be able to click a <h:commandLink> and edit row that the link belongs to. I have structured it mostly the same way as this nice example and article at mkyong. The table (with some columns excluded): <h:form> <h:dataTable id="gnomeTable" value="#{gnome.productList}" var="item" styleClass="gnomeTable" headerClass="gnomeTableHeader" rowClasses="gnomeTableOddRow,gnomeTableEvenRow" bgcolor="