jsf-2

How can I check if an object stored with @WindowScoped is stored correctly?

跟風遠走 提交于 2020-01-05 07:44:08
问题 Two days ago I wrote this question: How can I retrieve an object on @WindowScoped? and BalusC answered with some suggestions, now I have some problem to understand if my problem is that the object in WindowScoped is stored properly or my code to retrieve it is wrong! Well, as I said, I have an object that I stored in @WindowScoped annotation but I can retrive this object only the first time! Why? I just have a doubt: the CODI extension of MyFaces could be configured in some manner? Or I can

Putting JSF composite components in a subfolder based hierarchy

折月煮酒 提交于 2020-01-05 07:17:15
问题 I'm roughly following this guide for creating composite components in JSF 2.2. I've managed to define and use a component, but I'm having problems properly organizing the components. In all tutorials the components are put into one directory and the files' names define the tag name. META-INF/resources/ts +-plainbox.xhtml +-showcasebox.xhtml I'd prefer having categories and a directory for each element, with bundled JS, CSS and images. I'd like to use a structure like this: META-INF/resources

PrimeFaces DataTables not working

邮差的信 提交于 2020-01-05 06:50:20
问题 I'm new to PrimeFaces tried out an example in PrimeFaces datatable public class Datatable { private String fname; private String lname; private int age; public Datatable(String fname, String lname, int age) { // TODO Auto-generated constructor stub } public String getFname() { return fname; } public void setFname(String fname) { this.fname = fname; } public String getLname() { return lname; } public void setLname(String lname) { this.lname = lname; } public int getAge() { return age; } public

How to rendered <p:selectOneMenu> [duplicate]

无人久伴 提交于 2020-01-05 06:40:37
问题 This question already has an answer here : Ajax update/render does not work on a component which has rendered attribute (1 answer) Closed 4 years ago . I am unable to rendered a selectOneMenu but only to disable the item for example this is working: <p:panel header="Field Chooser"> <h:panelGrid columns="2" cellpadding="5"> <p:selectOneMenu id="l1" value="#{acqBean.gb1}"> <f:selectItem itemLabel="Group By" itemValue="" /> <f:selectItems value="#{acqBean.level1}" /> <p:ajax update="l2" listener

Trying to nest JSF expression strings

▼魔方 西西 提交于 2020-01-05 04:50:14
问题 I'd like to know whether it is possible to adapt the ExtendedBeanELResolver from the question nesting-jsf-expression-strings as well to handle this nested EL expression: #{controllerBean.getBean('userProfileBean', component).street}* whereby controllerBean.getBean returns the bean userProfileBean . I'll get with the ExtenedBeanELResolver following exception: SCHWERWIEGEND: javax.el.PropertyNotFoundException: /WEB-INF/templates/modification/userProfile.xhtml @35,196 value="#{controllerBean

Maven dependecies for Mojarra 2.1

可紊 提交于 2020-01-05 04:40:16
问题 I want to use Mojarra 2.1 http://javaserverfaces.java.net/download.html and my container is Tomcat 7 and I am using IceFaces 2 . Should I include the API only as follows? <dependency> <groupId>javax.faces</groupId> <artifactId>javax.faces-api</artifactId> <version>2.1</version> </dependency> UPDATE: I am using servlet 3.0.1, jsp 2.2.1, el 2.2 maybe it's conflicting: <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope

h:selectManyCheckbox with omnifaces.SelectItemsConverter does not preselect the items

≡放荡痞女 提交于 2020-01-05 04:03:31
问题 I'm using JSF 2.0, PrimeFaces and OmniFaces. I have 2 dialogs with <h:selectManyCheckbox> . The first dialog creates a new Course : The Disciplina s are presented as: <h:selectManyCheckbox id="disciplinas" value="#{cursoMBean.listaDisciplinasDoCurso}" converter="omnifaces.SelectItemsConverter"> <f:selectItems value="#{cursoMBean.listaTodasDisciplinas}" var="disciplina" itemValue="#{disciplina}" itemLabel="#{disciplina.nome}" /> </h:selectManyCheckbox> This works fine. When I select some

Richfaces 4 rich:inputNumberSpinner: not getting “set” in backing bean

本秂侑毒 提交于 2020-01-04 11:12:09
问题 I have done JSF work before, but am new to RichFaces. To test my set up and environment, etc. I have tried to make just a simple little app where the user enters two numbers, clicks a button, and the app returns the sum and product of the numbers. Here's the code summary: web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi

h:commandLink not working when inside a list

落花浮王杯 提交于 2020-01-04 09:07:21
问题 I have a problem with RichFaces and creating lists of links. If you attempt to use any type of commandLink inside a list (I've tried ui:repeat and rich:list) the action on that link is not called. I've also tried commandButton and the a4j variations of those. I'm using JSF 2, RichFaces 4 on Jboss 6. <rich:list var="venue" value="#{searchManager.results}" type="definitions" stateVar="status"> <h:form> <h:commandLink value="CLICK IT" immediate="true" action="#{score.selectVenue}" /> </h:form> <

h:commandLink not working when inside a list

时间秒杀一切 提交于 2020-01-04 09:06:13
问题 I have a problem with RichFaces and creating lists of links. If you attempt to use any type of commandLink inside a list (I've tried ui:repeat and rich:list) the action on that link is not called. I've also tried commandButton and the a4j variations of those. I'm using JSF 2, RichFaces 4 on Jboss 6. <rich:list var="venue" value="#{searchManager.results}" type="definitions" stateVar="status"> <h:form> <h:commandLink value="CLICK IT" immediate="true" action="#{score.selectVenue}" /> </h:form> <