Posts by DiegoAugusto • 8,694 points
325 posts
-
1
votes1
answer1066
viewsQ: Format date in Angular for Java.util.Date
I have the following date generated in Angularjs: 2015-09-14T18:38:03.637Z when I try to give a POST the following error happens in the backend: Caused by: java.text.Parseexception: Unparseable…
-
1
votes1
answer767
viewsA: How to pass a list of an object that contains another object (composition) to a JSON
I solved the problem by adding a include("operadora") in the result thus: result.use(Results.json()).withoutRoot().from(contatoDAO.lista()).include("operadora").serialize();…
-
3
votes1
answer767
viewsQ: How to pass a list of an object that contains another object (composition) to a JSON
I have two classes: Contact and Operator. A in the Contact class I have a composition: private Operadora operadora; I have a DAO where I have a class that returns a list of Contacts, in the console…
-
2
votes2
answers2057
viewsQ: Consuming Json with Angularjs
I’m trying to access a EndPoint through the Angularjs. This is my Service: angular.module('empresa-view') .factory('empresaService', ['$resource', function ($resource) { return…
-
3
votes1
answer377
viewsQ: Save data through POST in the database with Vraptor
I have two methods in my Controller, one that lists all database data and a method to save data in the database. I can already list all data when accessing URI but when I try to save from that…
-
1
votes0
answers142
viewsQ: Problem rendering JSF page
I have a very "boring" problem, yesterday I had a system JSF working perfectly with all pages opening correctly. When I enter the system today the page is like this: No component of Primefaces or…
-
1
votes0
answers131
viewsQ: Recover Database in Mysql
It had a server with several databases, but an error occurred and the server had to be formatted and I was able to recover the data through the backup which is done daily by the company. I managed…
mysqlasked DiegoAugusto 8,694 -
1
votes1
answer555
viewsQ: Problem with Primefaces autocomplete
I have a <p:autoComplete> working, and I have a commandButton that opens a dialog so that I can make a new registration. The dialog opens, I fill the fields but when saving this exception is…
-
1
votes0
answers408
viewsQ: Scalability with Java
Currently I hear a lot about how some languages are highly scalable. But how would a scalable system be in Java? That is, a high performance system capable of withstanding millions of simultaneous…
-
3
votes2
answers2055
viewsQ: Error finding Nodejs module
I’m following a book by NodeJS and is making the following mistake: Error: Cannot find module './app/routes/home' I’ve gone over and over and found nothing wrong, here’s the code: Express.js //…
-
1
votes1
answer74
viewsA: Pass a name to a downloaded file with <p:fileDownload>
Problem solved, just changed the return of the method in this way: return new DefaultStreamedContent(relatorio, "application/pdf", "RelatorioReembolsoGeral.pdf");…
-
1
votes1
answer74
viewsQ: Pass a name to a downloaded file with <p:fileDownload>
I have a method that generates a PDF report with Jasper and returns a DefaultStreamedContent. I call the method no <p:fileDownload> thus: <p:fileDownload…
-
0
votes1
answer749
viewsA: Error generating report with Jasper Reports using JSF
Problem solved, was using a very old version of Jasper I changed my dependency to this version: <dependency> <groupId>net.sf.jasperreports</groupId>…
-
0
votes1
answer749
viewsQ: Error generating report with Jasper Reports using JSF
I’m following a tutorial which explains how to generate reports with iReport using JSF. I set up my report on iReport and it is working perfectly, I mean when I give a preview all data from the…
-
1
votes1
answer217
viewsA: Development JEE and Primefaces
Try adding this dependency to your pom.xml <dependency> <groupId>javax.enterprise</groupId> <artifactId>cdi-api</artifactId> <version>1.2</version>…
-
2
votes1
answer337
viewsQ: Error while trying to update a Primefaces dialog
I have a button that sits inside a column in a datatable, this button opens a dialog which contains a table with some data. But when I try to give a update=":frmPrin:dialogParecer" the following…
-
16
votes1
answer9352
viewsQ: Differences between JSF and JSP
Web programming a little while ago (4 months) and went straight to JSF, I mean I didn’t study anything about JSP. I started taking a course and my teacher kind of belittles JSF saying that it has…
-
4
votes1
answer341
viewsQ: How 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…
-
14
votes1
answer1047
viewsQ: What is the cardinality between a request and the services included in it?
I have the class Solicitacao and the class Servicos. After insertion in the database I intend to recover in a query all the services associated with that request. For example, on a screen I insert…
-
1
votes0
answers120
viewsQ: Add new inputText to JSF page by pressing a key
I have a form where I can have several codes registered, I would like to provide only one inputText at first, if there is need to insert more than one code I press a hot key and then another…
-
1
votes1
answer324
viewsA: Connect Java system to database on server
I solved the problem by creating a new user:…
-
1
votes4
answers368
viewsA: Difficulty with CSS in a JSF2 project
Try this: <h:body style="background-image:url(#{request.contextPath}/resources/images/textura.jpg);" >
-
0
votes1
answer324
viewsQ: Connect Java system to database on server
I have a Desk system in which I am trying to connect to a database that is on the server. But every time I try to connect the following error: java.sql.Sqlexception: null, message from server: "Host…
-
1
votes2
answers918
viewsA: Problem creating Maven project on Eclipse Mars
I solved the problem by changing the file’s proxy settings settings.xml which is in the folder of Maven.
-
2
votes2
answers918
viewsQ: Problem creating Maven project on Eclipse Mars
I was using the Maven in the Eclipse Luna Normally, I decided to test the new version of Eclipse and when I create a project Maven some exceptions are thrown: Description Resource Path Location Type…
-
1
votes0
answers336
viewsQ: Problem opening a modal
I’m using a framework called BootsFaces and every time I try to open a modal from a commandButton the modal opens but stays this way: As you can see the modal is not enabled. button that opens the…
-
3
votes1
answer1243
viewsQ: Pass multiple parameters to an SQL query
Let’s say I have the following CPF's: 65568752877 86924355382 55317961378 82331493146 I would like to pass them as a parameter in a consultation SQL, I’m trying this way: Snippet ... " AND…
-
3
votes2
answers796
viewsQ: Project error after adding Ireport dependency
When I add the dependency following the project and pom.xml get bug: <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId>…
-
4
votes1
answer404
viewsQ: Count in Ireport
I have a report where I have the column Status, in this column I have the following status: Finalized and Pending. I created a variable and added it to the band Sumary and configured the following…
-
0
votes1
answer440
viewsA: Problem generating report between dates
The solution to the problem was to change the type of the two parameters to java.util.Date before they were like java.sql.Time
-
3
votes1
answer440
viewsQ: Problem generating report between dates
I have a field DATETIME with a date and time: 2015-08-06 08:50:28. I’m trying to generate a report by passing two parameters, Data_Inicial and Data_Final so that I can get all the bank dates that…
-
0
votes0
answers45
viewsQ: How to integrate my User into Spring Security xml
I’m starting to learn Spring Security and I’m having some questions. In the past I used to authenticate users using phaseListener. I have the User MB where your scope is @SessionScoped. How can I…
-
1
votes0
answers76
viewsQ: Exception when running project
I have a project Maven where I tried to add a more recent dependency on JSF After these attempts the project always presented errors. I created a new project and copied all classes, pages etc. Now…
-
5
votes1
answer588
viewsQ: Differences between Criteria and HQL
In the booklets I read and tutorials I accompanied the Criteria is more used, but I identified more with HQL. But I have the following doubt, all that is done with Criteria it is possible to do with…
-
2
votes2
answers426
viewsQ: Load a large volume of data into a datatable
I’m having the following problem, I can load the data into my dataTable but it gets very heavy, until the IDE one hangs. How could I fix this problem? I heard about Lazy but I don’t understand how I…
-
2
votes1
answer192
viewsA: How to use the upload approach saving the path in the bank?
The problem is in your saving method: public void salvar() { this.noticia = cadastroNoticiaService.salvar(this.noticia); upload(); limpar(); FacesUtil.addInfoMessage("Noticia salva com sucesso! ");…
-
2
votes1
answer203
viewsQ: Delete method is not called when I click on a commandButton
I have an delete button that sits inside a column of dataTable and when I click on the same the method that is responsible for the user’s deletion is not called. datatable: <p:dataTable…
-
0
votes1
answer380
viewsQ: Change Bootsfaces theme
I’m trying to change the theme of a Bootsfaces application and I’m not getting it. On the site says I have to find a folder called less but I can’t find it. Customization of the Bootsfaces.jar Until…
-
6
votes2
answers935
viewsQ: Javafx Time Mask or Timepicker
I have a TextField where I enter with the hour, but I always have to type the :. How can I put a mask on this Textfield or else if it’s simpler TimePicker?…
-
0
votes1
answer654
viewsQ: Method being called twice when loading page
I have a system JSF+PrimeFaces and a page where I have a datatable, this datatable is filled in as follows: <p:dataTable value="#{tarefaBean.listar()}" id="tarefaTable" var="tarefa"…
-
1
votes1
answer809
viewsQ: Error message after opening Excel file generated by an application
I have an application that reads a file xml, takes the data and passes to a file in the format xls. But when I open the file that was Erardo appears the following message: Would someone explain to…
-
3
votes2
answers1109
viewsQ: Change 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…
-
2
votes2
answers215
viewsQ: Graphics in Primefaces
I have a method that makes a query in the bank and returns me a List, in that List I have three data that interest me: Funcionário and StatusTarefa. Example: I have 2 Employees performing various…
-
1
votes0
answers725
viewsQ: Timertask calling method twice
I have a TimerTask which calls a method every 1 minute, but the method is called twice. This method checks some factors and sends an email, as the method is called twice the email is sent twice.…
-
1
votes0
answers138
viewsQ: Error running Timertask Javafx
I am trying to perform a task every 1 minute. The task is executed but when it arrives at the right minute to perform the action of this exception: java.lang.Illegalstateexception: Not on FX…
-
1
votes1
answer350
viewsQ: Display an alert when the event is 5 minutes away
I am developing an agenda in Java, where I have in the database the date and time saved. However, what would be the best way to display an alert 5 minutes before the event? Do I have to run the…
-
0
votes1
answer121
viewsQ: Error deploying a Maven project
This is my first complete project with Maven, when I spin in the IDE works perfectly but when I do deploy on the server Tomcat some mistakes happen. Error that happens when I try to enter the system…
-
9
votes3
answers11756
viewsA: Change format of a date from yyyy-MM-dd to dd-mm-yyyy
If you want another alternative it is possible to use the <f:convertDateTime/> within the outputText which is in the dataTable Example: <p:column headerText="Data"> <h:outputText…
-
2
votes1
answer473
viewsQ: Problem with redirect JSF+Primefaces
I have a menu where I have a submenu Register and inside it a menuItem Usuários in my template, and also have a menuItem Sair. The problem is that the exit only works on the screen Home, which is…
-
1
votes1
answer662
viewsQ: Comparison of Mysql hours
I have an agenda where I register an appointment, that commitment has Hora Inicial and Hora Final. However now when I register a new appointment I have to make a check to see if the hours are not…