1 19 20 package com.sslexplorer.security.forms; 21 22 import javax.servlet.http.HttpServletRequest ; 23 import javax.servlet.http.HttpSession ; 24 25 import org.apache.commons.logging.Log; 26 import org.apache.commons.logging.LogFactory; 27 import org.apache.struts.action.ActionMapping; 28 29 import com.sslexplorer.security.User; 30 import com.sslexplorer.security.UserItem; 31 import com.sslexplorer.security.UserItemModel; 32 import com.sslexplorer.table.forms.AbstractPagerForm; 33 34 public class ShowAvailableAccountsForm extends AbstractPagerForm { 35 36 boolean isEditable; 37 boolean errored; 38 39 static Log log = LogFactory.getLog(ShowAvailableAccountsForm.class); 40 41 public ShowAvailableAccountsForm() { 42 super(new UserItemModel()); 43 } 44 45 public void initialize(User[] users, User currentUser, HttpSession session) { 46 super.initialize(session, "account"); 47 for (int i = 0; users != null && i < users.length; i++) { 48 UserItem item = new UserItem(users[i]); 49 getModel().addItem(item); 50 } 51 getPager().rebuild(getFilterText()); 52 } 53 54 public String getEditable() { 55 return String.valueOf(isEditable); 56 } 57 58 public void setEditable(boolean isEditable) { 59 this.isEditable = isEditable; 60 } 61 62 public void setErrored(boolean errored) { 63 this.errored = errored; 64 } 65 66 public boolean getErrored() { 67 return errored; 68 } 69 70 73 public void reset(ActionMapping mapping, HttpServletRequest request) { 74 super.reset(mapping, request); 75 errored = false; 76 } 77 78 } | Popular Tags |