1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| public String getListAccountProfile(){
FacesContext facesContext = FacesContext.getCurrentInstance();
ApplicationFactory appFactory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
Application app = appFactory.getApplication();
AccountProfileBean accountProfileBean = (AccountProfileBean) app.createValueBinding("#{accountProfileBean}").getValue(facesContext);
ListAccountProfileBean listAccountProfileBean = (ListAccountProfileBean) app.createValueBinding("#{listAccountProfileBean}").getValue(facesContext);
listAccountProfileBean.getListAccountProfile().clear();
try {
goMonitor = new GOMonitorService().getGOMonitorPort();
goMonitor.getAccountProfileList();
ArrayList listAccountsProfile=new ArrayList();
ArrayList listNameAP=new ArrayList();
listNameAP=(ArrayList)goMonitor.getListAccountProfile();
IFMessage accountProfilIfm;
AccountProfileBean apBean;
String nameAP;
String nameAPWithPrefixe;
for(int i=0;i<listNameAP.size();i++){
apBean=new AccountProfileBean();;
nameAP=listNameAP.get(i).toString();
apBean.setAccountProfileNameAP(nameAP);
apBean.setNameID(prefixObjectAP+nameAP);
listAccountProfileBean.getListAccountProfile().add(apBean);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
app.createValueBinding("#{requestScope.accountProfileBean}").setValue(facesContext, accountProfileBean);
app.createValueBinding("#{requestScope.listAccountProfileBean}").setValue(facesContext, listAccountProfileBean);
return "getListAccountProfile";
} |
Partager