primefaces

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=

Primefaces, how to collapse layoutUnit using some script or jquery function

大城市里の小女人 提交于 2019-12-24 14:07:45
问题 I've two buttons on which I need to perform p:layoutUnit Collapse & Expand respectively. I tried onclick="layoutWdgt.toggle('west')" , but it toggles the p:layoutUnit. What I need is two different functions, one expand and other to collapse p:layoutUnit. I want to do it on client side not server side so I don't want to use collapsed event. I'm using primefaces 3.3.3. Thanks. 回答1: This is how i managed to solve the issue.. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C/

Anchor/JumpTo in JSF

眉间皱痕 提交于 2019-12-24 14:04:20
问题 I use JSF + Primefaces 3.2.1. There is an p:datatable on the page, in each row I have button "Edit". When I click that button, in the footer of the page renders a form for editing that row. Then I need to scroll down there to change values.. But I need the browser to scroll there automatically after clicking on "Edit" button like Anchors in basic HTML work. I found this decision: FacesContext.getCurrentInstance().getExternalContext().redirect("pProvidersPriceAppointment.xhtml#anchor1"); It

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

How to download a xml file with content from inputtextarea?

北城以北 提交于 2019-12-24 13:48:53
问题 I am trying to download a xml file using primefaces components. This part is working but I have on my page a inputtextarea, and I would like to have the text that I write in the inputtextarea written in the xml file that is downloaded. Could a developer help me ? Thank you. my view : <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org

Error in WebSphere 8.5 + Mojarra + MyFaces2 + Spring webflow

独自空忆成欢 提交于 2019-12-24 13:26:07
问题 I am trying to deploy a web application in WebSphere 8.5. The app has the following characteristics. Mojarra 2.1.13 Primefaces 3.4.2 spring webflow 2.3.1 spring 3.1.2 jdk 1.6 This app works very well into Tomcat 7 but when we try to deploy it into WebSphere we got a NullPointerException with the following stacktrace. javax.faces.component.UIComponentBase.restoreDeltaSystemEventListenerClassMap(UIComponentBase.java:1933) javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java

JSF - List of objects in a Managed Bean and memory management question

和自甴很熟 提交于 2019-12-24 13:15:35
问题 I am creating my first JSF application. For this question I am going to simplify everything to try and make my question as clear as possible. The application I am creating is a simple contact storing application that will allow you to create a new contact, store information such as addresses, phone numbers, where they work, and upload files that are associated to the contact. When the application loads the user is displayed with a list of contacts that have already been created. They can