Posts by Leandro Santos • 453 points
33 posts
-
0
votes1
answer71
viewsQ: How to get the current Url in a Webview - IOS
I’m trying to get the current URL because when I’m at a certain URL I need to open the camera of the phone. With android got it, but with iOS on Xcode I’m not getting it, I tried this code more…
-
2
votes1
answer134
viewsQ: Problems with LAZY - could not initialize proxy - in Session
I have a problem trying to load an object that is mapped as LAZY. I mapped my attribute this way: @OneToOne(fetch = FetchType.LAZY) private Obra obra; And I load the data at the time of opening the…
-
1
votes0
answers714
viewsQ: Error accessing Webcam.js - Error: Webcam is not Loaded yet
I’m getting this error while accessing Webcam.js Error: Webcam is not Loaded yet I’m already using secure connection plus error persists. I’m using Primefaces, the component photocam. Application…
-
1
votes1
answer142
viewsQ: Psqlexception: ERROR: target lists can have a maximum of 1664 entries
I am trying to persist an object in the database but I get this error: WARN: SQL Error: 0, SQLState: 54000 ERROR: ERRO: listas de alvos podem ter no máximo 1664 entradas Advertência: A system…
-
0
votes0
answers44
viewsQ: Error: Datamodel must implement org.primefaces.model.Selectabledatamodel when Selection is enabled
I am implementing a selection list (Datatable) but I only get this error: Datamodel must implement org.primefaces.model.Selectabledatamodel when Selection is enabled. Follow the code below:…
-
3
votes1
answer476
viewsQ: Read JSON and turn it into Java list
I have the following JSON: { "_status": "sucesso", "_dados": [ { "IdIntegracao": "H1xo7lOOX", "SacadoCPFCNPJ": "08896903912", "SacadoEmail": "[email protected]", "SacadoEnderecoNumero": "228",…
-
0
votes1
answer1216
viewsQ: Reading of Java XML
I’m trying to read an XML in Java to get data from an NF-e. I tried so to try to get only the product code to test more unsuccessfully: public void testeaa(String xml) throws DocumentException {…
-
1
votes1
answer39
viewsA: How to initiate page in case of error in web.xml JAVA
I resolved so <error-page> <exception-type>java.sql.SQLException</exception-type> <location>/error.xhtml</location> </error-page> <error-page>…
javaanswered Leandro Santos 453 -
0
votes1
answer39
viewsQ: How to initiate page in case of error in web.xml JAVA
I need to trigger an error page in case of exceptions. I put that code on web.xml: <error-page> <exception-type>java.sql.SQLException</exception-type> <location>/Casa da…
javaasked Leandro Santos 453 -
1
votes3
answers318
viewsQ: How do you get part of a String?
I just need to get the [nItem:2] of Phrase: Nota fiscal - 502: Status do retorno da transmissão: 778 - Informado NCM inexistente [nItem:2] Would anyone have any idea? Remembering that only interests…
javaasked Leandro Santos 453 -
0
votes1
answer179
viewsQ: Autocomplete with New Registration option - JAVA
I have a autoComplete on the sales screen, when the user enters the customer’s name I want that if it has no record it displays something like "ADD NEW CUSTOMER", I’m wearing primefaces:…
-
0
votes1
answer422
viewsQ: How to implement the pessimistic lock in Java WEB EJB?
I have competition problems in my system, I need to insert the lock pessimistic because users access and save at the same time, causing bizarre errors in the result.
-
0
votes1
answer74
viewsQ: Problem saving two sales at the same time - JAVA
I have a problem saving two sales at the same time on different computers, when it finishes both, one replaces the other. I am using @ManagedBean, @SessionScoped. This is my method salvar() in the…
-
0
votes4
answers1245
viewsA: Hibernate - How to search all rows of a table with Hibernate?
the code that does this is called hql, summarizing would be a Hibernate sql, its syntax would be this: Query q = em.createQuery("FROM Item_Pedido As a WHERE a.id_pedido = :para1"); In the case of a…
-
0
votes0
answers53
viewsQ: How to block 2 users on the same screen - JAVA
I need to block the access of 2 people on the same screen, example, two people try to access the registration of a particular product, the second person who tries to enter should receive a warning…
-
0
votes1
answer285
viewsQ: Take data from a JSON array and add to a list in Java WEB
I have a list in JSON: {"_status":"sucesso","_dados":{"situacao":"PROCESSADO","mensagem":"Consulta realizada com…
-
0
votes2
answers493
viewsQ: How to do if in sql - Postgres
Need to do an if in the example postgres. SELECT log."data" AS log_data, log."tipomovimento" AS log_tipomovimento, log."nomefornecedor" AS log_nomefornecedor, log."nomeproduto" AS log_nomeproduto…
-
3
votes3
answers155
viewsA: How to convert JSON to Object and find an id (No Array) - JAVA
I managed to solve the problem like this JSONObject obj = new JSONObject(jsonProtocolo); String numeroProtocolo = obj.getJSONObject("_dados").getString("protocolo"); If anyone needs this one;…
-
0
votes3
answers155
viewsQ: How to convert JSON to Object and find an id (No Array) - JAVA
I have a Json that does not contain an array and I need to get information from this Json. Follows the JSON {"_status":"sucesso","_mensagem":"Impressão em…
-
3
votes1
answer800
viewsQ: How to convert JSON to Object and find an id - JAVA
I need to convert a JSON into an object and navigate to an ID and capture only it. JSON Example:…
-
0
votes1
answer267
viewsQ: How to take position of the item from an Autocompletetextview (Android)
I need to take the position of the item of an autoCompleteTextView and pass the data to other fields. So far my code is like this: spinner_produtos.setOnItemClickListener(new…
-
1
votes1
answer60
viewsQ: For don’t go through the whole list
I’m having a problem going through a list. Man for this way: for (int i = 0; i < listaCaixaAbertos().size(); i++) { listaCaixaAbertos().get(i).setFechado(Boolean.TRUE);…
-
0
votes0
answers182
viewsQ: How to improve ajax update ? JSF performance
I am developing a system for restaurant and I have a datagrid that updates the other. For example: I click on the class and update the product datagrid. It works, but the result is slow. I’m wearing…
-
0
votes1
answer524
viewsQ: E-mail with Javamail copy
I have a system that sends e-mail, works normally, I want to insert a field to send copies of email, a CC or Cco. follows below an excerpt of my code. Entity private String destino; private String…
-
1
votes2
answers1024
viewsQ: How to Sort List (Hibernate)
How can I order a List with java and Hibernate? I have an abstract class with this method public List<T> listarContas(String where) { String consulta = "FROM " + entityClass.getSimpleName()+ "…
-
0
votes1
answer74
viewsQ: How to change getRealPath() save location? Photocam primefaces
I’m trying to use the Photocam component of Primefaces, it’s working, but the image is saved within the target of the application. I want to move the rescue site. Follows an excerpt from the code.…
-
3
votes1
answer337
viewsQ: How to Call Values from Another Class
I am creating a vehicle control, and in it I have a register of Fuel that has description and value, and another record of Supplies. My supply record has a autoComplete of Fuel. The problem starts…
-
1
votes1
answer535
viewsQ: Generation of Billets with Bopepo
I have a system that generates an accounts receivable, and I am trying to implement the generation of bank slips, my teacher Advisor indicated me the tool 'Bopepo' Jrmum. I entered in my system and…
-
0
votes1
answer63
viewsQ: User see only Items of the Operational unit that is in your registration
I have a vehicle management system. The company in which I work has several business units, so the user can only see the cars of the unit in which he works. This I managed to do, but whenever…
-
3
votes1
answer738
viewsQ: How to get quantity of items from an Arraylist?
I’m trying to count how many items there are in one ArrayList, I already have something ready: private int quantidadeN = listaNotificacaos.size(); It should store the quantity within the variable…
-
2
votes3
answers8611
viewsQ: How to browse lists?
I wanted a solution to go through a practical list. You don’t need to show any results as I will need to scroll through a list of people (objects) and generate accounts receivable from each one, but…
-
-1
votes2
answers1494
viewsA: Access and permission control
Dude, Voce would have to do a userStatic, take the id that is logged in and compare the permission, do you use filter or springSecurity ? you can create permissions with a boolean too. EX.:…
-
2
votes2
answers1400
viewsQ: How to sort a p:datatable
How do I sort a datatable by a text. For example my system is a service order system, I need the "Open" orders to come first. Follow the code of the datatable below. I tried to use sortby but it did…