Questions tagged as 'java'

1
answer

Rename worksheet tab

I'm having trouble renaming the name of a tab in the Excell file. I am debugging and after it gives the set with the new name..I can see the new name changed in the execution but in practice the file itself is not changed. Someone? private sta...
asked by 28.02.2018 / 02:12
2
answers

How to create a generic class that receives data from two other classes

I have three classes, the superclass Refeição , and the child classes Ingrediente and Prato , wanted to create a generic class, which received data from the child classes to create a crud (with serialization). The generic cl...
asked by 09.12.2017 / 17:27
2
answers

Select does not select the correct value

I have the following problem: <select name="cargo" id="selectCargo" class="form-control show-tick maiuscula" required > <option value="">ESCOLHA A EMPRESA</option> <c:forEach items="${filaEmpresa }" var = "fil...
asked by 09.12.2017 / 13:32
1
answer

Autoincrement on Android components

Good people, I have the following code: if (bolaPreta == 1) { img1.setImageResource(R.drawable.icon_circpreto); } if (bolaPreta == 2) { img1.setImageResource(R.drawable.icon_c...
asked by 09.12.2017 / 21:46
1
answer

Convert wrong string string to be displayed [duplicate]

I have a string in the following format 2017-12-08 , however I need to display it formatted for the user as follows: 08/12/2017 , I thought about using SimpleDateFormat variable is in Date format, and I am not conse...
asked by 08.12.2017 / 17:42
2
answers

Extract JDBC Connection from EntityManager using JTA

In a JavaEE environment, is it possible to extract the JDBC connection ( java.sql.Connection ) using JTA ? I have a datasource in WildFly, where I inject as follows: @PersistenceContext private EntityManager entityManager;...
asked by 08.01.2018 / 19:47
1
answer

Annotation @Version

Using the @Version Annotation, shows this error when trying to update.    18: 25: 16.650 [http-nio-8080-exec-84] ERROR   br.com.netsoft.controller.todos.AutomationMonetariaItemController -   Row was updated or deleted by another transaction (...
asked by 07.01.2018 / 13:49
1
answer

java.lang.SecurityException: Permission Denial: starting Intent

I'm developing an Android application to make a phone call. It gives me the following exception:    java.lang.SecurityException: Permission Denial: starting Intent {act = android.intent.action.CALL dat = tel: xxxxxxxxx cmp = com.android.serve...
asked by 09.01.2018 / 14:10
1
answer

Remove date from EditText and add five years

I would like to capture a date with a EditText , and from it create another date by adding another 5 years. How could I do that?     
asked by 04.01.2018 / 18:01
1
answer

String for Array / List

I have the following String: [{"Monstro":"Lobo","HP":100,"Level":2},{"Level":"1","HP":"100","Monstro":"Bruxa"}] You need to put it inside a Array ou List to get the values of each monster. How do I do this? Sorry if the ques...
asked by 02.12.2017 / 01:12