Error Rendering Viewcustomer.xhtml] The class 'java.lang.String' does not have the property 'desc'.

nbsp;                   </p:dataTable>                       
                                </h:panelGrid>
 

my controller :
public String customerView(int account_id){  
        System.out.println("account_id:"+account_id);  
        fetchSDetails(account_id);  
        return "pages/customer";  
    }  
      
    public DataModel fetchSDetails(int account_id){  
        items1 = new ListDataModel(getDFacade().fetchSDetails(account_id));  
        return items1;  
    } 
public String customerView(int account_id){
        System.out.println("account_id:"+account_id);
        fetchSDetails(account_id);
        return "pages/customer";
    }
   
    public DataModel fetchSDetails(int account_id){
        items1 = new ListDataModel(getDFacade().fetchSDetails(account_id));
        return items1;
    }
 

my facade:
public List fetchSDetails(int acc_id){  
        String sql = null;  
        javax.persistence.Query q;  
        sql = "select ci.desc, ci.info " 
                + "from c_info ci " 
                + "where ci.id = (select a.c_id from account a where a.id="+acc_id+") ";  
        q = em.createNativeQuery(sql);  
        List list = q.getResultList();  
        return list;  
    } 
public List fetchSDetails(int acc_id){
        String sql = null;
        javax.persistence.Query q;
        sql = "s

Back  [1] [2] [3] [4] [5] [6] Next

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright