Questions tagged as 'java'

2
answers

Return message if no checkbox is selected

How do I make the treatment in this code so that it returns a message to the user to select at least one checkbox if he does not select any? public void verificaCheckBox(){ Listcheck.clear(); if (cbPapel.isChecked()) List...
asked by 20.04.2018 / 17:02
1
answer

Mount recursive function for TreeTable

I am trying to mount a folder tree and ask questions with Java, Jsf and Primefaces. I have two lists, one is the one that writes the folders and subfolders, and another list is the one that assembles the questions of these folders or subfolders....
asked by 05.04.2018 / 15:57
1
answer

Recover Firebase Data in RecyclerView

I need to retrieve user request requests from the Firebase in the RecyclerView so that they organize those requests in the list without overwriting the other. For now my list is static. Each user has an id in the DB and each request has tbm....
asked by 27.04.2018 / 09:32
1
answer

JPA insert an object that has a list as an attribute

I am developing a system in layers (packages), to exercise the concepts of class and I came across a doubt I would like to create a product class, it has attributes that are references of other classes: @Id @GeneratedValue(strategy = Generatio...
asked by 24.04.2018 / 00:36
1
answer

Error listing bank data - JPA2 and Hibernate / JSF

Console error in eclipse mar 27, 2018 2:05:24 PM com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException GRAVE: Error Rendering View[/Fornecedor.xhtml] javax.el.ELException: /Fornecedor.xhtml @29,86 value="#{fornecedo...
asked by 27.03.2018 / 19:17
1
answer

How to insert column title in a jTable?

I could not display the table title, could they help? Note: I entered "JScrollPane scroll = new JScrollPane(tabela); "and" contentPane.add(scroll); "or" getContentPane.add(scroll) "as I saw in questions / answers from that s...
asked by 18.03.2018 / 14:42
1
answer

How to convert a Json file to a list of objects in Java?

I'm trying to read the data from a .json file and store it in a% of objects%, however an error is occurring that I do not know what it means. Class Sale - To store the data that will be brought from the file public class Sale { private int...
asked by 18.03.2018 / 21:28
1
answer

Problem with weighted average logic

According to all the sources I consulted, several to be sure, the weighted average is calculated as follows: Add all values that have the same weight, then multiply that sum by that weight. This is done for all different values and weights. T...
asked by 18.03.2018 / 21:41
1
answer

PLSQL return error when retrieving Bank data

I try to extract data in the database and insert it into a record and then show it in cmd, However when I get a larger number of registration the procedure requires an error message. Code: SET SERVEROUTPUT ON DECLARE TYPE trec IS RECORD...
asked by 10.05.2018 / 23:11
1
answer

How to convert a JSONArray to an array of strings?

String mensao = "[\"brega_falcao\",\"SamiPietikainen\",\"TecRahul\",\"gpantuza\",\"mkyong\",\"mkyong\",\"YouTube\"]"; Mensao is the JSONArray that I want to convert. I tried this but it did not work: //Retiro o '[' do inicio e do fim ']'...
asked by 17.04.2018 / 17:40