Questions tagged as 'java'

1
answer

Primefaces p: dataTable without the message "No records found."?

And I have a p: dataTable: <p:dataTable var="ind" value="#{logIndPersistBean.list}" paginator="true" rows="10" id="table" rowStyleClass="odd-row, even-row"> <f:facet name="header">...
asked by 19.08.2015 / 16:48
2
answers

Error: "Can not make a static reference to the non-static method from *"

Good morning, I have the following error message. on line 23 and 24 of the UserID.class.    It says: Can not make a static reference to the non-static method from   UserModel. public class UsuarioDAO { public static Boolean doL...
asked by 27.11.2015 / 15:01
1
answer

Doubts paramparing in Java

Personal speech, I am in doubt about the following method: /** * Metodo x */ public Exit Method(String n) { final Ent y = new Ent(); y.setn(n); Exit res = OpUtil.Envia(new Job() { @Override public Exit...
asked by 28.10.2015 / 23:39
2
answers

Organization of projects in packages

I'm doing a Java study and would like to learn without using those feature-rich IDEs that do it all. After several attempts to learn to use packages, creating them manually, one class is not able to see others outside the package. Here is a comp...
asked by 21.07.2014 / 21:30
2
answers

Can a servlet send to two different JSPs?

My page index.jsp uses the Servlet and then sends it to resposta.jsp . In resposta.jsp depending on the button, I use the Servlet to use another Java function. But I do not know how to make this use. In my servlet I use:...
asked by 14.11.2014 / 01:36
1
answer

Depth Array

I have an a1 Array a1=[a2[a3[a4[]],a5]] I need to know the depth of the array in this case is 3 because in the array a1 has the array a2 and inside of a2 has a3 and inside a3 has a4, that is 3 levels deep. The depth changes from array to...
asked by 30.05.2014 / 00:04
3
answers

Add picture to .jar

I have several programs that run perfectly on my machine, .jar runs smoothly and I use them as I wish, without problems. However, when I run them on another machine, the images do not appear. The program runs perfectly, everything the way...
asked by 12.05.2014 / 18:57
2
answers

Enum as Parameter NamedQuery Hibernate

Is there any way to pass as a parameter in a NamedQuery the value of Enum . public enum TipoConta{ CREDITO("Cartao de Credito"), DEBITO("Cartao de Debito"); private final String descricao; TipoConta(String descricao) {...
asked by 15.01.2015 / 16:33
2
answers

Compare dates using LocalDate

I need to do a date comparison as follows: dat_envio_shopping + 2 dias úteis < [data hoje] Until then I have done so: boletoSerasa.getEnvio().isBefore(LocalDate.now()) My question stays in these "+2 business days". How can I make...
asked by 05.09.2018 / 20:35
2
answers

How do I change the increment of a button through another button?

I have a button that adds a variable: x + 1 , and every time I click this button, the variable will increase by 1 unit. But how do I program a button to change the function of button 1, so that instead of x + 1 , be x + 2...
asked by 21.06.2016 / 19:09