Questions tagged as 'java'

1
answer

Apache poi SpreadSheet

My code when generating a spreadsheet within an excel file it erases all the others, how do I make it create the spreadsheet in 2nd without deleting the others? My code: import java.io.*; import org.apache.poi.xssf.usermodel.*; public clas...
asked by 12.11.2017 / 15:48
2
answers

How to save in Date type in this format 10-10-2017 using SimpleDateFormat?

How can I save a Date in the format 10-10-2017 using SimpleDateFormat ? Date data = null; SimpleDateFormat formato = new SimpleDateFormat("yyyy/MM/dd"); try { data = formato.parse(dataInicio); } catch (ParseException e...
asked by 13.11.2017 / 19:48
1
answer

Transforming Collections into Stream

Would there be a way to convert the following code to java 8 Stream? setores = new SetorBusiness().buscarEtiquetaFuncionario(null, codDiretoriaSelecionada, codCoordSelecionada, uf, cidade, servidor, null, null, agencia); parametrosRela...
asked by 13.11.2017 / 18:23
0
answers

view PDF in java application - Embedded - Rendering problem

Hello, I need to view PDF's in my JAVA application. After some research, setting aside paid components, it seemed to me that the best answer would be this: Displaying pdf in JavaFX The colleague suggests using the [PDF.js][2] l...
asked by 13.11.2017 / 18:22
1
answer

Doubt How to perform onChange in two Selects

I would like to know how best to perform an onChange in the two selects I have in my form follows the selects: <div class="row"> <div class="col-md-12"> <div class="form-group ${status.error ? has-error : '' }"> &...
asked by 12.12.2017 / 19:57
0
answers

Adding a Document to an Array in MongoDB

This week, I started messing with MongoDB (I've never had much contact with any DB before) and a question has just come up that I can not solve (I researched, believe). Let's go to the following context: @Listener(targets = ExceptionUnc...
asked by 25.11.2017 / 01:44
0
answers

Rollback while persisting entity with hibernate

I have an entity Product: @Entity @Table(name = "produto") public class Produto implements Serializable { private static final long serialVersionUID = 1L; private Long id; private Cliente cliente; private String nome; private B...
asked by 23.11.2017 / 21:08
2
answers

Updating ProgressBar in JSF

Good afternoon, I'm doing an asynchronous method that does searches the database (oracle), and returns it in an Excel file. Within my Method has for @Async public synchronized void carregarApresentacoesParaExportar() { try {...
asked by 23.11.2017 / 21:33
1
answer

Best way for a bean to call another bean by passing itself as a parameter in JSF

I have a 1: n relation, where a System can have multiple Loggers. I also have two beans: one for System (SystemBean that refers to the systems.xhtml page) and another for Logger (LoggerBean that refers to the loggers.xhtml page). In the sistema....
asked by 08.12.2017 / 12:54
1
answer

Delete a Limit of Hibernate Records (Limit)

I'm migrating my WEB application to the Hibernate framework, however I have several SQL requests with very specific parameters. In one of these requests, I always need to include a new record in the database, delete the first 20...
asked by 10.11.2017 / 14:55