Questions tagged as 'java'

2
answers

How do I access a Fragments ArrayList after a screen rotation?

I was trying to programmatically add to my Activity a list of Fragments that implement some CardViews. These CardViews have some TextViews that I would like to define from my Activity, and in fact it works by setting them in events after the Fra...
asked by 24.01.2015 / 19:28
1
answer

How to get a POST parameter in REST application

I started a Rest application and I have a createPost java class POST @Path("/post/") @Produces(MediaType.APPLICATION_JSON) public static String createPost(@FormParam("loopID") String loopID) throws IOException { Conn...
asked by 27.01.2015 / 21:46
1
answer

Handle two lists of a Drag and Drop component on different ManagedBeans

I'm using the Drag and Drop DataTable component. Contextualizing is as follows: I have a registration based on steps. Where in the first step I enter the information of an Edital X, which is manipulated by the editalBean, already in the secon...
asked by 29.01.2015 / 03:41
1
answer

IllegalArgumentException [closed]

I'm developing a project and I'm having a pretty annoying problem. It's a WEB system. When I search for a client it fills in all the fields I need to correct, but when I look for another client I get the following error message: The strangest...
asked by 23.09.2014 / 16:33
1
answer

Configure Relational and Non-Relational databases in the same project with Spring-Data + Hibernate

I'm trying to create a Java application where I need to set up two databases: MongoDB and MySQL. My idea is to use Spring-Data with Hibernate for both banks, but I found only tutorials for setting up Cross-Store between the banks. Is there an...
asked by 08.04.2015 / 00:06
1
answer

How do I avoid infinite loopings in an array?

"Assume that each element of this array has three values: 0 - if empty 1 - if it contains a tree 2 - if it contains fire With probability p given by the user, place a tree at each position of F (use Math.random() ). Choose a tree to...
asked by 19.11.2014 / 20:25
1
answer

Calculating hours with Java 8

I was doing some testing with java 8, and was trying to figure out the difference between hours of two dates. I did it three ways, though, I do not know which one would be the right one and would like your help. LocalDateTime t1 = LocalDateTi...
asked by 26.11.2014 / 00:21
1
answer

How to parse an XML response from the Web Service

Hello, I would like to know how I parse an xml response that I receive from my web service .. In case, I'm doing in Android, and wanted to transform the values and names that display in xml, into variables to be applied a graph with them .....
asked by 25.09.2014 / 15:22
1
answer

Put RESTful WS project in production

I'm a beginner in Java and these .jar, .war, etc businesses are new to me. I made my first RESTful Webservice project and added 2 * .jars, Gson and JDBC.postgres. I want to put it into production (on a server that will be Tomcat ) to use it...
asked by 02.10.2014 / 13:28
1
answer

Using ImageView to upload photo gallery

I want to make a program that I upload a photo to a ImagemView of the Android gallery. I need a code to open the gallery and save the image as if it were for a profile.     
asked by 06.11.2014 / 01:17