Questions tagged as 'java'

1
answer

Primefaces inputText Ajax, return value missing the last character

I'm having a problem using ajax of the primefaces , also tried with ajax jsf . I have the following code snippet: <h:panelGroup> <p:inputText id="skuProduto" size="20" maxlength="20" value="#{cadastroProdutoPapBean.produto....
asked by 23.02.2018 / 14:35
1
answer

How to Identify Characters

I have a class that takes a String and looks at the first character and if the character is empty ("") it returns me the first letter. public String textReturn(String x){ int v1 = 0,v2 = 1; String a =" "; while(true){...
asked by 23.02.2018 / 15:22
1
answer

Connection handling - java.net.ConnectException: Failed to connect to / IP

Before requesting any requests, I'll make a connection test: ConnectivityManager conexao; private boolean verificaConexao() { this.conexao = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo netInfo =...
asked by 02.03.2018 / 11:51
0
answers

Converter error for SelectManyCheckbox

I'm doing a Java web application and I ran into a problem with the converter to be used in selectmanycheckbox . The converter I made was this: @FacesConverter(forClass = Indicacao.class) public class IndicacaoConverter implements Convert...
asked by 22.02.2018 / 19:43
0
answers

Css file with image inside

Person I am trying to set an image inside the css, for this I am using: body { margin: 0px; padding: 0px; background: #C0C4C5 url(images/page-body-bg.png) repeat; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; f...
asked by 22.02.2018 / 21:45
1
answer

You can request a specific file for the user

I want to get a special user file. Can you put the name of this file as type in Intent ? For an image, for example, it is used: Intent intent = new Intent(Intent.ACTION_PICK) intent.setType("image/*") startActivityForResult(inten...
asked by 22.02.2018 / 23:31
0
answers

Map table fields beginning with number

Hello, I'm having trouble mapping the tables in a database where column names start with number. Here is an example of how I tried, but to no avail. @Entity @Table(name = "A_MOT025") public class Motorista { @Id @Column(name = "[0251C...
asked by 22.02.2018 / 20:36
0
answers

How to upload an image to a file using JSP

Hello, how are you? I already apologize for the language, because I live in Uruguay. I would like to know how and what Java objects (specifically JSP) can I use to upload an image to a file on my Windows? I have a field <input type="fil...
asked by 22.02.2018 / 18:01
0
answers

JPA - You can use MatchMode.ANYWHERE with Predicate

Normally when I need to search using a single word using Criteria and Restrictions I do this as follows: Due to a need of the project, I'm having to do the research in a different way, so I decided to do a test using Predicate Follow th...
asked by 21.02.2018 / 23:41
1
answer

Java / JSTL - Table listing with c: forEach

I've tried listing database information on a JSP page using the <c:forEach> tag, but I'm not getting any return values. ADO: @Override public List<Livro> consultar() throws SQLException{ List<Livro&g...
asked by 21.02.2018 / 19:21