jsf-2.2

Migrating JSF 2.2.6 to 2.2.8 cause java.lang.IllegalStateException com.sun.faces.context.FacesContextImpl.assertNotReleased

只谈情不闲聊 提交于 2019-12-11 10:20:00
问题 I want to migrate my application to jsf 2.2.8 to use this [bug fix][1] But when i try to move on with 2.2.7 or 2.2.8 , i get on the first page of my application. The application running on Tomcat 7.042 is using Richfaces 4.3.5 & Spring 3 by the way. java.lang.IllegalStateException com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:705) com.sun.faces.context.FacesContextImpl.getAttributes(FacesContextImpl.java:237) org.richfaces.context.ExtendedPartialViewContext

JBoss 4.2.3 Servlet API 2.5 JSF 2.0 Hibernate 3.0 Support Added

做~自己de王妃 提交于 2019-12-11 10:17:46
问题 While deploying my project on Redhat 6 with Jboss 4.2.3 I was having following difficulties so I decided to put it on stackoverflow so that it can help other people. If anyone could suggest a good title so that it can easily be searched, please Q: How to make Jboss 4.2.x to ignore old JSF libraries and use one within your project libs? Q: How to make Jboss scan specific path for WAR file scanning? Q: How to bind Jboss with IP address rather then localhost? Q: Where Jboss put exploded WAR file

DataTable RowExpansion Lazy Load

送分小仙女□ 提交于 2019-12-11 09:40:40
问题 I am currently trying to implement a lazy loading row expansion. I added a dataGrid in my rowExpansion which value attribute is a method which gets a detailed User from database. When I debugged this method (userBacking.getDetailedUserById(Long userId)) I recognized that this method is called minimum 5 times when I click on a row. Does anyone know why this method is called so many times? Are there better approaches to implement a lazy loading row Expansion? <p:dataTable id="myPassengerTable"

Business logic inside an accessor / getter method in JSF

六眼飞鱼酱① 提交于 2019-12-11 09:19:50
问题 I have three tables in MySQL database. category (excluded from this question) sub_category product The relationship between these tables is intuitive - one-to-many in the order in which they appear. I'm iterating through a list of SubCategory , List<SubCategory> using <p:dataGrid> as follows. <p:dataGrid var="row" value="#{featuredProductManagedBean}" rows="4" first="0" columns="1" rowIndexVar="rowIndex" paginator="true" paginatorAlwaysVisible="false" pageLinks="10" lazy="true"

SWF in JSF 2.2 causes java.lang.NullPointerException at com.sun.faces.application.NavigationHandlerImpl.determineViewFromActionOutcome

两盒软妹~` 提交于 2019-12-11 09:16:49
问题 I've a JSF 2.2 + Spring WebFlow application. When the below command button is pressed <h:commandButton value="Aggiungi" action="#{pageController.modifica}" /> the following action is invoked public String modifica() { // ... return "gest"; } and the following navigation case needs to be resolved <navigation-case> <from-action>#{pageController.modifica}</from-action> <from-outcome>gest</from-outcome> <to-view-id>/newxhtml.xhtml</to-view-id> <redirect /> </navigation-case> the following

Supplying parameters through p:remoteCommand to a Spring bean

百般思念 提交于 2019-12-11 08:18:16
问题 The following XHTML sets a selected value in <p:selectOneMenu> to a request scoped bean through <p:remoteCommand> . <h:form id="languageForm" prependId="true"> <pe:blockUI target=":body" widgetVar="blockBodyUIWidget"> <h:panelGrid columns="2"> <h:graphicImage library="default" name="images/ajax-loader1.gif" class="block-ui-image"/> <h:outputText value="#{messages['blockui.panel.message']}" class="block-ui-text"/> </h:panelGrid> </pe:blockUI> <p:selectOneMenu id="languages" value="#{localeBean

Add passThroughAttribute to SelectItem

天大地大妈咪最大 提交于 2019-12-11 07:46:20
问题 If I want to add passThroughAttributes to some of the options of a select -element I can use f: passThroughAttribute as child-component of f:selectItem. But normally I'm using a List of SelectItems to generate the options. In contrast to UiComponent SelectItem does not have a method getPassThroughAttributes. Anybody knows a reason why? 回答1: It's because it doesn't have a Renderer associated. In case of <f:xxx> components (taghandlers and models) it's instead the closest parent <h:xxx>

Removing beans from session

喜夏-厌秋 提交于 2019-12-11 07:44:39
问题 I have some @SessionScoped CDI beans. Previously all of them were JSF managed beans (changed from JSF managed beans to CDI managed beans). I was doing like the following to remove some session scoped JSF managed after a user successfully places an online order. Map<String, Object> sessionMap = context.getSessionMap(); sessionMap.remove("cartBean"); sessionMap.remove("orderItems"); sessionMap.remove("reviewOrderBean"); sessionMap.remove("intermediateLocaleBean"); sessionMap.remove("localeBean"

Validation across multiple fields in JSF/PrimeFaces

别等时光非礼了梦想. 提交于 2019-12-11 06:46:32
问题 I need to validate across multiple fields in such a way that validation should be violated only when one of the given fields is violated. It is distinct from cross field validation in which a value of one field is dependent upon the value(s) of one or more of the rest of the fields. Given below a simple scenario. <p:inputText id="txt1" value="#{testBean.txt1}" required="false" maxlength="45"/> <p:inputText id="txt2" value="#{testBean.txt2}" required="false" maxlength="45"/> <p:inputText id=

Debug update moderl phase, setter not being called

こ雲淡風輕ζ 提交于 2019-12-11 05:49:58
问题 This is a problem of build vs render time I guess. I've a comment section which is a tree of comments. Everything works fine... except for some comments the bean setters is not called. So my understanding is that : when using ui:repeat the composite component is included once at build time, then for each item is rendered with its appropriate value. Why it doesn't work ? no clue. when c:forEach is used, the composite component is integrated multiple times then at render time the item is lost