Posts by Marcelo • 901 points
72 posts
-
0
votes2
answers106
views -
0
votes1
answer146
viewsA: Vuetify component "v-navigation-Drawer": bug when scrolling on the page
Try switching from Absolute to app Of: <v-navigation-drawer v-model="$store.state.showSidebar" absolute temporary> For: <v-navigation-drawer v-model="$store.state.showSidebar" app temporary…
-
3
votes1
answer294
viewsQ: How to convert the String "20190930120000[-3:BRT]" to Localdatetime
I got the following String: "20190930120000[-3:BRT]". I need to convert to LocalDateTime. Does anyone know the mask to be used in DateTimeFormatter.ofPattern("?????")? I’ve come this far:…
-
-2
votes2
answers58
viewsA: Change background VIDEO by screen size?
You can be using css media queries. Example: .teste { margin-left: 0px; } @media (min-width: 992px) { .teste { margin-left: -211px; } }
-
1
votes1
answer360
viewsQ: Angular 7 - toPromise returns no error
I’m using the Httpclient as below. However even with error 404 to toPrimise() gets into the .then() instead of .catch(). Note: Sometimes it worked with the same code. I believe it is something…
-
0
votes2
answers1287
viewsA: Springdata paging with Pageimpl<> size does not work
I believe the problem lies in the database query. As you are mounting the page I believe the registration control should be yours, spring will not make it automatic. Take a test by receiving a…
-
0
votes2
answers771
viewsA: How to hide menu items using spring security?
Good morning You can use th:if or th:unless from Thymeleaf to render or not a part of HTML. <div class="checkbox aw-checkbox-no-margin" th:if="${#authentication.principal.usuario.codigo !=…
-
2
votes1
answer155
viewsQ: DTO with List using Jpacriteria
I have two entities Scheduler and Intervalodehoras. These two entities have other relationships that when I do a search with Rest, comes a lot of data unnecessary. To avoid this I created two DTO…
-
2
votes1
answer128
viewsQ: Modular Maven design with modular Java10 cannot find the java module
I am adapting the exercise of the book "Java 9 - Interactive, reactive and modularized - author Rodrigo Turini" to a modular Maven project with java 10 modular. However when running, you are not…
-
1
votes1
answer303
viewsA: I cannot save form using spring boot
I believe you missed the transaction. try placing the @Transactional annotation on your save service. @Transactional public Usuario save(Usuario usuarios) { return repository.saveAndFlush(usuarios);…
-
2
votes1
answer503
viewsQ: Error compiling a modular Maven project with modular java 10
I am adapting the exercise of the book "Java 9 - Interactive, reactive and modularized - author Rodrigo Turini" to a modular Maven project with java 10 modular. However this gives error when…
-
0
votes0
answers114
viewsQ: Is it possible to create more than one java9(module-info) module per mavem project in the eclipse?
I am testing the java 9 module system and so far I have been able to create a project in eclipse (Maven or java) and create the module-info by the option : Right-click on the project + configure +…
-
1
votes1
answer171
viewsA: Error integrating Spring 4 + Hibernate 5 + JPA 2 and Glassfish
Let’s see if I can help you. replace persistence.xml with a configuration file. create the repository as an interface by expanding Jparepository @Repository public interface Cervejas extends…
-
1
votes1
answer205
viewsA: Spring Boot filled list has no values returned on the screen
I think your problem is in redirect. Try to use Modelandview. @GetMapping public ModelAndView pesquisar(ParametroFiltro filtro){ ModelAndView mv = new ModelAndView("url");…
-
0
votes1
answer65
viewsA: Creation of Formulars
You can be using a tab inside a form. See example below with bootstrap <div class="tab-content"> <div class="tab-pane active" id="tabela1"> <div class="row"> <div…
-
0
votes1
answer56
viewsA: How to migrate from spring security 3.0.5 to 4.2.3
First of all, I would no longer use XML to configure, but rather annotations. Second instead of using 4 already pass to 5. Create a settings file by extending the Websecurityconfigureradapter class…
-
1
votes1
answer94
viewsA: Recover a property of a file . properties directly with Thymeleaf
To whom it may concern. Spring boot automatically configures Thymeleaf. With this the messages.properties files are automatically identified (as long as they are in the default directory. Same as…
-
0
votes1
answer94
viewsQ: Recover a property of a file . properties directly with Thymeleaf
In a file . properties I have a property with the system version. Is there any way Thymeleaf can recover this property directly? I want to use in the footer that is a fragment used in all pages.…
-
0
votes2
answers1179
viewsQ: How to make the Spring MVC Responseentity return in a new page?
I have a method of a report controller (posted below), to which I return a PDF. The problem is that it returns the pdf in the same application tab and this is killing it. How can I return in a new…
-
2
votes0
answers280
viewsQ: block second tab of the same user session with JSF
I have a problem. How do I not allow two tabs to access the same session, using JSF. I have a web system where every user has their profile. And the profile is used to generate custom forms. After…
-
4
votes0
answers473
viewsQ: Two different bases with spring data jpa
Good night Would anyone have an example of Spring Data Jpa with two different bases? Ex : Postgres and Sqlserver in the same application? I have a system I need to consult a legacy base. Searching I…
asked Marcelo 901 -
0
votes1
answer145
viewsA: Uppercase in Criteriabuilder
To whom it may concern to do the upper just do as in the example below. Without the uppercase Predicate filtroRazaoSocial = cb.like(campoRazaoSocial, "%"+filtro.getRazaoSocial()+"%" ) ; Like the…
-
0
votes1
answer145
viewsQ: Uppercase in Criteriabuilder
I have the following consultation with Criteriabuilder CriteriaBuilder cb = manager.getCriteriaBuilder(); CriteriaQuery<Escola> cq = cb.createQuery(Escola.class); Root<Escola> root =…
-
3
votes1
answer248
viewsQ: Hyperlink login with user and password in email with JSF and Spring Secutity
I have a system in JSF(with primefaces) with spring security. When the user registers it receives an e-mail with user and password. Okay - It works. However I would like to send in the body of the…
-
2
votes1
answer259
viewsA: Update message
Tab is a JSF container If p:commandButton is inside the tab and p:messages is outside, you should not update the whole way. E.g. :listNext:messages From what I could notice, except for lack of…
-
0
votes0
answers298
viewsQ: Problems with charset="utf-8"
I have a die with light recorded on the bank postgres with UTF-8 example: Joseph When I recover the page comes correctly, but when I give the Submit changes to : Josã. My JSF header looks like this:…
-
2
votes0
answers150
viewsQ: Make wildfly lighter for a JSF application
I have an application in Java production, with CDI, JSF with primefaces and Hibernate running on a wildfly 10.1. This application is hosted in the localweb jelastic. But it’s consuming a lot of…
-
8
votes2
answers701
viewsQ: java email sending does not show error when unable to send the same
I created a system where the user registers and the password is sent by email. If you cannot send the email, it generates an error and does not create the user, notifying the same. It was working…
-
0
votes2
answers928
viewsQ: Java Rest Client Receiving a Localdate
I’m doing a test client in java. My book class is like this: public class Livro { private Long id; private String nome; @JsonFormat(shape = JsonFormat.Shape.STRING,pattern="dd/MM/yyyy") private…
-
1
votes1
answer231
viewsA: Primefaces (Tabview): Null properties when saving
I believe you missed processing the form. Experiment in processing the form Ex <p:commandButton value="Salvar" action="#{clienteBean.salvar}" process="@form"/> It may also be Scope problem,…
-
1
votes1
answer903
viewsA: Error starting C3P0 connection pool
I discovered that the problem occurred because the C3P0 was not recognizing the paramenters "javax.persistence". I switched to equivalent "Hibernate.Connection" parameters and the error no longer…
-
1
votes1
answer903
viewsQ: Error starting C3P0 connection pool
I configured C3P0 and at start the error occurs below. WARN [com.mchange.v2.resourcepool.Basicresourcepool] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@74a41b98 -- Acquisition…
-
0
votes0
answers295
viewsQ: Custom validation when changing tab in p:Wizard
I have the following p: <p:messages id="msgs" showDetail="false" autoUpdate="true" closable="true" /> <p:wizard flowListener="#{caixaRecebimento_MB.onFlowProcess}" showNavBar="false"…
primefacesasked Marcelo 901 -
0
votes0
answers62
viewsQ: Problems recovering data via altered JPA directly in the related entity
I have the following entity @Entity @Table(name="matricula") public class Matricula implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy =…
-
1
votes1
answer91
viewsQ: How to scan a signature with java
I need to get a signature on a document but I wouldn’t like to print it. Can anyone indicate a signature pad that works with the first faces ?
-
1
votes0
answers257
viewsQ: How to compare the day of a Localdate in Criteriabuilder
I have an entity that has a Localdate field. @Entity @Table(name="feriado") public class Feriado implements Serializable{ private static final long serialVersionUID = 1L; @Id…
-
1
votes0
answers150
viewsQ: Bean CDI with @Sessionscoped initializes more than once
I created a bean CDI with session scope (@SessionScoped). The problem is that it is going through the constructor several times, and it should only be once while the user is logged in, correct? I’ve…
-
0
votes2
answers409
viewsA: id problem already exists in view
Within the same form you are using twice the same id="id". And this cannot. Note from the other form to which you mentioned that it works, you don’t have twice the same. Below the snippets with…
-
2
votes1
answer93
viewsA: p:First faces is showing twice the CPF name
There are several ways to solve. One of them and edit the CPF validator message @CPF(message="CPF Invalido")
primefacesanswered Marcelo 901 -
2
votes1
answer575
viewsQ: How to run a routine periodically automatically on a java server like wildfly10
In a java web system, I need from time to time that the application server runs a routine automatically (Scheduler). The problem is that I don’t even know where to start, that is how to make the…
-
1
votes2
answers2498
viewsA: Prohibit duplicate registration
Try creating a Constraint in the bank Below an example with CNPJ in Postgres CREATE TABLE IF NOT EXISTS empresa ( id bigserial not null, cnpj varchar(14) not null, razao_social varchar(30) not null,…
-
1
votes1
answer113
viewsA: Show Complete string in modal
The problem is that in your test there is no space between the words "Test", which makes it a very big word. The Primefaces breaks the line as is the case with the first line of the image. Try…
-
0
votes2
answers3959
viewsQ: Problems with UTF8 in postgres
I have a JSF project with JPA, Postgres 9 bank The information with lighting is being recorded with accent problems. Ex: ã records as At£ Shark records as Tubara The Bank is with: Ecoding = UTF8…
-
0
votes1
answer50
viewsA: About button rendering
I’ll tell you what. In your isInactive() method test the searchUsuarioBean.filtro.status first. If it is "All" return the desired otherwise then yes you test the item.
-
0
votes1
answer500
viewsA: Display coordinates on map with Gmap
Can you tell if the coordinate is correct? What I noticed is that the center="#{gadoBean.center}" should contain Latitude and Longitude. Example: center="#{meuBean.latitude}, #{meuBean.longitude}"…
-
1
votes1
answer267
viewsA: Working with associative tables
Try the following. instead of in Pessoa @OneToMany(mappedBy="pessoa",cascade=CascadeType.ALL) private List<Pessoa_Time> times; create a @ManyToMany @JoinTable(name = "times_pessoas") private…
-
0
votes1
answer19
viewsQ: How in xhtml commandButton identify that an error was generated in Dao and keep the navigation on the same page?
On the xhtml page in a commandButton call the action confirms() to confirm the recording of an object. The return of this method is a string pointing to a new page. <p:commandButton…
-
0
votes1
answer166
viewsA: javax.persistence.Entitymanager.createQuery(Ljava/lang/String;Ljava/lang/Class;)Ljavax/persistence/Typedquery;
Try putting a Try catch - I believe that an exteja occuring a javax.persistence.Noresultexception: public boolean existe(Pessoa pessoa) { try{ String consulta = "select u from Usuario u where…
-
1
votes1
answer1191
viewsQ: property "Hibernate.hbm2ddl.auto" value="update" is not working with postgres
The configuration property of persistence.xml: property name="hibernate.hbm2ddl.auto" value="update" Not working or better is giving error at the time of deploy. If I use how create works but even…
-
0
votes1
answer372
viewsA: For loop in Java
The line for(int x = 1; x < n; x++) Has to be x <= n for(int x = 1; x <= n; x++) or x start of 0 for(int x = 0; x < n; x++) public static void main(String[] args) { Scanner sc = new…