Most voted "jsf" questions
Javaserver Faces (JSF) is a Model-View-Controller framework commonly used to create web applications. Always inform: What is the JSF version you are using; What technology you are using, JSP or Facelets; Error messages displayed; Minimum copy of code that can be executed.
Learn more…1,003 questions
Sort by count of
-
4
votes1
answer380
viewsProblem with Spring Security - page not located
When the user accesses a page that he does not have authorization for, it is to be directed to the page of AcessoNegado.xhtml. But it presents the following image: This page is located here:…
-
4
votes1
answer879
viewsSpring boot Data-JPA and JSF Java Config
I am setting up a project using Spring boot for ioc and Data-Jpa along with JSF however I have a problem with @Autowired my DAO is not carrying. Does anyone know how to do that configuration and…
-
4
votes2
answers450
viewsError including CSS/JS in the head of a JSF page
I’m trying to include a CSS in a JSF view. However, I’m not succeeding. Below we have an excerpt from the view: <h:head> <h:outputStylesheet library="css" name="bootstrap.css" />…
-
4
votes1
answer341
viewsHow to add data to a list whenever a <p:hotkey> is used?
I have a <p:hotkey> which is the Primefaces component for working with shortcuts. Every time I press Ctrl + 1 two new fields appear on the page but I would like every time I press this…
-
4
votes1
answer1762
viewsHow to take the value bound to a selectOneRadio and assign it to an attribute in a bean
I request help to implement a method/way to take the value bound to a selectOneRadio (which is an Enum) and assign it to an attribute within a Bean. After obtaining the value linked to…
-
4
votes1
answer505
viewsJSF/Hibernate How do I save null to a database field?
I have an application using Primefaces/JPA-Hibernate/Tomcat8, and I need that when a field on the screen is empty, it will record null in the bank (Postgres). I need this because I have some fields…
-
4
votes1
answer2259
viewsHow to send an object by parameter?
I have the following code snippet: <p:selectOneMenu id="agencia" converter="agenciasConverter" value="#{agenciasMB.agencias.agencia}" style="width:150px"> <f:selectItem itemLabel="Selecione…
-
4
votes1
answer152
viewsChange Selectonemenu
I am working with the tables Parents, Province and Municipality, using JSF, Primefaces and Ejbs. But when executing the Project gives the following error: javax.faces.Facesexception: /location.xhtml…
-
4
votes1
answer126
viewsError in JSF converter
I’m having trouble converting JSF, always returns null. Convert Project: @FacesConverter("projetoConverter") public class ProjetoConverter implements Converter { @Override public Object…
-
4
votes1
answer66
viewsProblems with Nullpointerexception
I am making a Java application using primefaces 5.1 and was working correctly the part of deleting students in version 2.1 before upgrading to version 5.1. I am trying to delete a student, but this…
-
4
votes1
answer510
viewsProblem with deploying to Heroku
I’m using Maven, Java, JSF, Primefaces, Hibernate, Mysql, CDI and Tomcat 8 on the local machine to create the app. Now I’m trying to climb up and I’m having great difficulty getting the project up…
-
4
votes1
answer193
viewsJPA ordered return from the Many side of an @Onetomany entity using @Orderby
I have the following entity Cliente who owns Pedidos. The relationship between customers and orders is mapped with Cliente @OneToMany and Pedidos @ManyToOne. What I need is for the Customer Order…
-
4
votes0
answers148
views -
3
votes1
answer850
viewsPrimefaces Datatable Lazy - Table does not present records
I’m creating a Lazy datatable, but although the class load is loading the records correctly, the table remains empty. XHTML: <p:dataTable value="#{chamadoMB.chamados}" var="c"…
-
3
votes1
answer201
viewsWrite HTML in JSF - Frameworks fonts?
I see in several code examples the views using those tags jsp, what I find very ugly and dirty. Are there any java web framework that is used in app corporate and can give me normal html, without…
-
3
votes2
answers3040
viewsSelect all checkboxes by clicking another Primefaces checkbox
I have a question, how to select all checkbox that is inside a panelgrid? I saw that it is possible to do this via Avascript. But I was in doubt about how to perform the method because to select…
-
3
votes1
answer1708
viewsHow to create a project with JSF, Primefaces, and Tomcat running in Eclipse and Netbeans at the same time?
How do I create a Maven project with JSF, Primefaces, and Apache Tomcat so that it runs on both Eclipse and Netbeans without problems? (Preferably with the latest versions of the technologies)?…
-
3
votes2
answers1597
viewsPrimefaces, button requires two clicks to perform action
While executing the code below, I have to double click on the button so that the delete action happens I saw many with similar problems, but no effective solution: <h:form id="TablePais"…
-
3
votes1
answer426
viewsHow to make a Spinner that only accepts numbers in Primefaces?
I am using Primefaces for a college project. How do I make "Spinner" not accept "Characters" only numbers? Idade: <p:spinner id="spinnerBasic" max="120" value="#{spinnerController.number1}"/>…
-
3
votes1
answer1064
viewsI can’t connect Jpa to Postgresql at all
Good I’m trying to connect the postgresql, however, without success. My application will be an application jsf and so I’m using persistence. <?xml version="1.0" encoding="UTF-8"?>…
-
3
votes1
answer100
viewsMethod not found using JPA
I created a method for autocomplete. However when I invoke this method it is not found, follow below error: Advertência: /pessoal/cadastrar.xhtml @35,186…
-
3
votes1
answer1993
viewsDynamic fields with jsf and ajax not rendering mask
I have a JSF form in which I add fields <input> dynamically with AJAX. When I click on <h:commandButton> that trigger the routine of adding the <input> the field is added however…
-
3
votes2
answers595
views@Named does not work JSF
I am doing a project with jsf 2 and glassfish server when I put @Named in my bean the attributes get null only works with @Managedbean someone has already gone through this problem
-
3
votes2
answers1390
viewsjpa jpql filter without using the primeface filter (with proper method)
Changed to likely solution however is not working yet, it seems to me that the line is not updated with ajax. <h:body> <h:form id="formTableProd"> <ui:composition…
-
3
votes1
answer1738
viewsLazy Load Onetomany
Hello. I’m having trouble getting my relationships fetch = Fetchtype.LAZY to work with the @Onetomany annotation. In my Notafiscal entity, there are several lists fetch = Fetchtype.LAZY, when…
-
3
votes2
answers1142
viewsConvert and Validator with CDI injection
Can someone inject CDI or EJB into JSF 2.2 Converter or Validator? It was said that from 2.2 it would be possible but I’m not getting it. I’ve tried to @EJB UserService userService and also @Inject…
-
3
votes2
answers6933
viewsHow to download a . pdf file with JSF?
I’m using JSF and Primefaces, and I need to download a PDF that I generated with iReports and Jasper. I save the PDF this way, this way: String caminhoReports =…
-
3
votes1
answer1333
viewsConditional validation in Primefaces component
Hello! I have the following problem. I have inputText description which gets disabled by default. When I click the search button, it enables inputText and then instance an object for search. If I do…
-
3
votes0
answers124
viewsPass Spring object to JSF
Well, I have a class that is almost entirely populated with Facebook data, but two attributes are missing that have to be filled from data coming from a form. Here is the form:…
-
3
votes2
answers949
viewsAdd field by clicking button
I am developing a client registration project, in a form using Primefaces I would like to click on a button and with this appear an inputText, if you click again, another appears and so on. This is…
-
3
votes1
answer596
viewsIntegrate Spark using Maven
Hello. I bought the Theme+Spark layout of the primefaces. In the community they wrote me that to use the layout. I would have to import the file spark-theme.1.0.war. Once imported, the full set of…
-
3
votes1
answer550
viewsSelectonemenu is not sending the parameter to the Bean (Validation Error)
In XHTML, my Selectonemenu is giving validation error at Issue time: <p:selectOneMenu value="#{relatorioProdutosLogsBean.usuarioSelecionado}"> <f:selectItem itemLabel="Selecione"…
-
3
votes1
answer261
viewsPrimefaces Mobile does not work p:Poll
I am implementing p:poll on a page that user can see their updated position in a queue. I tried to run on a page but it didn’t work, the updated queue position went blank in the field using…
-
3
votes1
answer398
viewsui:include with JSF rendered does not work the actions
have two ui:include within a template, follow the example below: /*Desse Jeito ele entra nos metodo corretamente!*/ <ui:include src="../home/dados.xhtml"></ui:include> /* com rendered…
-
3
votes1
answer162
viewsHow to get the values of the last 4 columns with Jquery
I have a panelGrid, and would like to know how to get the last 4 elements before a given of the same line. That is, I have a line, and the last element will receive the sum of the previous four.…
-
3
votes2
answers728
viewsError in converting JSF
Error or Bug? Well I have an error appearing in the eclipse console, on the registration screen the form records perfectly, everything ok, but the console points: java.lang.NumberFormatException:…
-
3
votes1
answer671
viewsHow to override CSS Primefaces added via Maven?
I am using Megamenu in my project, but its options are much larger than the width of the columns of this component, so the menu options exceed the area intended for them, which is very ugly. I added…
-
3
votes2
answers3134
viewsHibernate Validator @CPF that can be null
I’m using the Hibernate Validator with the annotation @CPF. It is validating beauty, the problem is that my system can have the CPF field without value (null) and Hibernate does not accept it. I put…
-
3
votes0
answers399
viewsEmpty bean with Primefaces
I created a page with a datatable and to register something I display the form on a p:dialog of Primefaces works perfectly, but when I create the layout of Primefaces to put my page inside the…
-
3
votes1
answer1027
viewsFill select return ZIP code web service
I am using the example of the site viacep for when the user enters the zip code is filled in the other data of the address, however I would like the state through a select to be filled…
-
3
votes2
answers677
views -
3
votes1
answer738
viewsHow to get quantity of items from an Arraylist?
I’m trying to count how many items there are in one ArrayList, I already have something ready: private int quantidadeN = listaNotificacaos.size(); It should store the quantity within the variable…
-
3
votes1
answer152
viewsMy List is not updated correctly with database data
I have a dataTable and a button that selects the object in each line of the dataTable. When I click on that one button Dialog is opened with some data and a Send button, when I click this send the…
-
3
votes1
answer1027
viewscannot be cast to java.lang.String autocomplete primefaces
I’ve had this problem for days, and I can’t fix it. I am using primefaces autocomplete to search for customers registered on my system. I have already done my converter, I followed a tutorial and…
-
3
votes1
answer274
viewsHow to generate compiled classes and maintain the. java in Maven?
Guys every time I do Maven install it compiles the classes and generates the xxx.class, so far so good. I would like to know if it is possible to generate . class and also keep all . java, in the…
-
3
votes2
answers1109
viewsChange the Label color of a chart in Primefaces
I have a chart and the labels which are on the x-axis are with a very dark color and I would like to change this color, I have tried to change the color property of the graph but only the title…
-
3
votes3
answers210
viewsHow to create tables when starting Sisitema with JSF and JPA?
Guys, how do I make sure that when the system starts the tables you are created automatically? The way my system is, tables are only created when some kind of access to the bank is done. For example…
-
3
votes3
answers143
viewsHow to enter records when starting the JSF+JPA system?
How do I insert pre-registered records into the system with jsf and jpa. I want when the system starts the admin user to be created.
-
3
votes1
answer338
viewsDynamically update a primefaces table
Hello, I am creating a java register with Primefaces. I have the following problem: I have a screen in xhtml and it carries the registered data, so far so good. The problem is when someone on…
-
3
votes1
answer2713
viewsConversion Error - Null Converter
I have an application where you have a client record with selection of plan, such plan comes from the bank. when submitting comes the following error: Erro de conversão ao definir o valor…