Questions tagged as 'java'

1
answer

Using enums in java

I created an enum and need to set the values in the database in this way: If it is Revenue, the value is 0; If Expense, the value is 1; This is my Enum: public enum EntryType { INCOME, OUTPUT; } In my java controller, the type...
asked by 21.02.2017 / 01:05
1
answer

Pass variable from the daughter page to the parent page in jsp

I am making a simple crud in java using jsp and servlets . And I came across the following situation: I have layout.jsp which makes the include of another dynamic page, which in this case will be excluir.jsp ....
asked by 22.02.2017 / 19:09
1
answer

Export datatable to PDF

I'm using Java, JPA, Primefaces, Wildfly, I have a datatable that I need to export to PDF, in excel it just adds the poi.jar that works but in PDF I do not know which poi I should add, / p>     
asked by 09.02.2017 / 14:29
1
answer

Angular, Java Service REST

I'm trying to persist (insert data) using AngularJS and WebService REST in Java, when I click Insert, the following error appears in the console: >    POST link 415 (Unsupported Media Type). What could it be? // WEB.XML <?xm...
asked by 19.02.2017 / 18:06
2
answers

pass several parameters in ireport

I have the following problem: I created in Java a selectcheckbox , where the person will select several objects; when I send to managed bean , I get these objects listed. Now I want to send as a parameter to ireport to generat...
asked by 16.06.2017 / 20:33
1
answer

Primefaces get chosen value in autocomplete

I'm working with AutoComplete of primefaces and I'm having a problem. For example, the user types the OSW word in the combo and then dropdown lists all contracts that have the term OSW . So far so good, but when the user...
asked by 31.01.2017 / 18:26
1
answer

Modularising registration forms in JSF is possible?

The question is this ... although the problem does not involve JPA / ORM I find it interesting to contextualize. My project has an @Entity Address and as the name suggests it is an entity responsible for storing data related to the real est...
asked by 21.03.2017 / 04:20
1
answer

What is the difference between Error and Exception?

Why do we have Exceptions ( IOException , for example) and Errors ( OutOfMemoryError , for example)? I know that both inherit from the Throwable class, but What is the difference between them?     
asked by 18.03.2017 / 20:23
1
answer

How do I move a triangle around the corners of the screen using java?

I'm pretty new to java and I'm working on the project so I have to draw a triangle (which I have to call alice) which is located in the upper left corner of the screen and it has to move straight to the corner top right, then move to the lower r...
asked by 05.02.2017 / 17:52
1
answer

How to get element id just inserted - JAVA [duplicate]

How do I get a id of an element just inserted in the Database in Java? Something like: mysql_insert_id() no PHP .     
asked by 05.02.2017 / 17:44