Questions tagged as 'java'

1
answer

List two related tables PrimeFaces x Hibernate

I need to list information from two tables on the same grid, they have relationship created by hibernate itself. You would need the vendor name in the table below. In case they would be these classes: Template: public class Produto {...
asked by 28.11.2015 / 16:57
1
answer

"nullpointerexception" error while switching activity

I have a problem and I wish someone could fix it for me. I am a newbie in the java and android programming business, I developed a project that I tested and in debug mode ran everything right. But when I compiled and uploaded the project on goog...
asked by 27.11.2015 / 18:21
4
answers

Infer class type from a generic

In the following class I want to assign the clazz attribute to the class type by inferring it from the list entered in the constructor. class Foo<T> { private Class<T> clazz; Foo(List<T> list) { //this...
asked by 09.06.2015 / 18:01
0
answers

Problem saving file on Android Lolipop of second generation g-g

Good morning, I have an application that works normally on all versions of Android from-2 to the first-generation motog-version, this app is very simple, I describe the details that I need to add in the name of the photo, shoot the photo and it...
asked by 30.10.2015 / 13:48
1
answer

how to see if a number and pair in java with recursion

var isEven = function(n) { return n % 2 === 0; }; var isOdd = function(n) { return !isEven(n); }; var power = function(x, n) { println("Computing " + x + " raised to power " + n + "."); // base case if (n===0){ retur...
asked by 31.10.2015 / 02:56
0
answers

Drawline deletes previous rows

How do I draw more than one line with the drawline? It always deletes the previous one when drawing a new one, but I want to keep it. The code is as follows public class DrawLines extends JPanel{ private final int[] origemXY = new int[2];...
asked by 29.10.2015 / 17:51
0
answers

Java, Cucumber, Maven - Feature executes without any class

I did a test automation project using Eclipse + Java + Maven + Cucumber + Selenium I have the following problem: As I'm not using git yet, I've exported this project to a .zip file, and in my work I imported it through the 'Existing projec...
asked by 20.10.2015 / 20:32
2
answers

Make PageFooter with dynamic size in iReport

When creating a report in iReport and would like PageFooter to have its dynamic size according to the components that were visible inside it. Not all components of PageFooter will be visible on all pages and others will n...
asked by 20.10.2015 / 18:33
1
answer

Update does not work when trying to update a p: panelGrid

I have a button that is within <p:toolbarGroup> where I perform some operations, I also have a <p:panelGrid> that should be rendered after the user clicks the button, but I can not update this component. I can update th...
asked by 20.10.2015 / 18:34
1
answer

NullPointException when setting value from Converter

I have an application where I need to calculate data coming from a particular relationship. When usuarioController.view == 3 , Login is set to Usuario and Plano (already persisted) to Login so that in the next...
asked by 08.10.2015 / 02:41