jsf-2.2

Error in streaming dynamic resource. null

柔情痞子 提交于 2019-12-04 12:06:20
问题 Important Notice : This issue has been fixed as of PrimeFaces 5.2 final (Community Release) released on April 8, 2015. As such if you happened to use that version or newer, you would not need to fiddle around with a temporary workaround. The earlier given example can now safely be modified as follows. public StreamedContent getImage() throws IOException { FacesContext context = FacesContext.getCurrentInstance(); if (context.getCurrentPhaseId() == PhaseId.RENDER_RESPONSE) { return new

Using bootstrap 3 glypicons with webjars and jsf2.2

非 Y 不嫁゛ 提交于 2019-12-04 09:09:53
I'm trying to make a simple page with bootstrap and glypicons in jsf 2.2. I've included webjar's bootstrap dependency (and opening the jar I can see the fonts file are present). When deploying the app to wildfly, bootstrap css works correctly, but icons shown are horrible (like a default font or something). Looking at the network tab in the browser, I only see 404 errors: http://localhost:8080/proto/javax.faces.resource/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.woff 404 http://localhost:8080/proto/javax.faces.resource/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.ttf 404 I tried

How to pass objects from one page to another page in JSF without writing a converter

痴心易碎 提交于 2019-12-04 08:39:33
first of all sorry for my english. I have two pages in JSF2, one to list Passengers and another one to create/update passengers. I have also two @ViewScoped beans, one with the list of passengers and one for hold in pageB the selected passenger. I see the ways to pass the passenger through viewParam or @ManagedProperty but i don´t want to write a converter. What i want to know if there is a way to pass the object from pageA to pageB without passing the id of the passenger and write a converter or without passing the id and then go to the DB to retrieve the passenger. What i do and works is the

Malsup's jQuery form plugin and JSF 2.2

不羁的心 提交于 2019-12-04 06:49:51
问题 Is it possible to use Malsup's plugin to upload files like this example using JSF 2.2 so I can use its progress bar? On html forms, it seems to work around the 'name' attribute from the <input type="file"> s, all 3 being "myfile[]" in the example. Unfortunately, its equivalent in jsf is <h:inputFile> , which doesn't have a name attribute. Well, <h:inputFile> can have an id and then its name will have the same value in the generated html, but since ids are unique, so will be their names. The

Glassfish 4, JSF 2.2 and PrimeFaces FileUploadEvent not working together

浪尽此生 提交于 2019-12-04 05:31:20
After upgrading to GlassFish 4 and JSF 2.2 Primefaces FileUploadEvent stop working. With JSF 2.1 it was working with no problem. Everything is working fine except file uploading. Is there something that I am missing? GlassFish 4 JSF 2.2 PrimeFaces 3.4.2 and 3.5 Commons io version: 2.4 Commons fileupload version: 1.3 Controller side public void handleFileUpload(FileUploadEvent event) { System.out.println("HandleFileUpload"); byte[] file = event.getFile().getContents(); newFieldset.setData(file); FacesMessage msg = new FacesMessage("Succesful", event.getFile().getFileName() + " is uploaded.");

How to reset input components on change of <p:selectOneMenu> after certain validations are violated

故事扮演 提交于 2019-12-04 04:15:05
问题 I'm populating <p:selectOneMenu> from a database which contains a list of zones, when a JSF page loaded. When a zone in this menu is selected, a set of <p:inputText> is displayed in which a user can insert charge that corresponds to product weight which is to be transferred by a transporter to the selected zone in the menu. This can be shown in the following snap shot. As can be seen, when non numeric values are entered by a user, validation violations occurs, when the given save button <p

f:viewAction ignored, when commandButton navigates to page

家住魔仙堡 提交于 2019-12-04 03:58:16
问题 I have a problem with the JSF 2.2 Feature <f:viewAction action="#{...}/> . I placed this tag in my XHTML-Page, it's called viewActionStart.xhtml : <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:head /> <h:body> <f:view> <f:metadata> <f:viewAction action="#{redirect.getView()}" onPostback="true"

jsf 2.2 (final) not works on Jboss 7.1.1

感情迁移 提交于 2019-12-04 02:04:06
问题 seems for me JSF 2.2 is not working at all on JBoss 7.1.1 with jboss's multi jsf I just dropped in replacement of the jsf api and jsf implementation modules with respective jars of jsf 2.2 when my application starts I see following error: 01:46:59,286 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Initializing Mojarra 2.2.0 ( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0@11930) for context '/broker' 01:46:59,922 SEVERE [javax.enterprise

JSF 2.2 - fileupload does not work with Ajax. Form appears to have incorrect enctype (only via AJAX)

对着背影说爱祢 提交于 2019-12-03 13:26:57
Trying to implement the JSF 2.2 example I have the following code: <h:form prependId="false" enctype="multipart/form-data"> <!-- Now it's the AJAX file upload component --> <h:inputFile id="fileUpload" value="#{someBean.file}" > <f:ajax /> </h:inputFile> <h:commandButton value="Upload" /> </h:form> According to some JSF 2.2 this should work but in my case it is giving me the following error: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is application/x-www-form-urlencoded;charset=UTF-8 Looking into the request although I have set my form

CommandLink not Working on a Lazy Loaded Primefaces Datascroller

走远了吗. 提交于 2019-12-03 08:19:30
I'm having an issue with lazy loading a Primefaces Datascroller component. I have a jsf page that should display 10 events on page load. If the user wants to see more he/she can click the more button to load and display the 10 next events. For each of the event rows, there is a link that can be used to display the event's details. <h:form id="mainForm" > <p:dataScroller value="#{backing.lazyModel}" var="event" lazy="true" chunkSize="10" rowIndexVar="index"> #{event.name} <p:commandLink class="view-trigger" value="View Event Details" actionListener="#{backing.initViewEventDetails(index, event)}