Questions tagged as 'java'

0
answers

No column names appear in jTable [closed]

I created a JScrollPane and a jTable in it, all inside a JInternalFrame, but when I run my Jframe and open this JInternalFrame, it only shows the data in lines that are in my database, but it does not show up there column names. JInternalFrame c...
asked by 11.12.2016 / 07:35
0
answers

Convert to JSON objects from classes that reference recursively

I'm trying to convert two lists of distista classes to JSON. public class CustomerItem implements Parcelable { //... private List<ProductItem> mProductList = new ArrayList<>(); ... } public class ProductItem implements Par...
asked by 16.12.2016 / 07:54
0
answers

JsfExceptionHandler ConstraintViolationImp messageTemplate

I have the mapping in the user class: @NotNull(message = "Contato não pode ser vázio.") @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "contact_id") @Getter @Setter private Contato contato; Which has the c...
asked by 17.12.2016 / 03:33
1
answer

Difference of character enconding Charset difference using JPA but not with prepared statement

I have an application using spring boot + oracle (via tomcat datasource). Using spring-data, a simple query in a table returns characters with an encoding problem. This same application, in a very specific situation, I create a direct (no dat...
asked by 23.12.2016 / 01:13
1
answer

Method delete (Restful)

I would like to know how do I do a delete method that receives a list by parameters? I mean, instead of passing only the ID of the item to be deleted, I want to allow N items to be selected and removed all at once, in a single requ...
asked by 23.12.2016 / 18:37
1
answer

Date arriving incorrect

I have the following problem here: I have a request that I make through ajax, and I send a date for it, java receives and saves it in the database, but the date that arrives in java is different from the one I sent. Follow the codes: Home Ajax r...
asked by 21.12.2016 / 22:10
1
answer

Error: Can not find symbol getRootElement [closed]

I'm trying to read a file .xml using the code below public static String lerArquivoXML(String string){ SAXBuilder builder = new SAXBuilder(); File xmlFile = new File("c:\teste.xml"); try { Document docume...
asked by 22.12.2016 / 15:06
0
answers

What is the correct way to register one to many with DDD

I have studied DDD and mounted a similar architecture to the books and examples I have read. So far, when I'm going to do a crud, when I write I run something like this: UI : The display layer fills an object with the screen data (DTO,...
asked by 29.11.2016 / 16:04
1
answer

Problems with background

I'm having trouble filling my background with a specific color in the case, blue. Here is the code for my application: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt...
asked by 29.11.2016 / 18:06
0
answers

Unit test for filter application [closed]

I want to create a unit test for the method: public BufferedImage negativo(BufferedImage image) { int width = image.getWidth(); int height = image.getHeight(); for (int i = 0; i < width; i++) { for (int j = 0; j < he...
asked by 29.11.2016 / 01:37