Statement « Development « JSF Q&A

1. How to get one instance of list using select statement in EJB 3 and JSF

Now i'm working with EJB 3 in Stateless Bean i create method get all instance of entity About

public List<About> retrieveAllAbout(){

       return em.createNameQuery("About.findAll").getResultList();

2. EJB3 - JSF cannot update entity it excute insert statement why?

hello all new problem i cant solved i have 1 entity below

package com.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

 * @author Kency
@Table(name = "about")

3. Code Not Getting Invoked After Loop Statement

In my jsf page I am calling a method called saveinsert and in my saveInsert method I have the following code.

try {
    System.out.println("rchd 1");
    for ...

4. Reduce code repetition in If Statement

I have a fairly large chunk of code that produces/returns an arraylist of search results that is constructed from a number of datasources. I have been asked to include a date ...

5. code too large for try statement

6. corresponding JSF statement.