[jboss-user] [JBoss Seam] - Re: multiple calls to same method from <s:div rendered...>

asookazian do-not-reply at jboss.com
Tue Sep 25 17:16:18 EDT 2007


in SFSB:

public boolean getSeedSelection() {
  | 			log.info("in seedSelection()");
  | 			populate();
  | 			return true;
  | 		}

private void populate() {
  | 			log.info("in populate()");
  | 			
  | 			try {
  | 				con = DriverManager.getConnection(AdminConstants.URL, AdminConstants.USERNAME, AdminConstants.PASSWORD);
  | 				cstmt = con.prepareCall("{call usp_u_adm_select_Role}");			
  | 				rs = cstmt.executeQuery();
  | 				choices = new ArrayList<SelectItem>();
  | 				while(rs.next()) {
  | 					choices.add(new SelectItem(rs.getString("ApplicationRoleID"), rs.getString("Name")));
  | 					
  | 					String name = rs.getString("Name");
  | 					log.info("populate(): name = " + name);
  | 					String applicationRoleID = rs.getString("ApplicationRoleID");
  | 					log.info("populate(): applicationRoleID = " + applicationRoleID);
  | 				}
  | 				alreadyPopulated = "a value indicating we are populated";
  | 			}
  | 			catch(Exception e) {
  | 				e.printStackTrace();			
  | 			}
  | 			finally {
  | 				this.cleanUp();			
  | 			}
  | 			
  | 			//return allRolesHashMap;
  | 		}

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088590#4088590

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088590



More information about the jboss-user mailing list