Questions tagged as 'java'

1
answer

Use java project in another project

I have a java web project (a framework type) and I want to use it in my main project (the application), but I do not want to generate a .jar. I want to use it right inside my project so that when I need to make some changes I do not have all com...
asked by 06.07.2016 / 14:26
1
answer

Persist associative table in manyTomany

I have the following problem: How will I persist in an associative table that has no class? I have two classes: Person and Time, where I want to make the relationship between people and teams. This creates the Person_Time table, with the Pers...
asked by 05.07.2016 / 17:21
1
answer

Reading a text file

I need to deal with a 3-line file with the following structure: nome data horário To read this method I use the following commands: BufferedReader leitor = new BufferedReader(new FileReader("dados/dados.txt")); ArrayList<String> da...
asked by 23.08.2016 / 17:24
1
answer

Fill a jCombobox using join and hibernate

I am doing a job in college that where should I create a scheduling system for sellers from a car dealership. The technologies used are Java, Swing, and Hibernate. I divided the project into layers to make it easier, I created the client, ven...
asked by 27.06.2016 / 12:41
1
answer

How to make a form with JSF with a field that can have as many values as needed?

Considering the following entity class: import java.io.Serializable; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import...
asked by 22.08.2016 / 20:59
1
answer

Jasper does not open outside the IDE

Inside the NetBeans IDE, the code works and the report is displayed. But when generating the executable, it is not possible to open the report, receiving the null message. It's like he can not find the report. public ClienteREL() { this.pa...
asked by 23.06.2016 / 19:16
1
answer

EntityListeners @Transactional of Demoiselle - Id null

I'm setting up auditing on a project with JSF + Hibernate + Demoiselle . Class Item: @Entity @Cacheable(true) @Table(name = "itens") @EntityListeners(value = PersistenceAuditor.class) @XmlRootElement @JsonIdentityInfo(...
asked by 23.06.2016 / 16:18
1
answer

SimpleFormatData returning null HH: mm: ss

I need to get only the time entered by the user, but the method I did returns null when I try to change the format to HH:mm:ss public static Date formataData(String data) throws Exception { if (data == null || data.equals("")...
asked by 25.06.2016 / 17:37
1
answer

How to download WebView files to the SDCard if available

The App is a simple browser that works like WebView. This code causes the files to be downloaded to a custom folder and works perfectly. mWebView.setDownloadListener(new DownloadListener() { @SuppressLint("InlinedApi") public void...
asked by 29.07.2016 / 21:17
1
answer

Removing items from a OneToMany interface by default

I have an entity that has a list attribute of type OneToMany: @Entity public class Pai { private List<Filho> filhos; //demais atributos... @OneToMany(mappedBy = "pai", cascade = CascadeType.ALL) public List<Staff>...
asked by 20.07.2016 / 17:42