jsf-2

<t:panelNavigation2> causes javax.faces.FacesException: Cannot add the same component twice

送分小仙女□ 提交于 2019-12-13 05:45:54
问题 I am using Tomahawk20 1.1.14 for JSF 2.0 on WildFly 8.2.0. When using <t:panelNagivation2> , the below exception is thrown: javax.faces.FacesException: Cannot add the same component twice How is this caused and how can I solve it? Here is the stack trace: Caused by: javax.faces.FacesException: Cannot add the same component twice: nav:panel-nav:nav_panel-nav_uinavmitem1 at com.sun.faces.context.StateContext$DynamicAddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:751) [jsf-impl

No saved view state could be found for the view identifier

萝らか妹 提交于 2019-12-13 05:39:09
问题 When I was running my JSF application on Jetty server it was running fine. But as I moved this to Weblogic server, it started giving me this error. javax.faces.application.ViewExpiredException: /wsListing.xhtmlNo saved view state could be found for the view identifier: /wsListing.xhtml at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:132) at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170) at org.apache.myfaces.lifecycle

Storing entities for simultaneous edition in one session in EJB JSF

烈酒焚心 提交于 2019-12-13 05:35:47
问题 We have an ideological problem while creating a Web Application in JSF, EJB and JPA. Our example situation is: Admin displays the list of users in datatable. Next, he selects user1, which leads him to new user-edition site. The issue occure if he tries to open second card or window and select user2 for simultaneous edition in the same session. When we try to save user1 data after edition it is not possible, because it is being overwritten in Endpoint by user2. Data storing: Because we do not

Primefaces ajax not firing request event from commandlink after page navigation JPA persistence

风流意气都作罢 提交于 2019-12-13 05:24:59
问题 This question is an MCVE related to Primefaces ajax not updating panel or panelGrid component in the same form The application navigates between two JSF pages. The first is a user registration form which persists a new user (Reg.xhtml) and navigates to a user profile page (UserProfile.xhtml) where the user fills in a new profile. The problem happens in the UserProfile.xhtml where an ajax action meant to fire a panel that shows the values entered by the user before the profile is persisted.

update of a render component that updates another component

心已入冬 提交于 2019-12-13 05:24:53
问题 I have a problem that i can't solve. I have my xhtml page: The problem is that i have a form where i insert the name and select the location of a travel. It renders an external panel "Volo" where the selectionMenu is updated with some values got from DB based on location selected. Next i want to get a value from Volo selection and update the another panel with ID="HE"(is the one called HotelEsc). I'm in trouble with the selectionMenu in "Volo" because i can't get the value into it. Always

Ajax redirection from inside a JSF PhaseListener fails

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 05:24:15
问题 My use case is the following: A JSF2 page has been displayed to the user. The page contains an Ajax-enabled button: <p:commandButton value="#{msgs.reset}" process="@this" actionListener="#{reworkSearchMB.clearReworkSearch()}" tabindex="13" update="mainpanel messages" global="false" disabled="#{!userMB.hasAccessToViewRework() and !userMB.hasAccessToCreateOrUpdateRework()}" /> So, the user waits for a LONG time while the page is on the screen and the session expires. After that, the user

Is is possible to delete Component HTML Content with JSF

非 Y 不嫁゛ 提交于 2019-12-13 05:19:31
问题 hi i have HTML content like: <div id="j_idt33:summary"> <ul id="j_idt33:summary2" class="summary"> <li style="margin-right: 85%; Color:red;">Some Error Message.</li> </ul> </div> i want when the user click on a button to clear all the contents of that DIV to get output like: <div id="j_idt33:summary"> </div> is it possible to do something like that with JSF ? or achieve that with JavaScript ? what do you suggest guys ? please advise. 回答1: In JavaScript side, you could do something like this:

Problems with actionListener of composite component

风流意气都作罢 提交于 2019-12-13 05:19:22
问题 I am goin to explain a problem that I have when I use one composite component inside a template. Imagine one view like this, that work with a generic managed bean with view scope. I pass it to the template as a parameter. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com

Sorting not working properly with primefaces live scrolling

爱⌒轻易说出口 提交于 2019-12-13 05:19:15
问题 I have primefaces datatable with live scrolling enabled.The columns are not getting sorted fully.When one of the columns is sorted,for example "insured" in the image shown below, all the records seem to have sorted but when i reach the end of scroll and next set of records get loaded i see other records in unsorted order as indicated in the image ,when i try to see the column in descending order.So because of this i am not getting the sorting feature accurately done(All records are not

Why does required=“true” not fail validation when disabled=“true” is specified

瘦欲@ 提交于 2019-12-13 05:16:11
问题 <a4j:outputPanel id="tapalSectionSendToPanel" ajaxsingle="true"> <h:inputText id="sendToId1" value="#{MainBean.SectionBean.sendTo}" class="createresizedTextbox" required="true" requiredMessage="#{msg.labl_required}" disabled="true" /> <h:message for="sendToId1" style="color:red" /> </a4j:outputPanel> i need to validate textbox for empty validation and should show required when i click button without entering any value in textbox. It works fine without disabled="true" . Whats the alternative