Error Rendering Viewcustomer.xhtml] The class 'java.lang.String' does not have the property 'desc'.
</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