jsf-2.2

h:commandButton is not working once I wrap it in a <h:panelGroup rendered>

坚强是说给别人听的谎言 提交于 2019-12-17 20:26:36
问题 The reason why the topic has "kind of" is because I have an example in JSF 2.2 where I use a commandButton and call a bean function twice (depending on the url). It's basically the same code, which executes only in one example. Here's the code with the description of the "error" below the code: User bean @ManagedBean @RequestScoped public class User { private String name; private String surname; private int age; private int id; public String getName() { return name; } public void setName

When downloading Mojarra libraries for JSF it is showing error “zip file is empty” in Eclipse

十年热恋 提交于 2019-12-17 19:23:41
问题 I'm working on JSF project, I'm trying to set up project facets in Eclipse, When I'm downloading Mojarra libraries for JSF2.2 it is giving error message. I'm using Eclipse Neon 2. See the below image for more information. 回答1: Adding Mojarra Manually When Eclipse Luna/NEON/Oxygen JSF Download Library Is Empty... When I was setting up a fresh install of JavaEE on my laptop today, the JSF Download Library would not return any results to download. Some searching suggested that I had to change my

javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL does not work anymore since Java EE 7 / EL 3.0

偶尔善良 提交于 2019-12-17 07:37:52
问题 <context-param> <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name> <param-value>true</param-value> </context-param> Does not work with the latest Mojarra 2.2.5 on both glassfish 4 and wildfly 8 Final I have seen multiple bug reports on this, Manfried Riem says, It was determined this is an EL issue and the EL implementation has been fixed to fix this The fix versions says 2.2.5, and it is also stated in the release notes of 2.2.5, am I missing something? 回答1:

@ViewScoped bean recreated on every postback request when using JSF 2.2

守給你的承諾、 提交于 2019-12-17 03:18:15
问题 I'm having an issue similar to this post and the answer from @BalusC with 3 solutions but: I'm not using of the mentioned EL expressions I don't want to go with the second solution (it's complex enough for me like this) and partial state saving is set to false. My code is as follows: index.xhtml : <?xml version="1.0" encoding="windows-1256" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml

Exception handling in JSF ajax requests

旧时模样 提交于 2019-12-17 02:33:26
问题 How do I handle the exception and access the stack trace when an exception is thrown while processing a JSF ajax request? Right now, I only get the exception class name and message in a JavaScript alert when JSF project stage is set to Development. Even worse, there's no visual feedback whatsoever when JSF project stage is set to Production, and the server log doesn't show any information about the exception. If that's relevant, I'm using GlassFish in Netbeans. 回答1: This problem is known and

Get rendered html code in Backing Component from Composite Component

南楼画角 提交于 2019-12-14 04:20:07
问题 How can I get the posted form data in the backing component in the processUpdates method? @Override public void processUpdates(FacesContext context) { //get here rendered html code } Or can I get the posted form data in the decode method? [Edit]: My goal is to get the posted form data - Not to get the generated html code (Sry I wasn't precisely) 回答1: It is unclear what you want to achive, yet. I mean, at high level. UIComponent.decode and processUpdates are medium-level lifecycle APIs which

Primefaces data for data table is getting confused

冷暖自知 提交于 2019-12-13 21:38:08
问题 Sorry for the title but I have to explain what I want to do and what isn't working. My web ui with JSF 2.2.10 and primefaces 5.2.6 shows a search mask and search results upon a model. Each search instance is shown as a tab in a tabView . When a tab is clicked, its corresponding search instance is shown under the tabView in a dataTable . A search instance is created upon a search template, so different search instances can have different input fields and different result fields (which are the

How to setup project to support h:inputfile in JSF 2.2

久未见 提交于 2019-12-13 20:42:13
问题 I'm developing new project which use JSF 2.2. My tools id Netbeans 7.3 Bata1 + Mysql + EclipseLink. I want to use tag on my project, but after I add JSF 2.2 library to project and test deploy it, I got some warning message: WARNING: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor@6054cd1b]. WARNING: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor@6054cd1b] from index [0] WARNING: JMX

How Catch WELD-001303 Faces Flow

匆匆过客 提交于 2019-12-13 15:44:58
问题 I'm studying the flow faces and implemented something similar as described in http://en.kodcu.com/2013/08/jsf-2-2-use-faces-flow/ have difficulty after leaving the flow if I use the browser back button and click on a button the previous page I get the exception WELD-001303 No active contexts for scope type javax.faces.flow.FlowScoped . Does this happen because the flow has already been destroyed? Is there any possibility of treating this error? Or should I simply redirect to a page when

How to use JSF's pass-through attributes with f:selectItems

老子叫甜甜 提交于 2019-12-13 12:32:35
问题 I use h:selectOneMenu and f:selectItems and want to add title attribute to HTML's option tag. It works fine with a static value: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:p="http://xmlns.jcp.org/jsf/passthrough"> //... body / form <h:selectOneMenu id="select-opts" value="#{bean.option}"> <f:selectItems value="#{bean.allOptions}" var="option" itemLabel="#{option.name}" p:title="static value" /> </h