Posts by LR10 • 957 points
67 posts
-
-1
votes3
answers1657
views -
0
votes2
answers144
viewsA: When opening a dialog block tabs
https://www.primefaces.org/showcase/ui/overlay/dialog/basic.xhtml <p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true" height="100"> <h:outputText value="This is a Modal Dialog."…
-
2
votes1
answer592
viewsA: How to use Mysql in Java EE?
You need to add to "Dependency Maven". right click on your project and choose estates. click on Deployment Assembly. click on add click on Java Build Path Entries select Maven Dependencies click on…
-
1
votes2
answers1186
views -
1
votes3
answers678
viewsA: How to change the background of the radio button when it is selected
Jquery $('input:radio').bind('click', function() { $(this).toggleClass('red'); //.....seu código }); CSS input{ background:#FFFFEE; } .red{ background-color:red; } Sources:…
-
0
votes3
answers641
viewsA: Javascript or jQuery - Remove attribute pseudo elements
Try to yes! $(".container").css("content", "none"); Take a look at this link : https://stackoverflow.com/questions/5394951/adding-and-removing-style-attribute-from-div-with-jquery…
-
0
votes3
answers1175
viewsA: JPA + Wildfly + Hibernate
<!-- Conexao com SQLServer --> <persistence-unit name="nome-persistence1" transaction-type="JTA"> <jta-data-source>conexao1</jta-data-source>…
-
1
votes1
answer566
viewsA: doubt with open and close connection
You probably closed the connection and then tried to use it. That’s why error ! Closes all connection inside Finally this can help. finally { connection.close(); resultSet.close(); stmt.close(); }…
-
0
votes2
answers383
viewsA: Why can’t I erase an object with Hibernate?
try { public void remover(T objeto) { manager.getTransaction().begin() ; Object o = manager.merge(objeto); manager.remove(o); manager.getTransaction().commit(); } } catch (Exception ex) {…
-
-3
votes2
answers942
viewsA: Properly configured hibernate does not insert into database
import br.com.sistec.domain.Usuario; import br.com.sistec.util.HibernateUtil; public class UsuarioDAO { private Session sessao; private Transaction transacao = null; public UsuarioDAO(){ sessao =…
-
0
votes2
answers1131
viewsA: Pass JSP variable value to JAVA
public class ServletDemo extends HttpServlet{ private String y; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { y =…
-
1
votes2
answers521
viewsA: Performance difference between multiple conditions in one IF or multiple IF’s separately?
The performance gain would be insignificant for your case, It is not recommended to overuse the IFs, because it makes your code difficult to read and maintain, so it’s not good practice. Can…
-
0
votes1
answer505
viewsA: JSF/Hibernate How do I save null to a database field?
Puts the default null value in your entity’s field! private String valor = null;
-
0
votes1
answer546
viewsA: List two related tables Primefaces x Hibernate
<p:dataTable value="#{produtoBean.produtos}" var="produto" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink}…
-
1
votes1
answer124
viewsA: How to download a PDF that is in C:
public StreamedContent getFile() throws FileNotFoundException { String arquivo = "iri.jpg"; String caminho = "C:\\tmp\\"+arquivo; FileInputStream stream = new…
-
0
votes2
answers1773
viewsA: Java args pass file as parameter
public void passarArquivos( String ... paths ) { File arquivo ; for (String caminho : paths) { arquivo = new File( caminho ); System.out.println(" Nome :"+…
-
1
votes2
answers128
viewsA: Java: Connection Class Error
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // Eventoos do Botao inserir try { //Registra JDBC driver Class.forName("com.mysql.jdbc.Driver"); …