1 19 20 package com.sslexplorer.sample.forms; 21 22 import javax.servlet.http.HttpServletRequest ; 23 24 import org.apache.commons.logging.Log; 25 import org.apache.commons.logging.LogFactory; 26 import org.apache.struts.action.ActionErrors; 27 import org.apache.struts.action.ActionMapping; 28 29 import com.sslexplorer.boot.PropertyList; 30 import com.sslexplorer.input.MultiSelectSelectionModel; 31 import com.sslexplorer.policyframework.Resource; 32 import com.sslexplorer.policyframework.forms.AbstractFavoriteResourceForm; 33 import com.sslexplorer.security.User; 34 35 42 public class SampleForm extends AbstractFavoriteResourceForm { 43 static Log log = LogFactory.getLog(SampleForm.class); 44 45 private String selectedTab = "details"; 46 47 53 public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { 54 ActionErrors errs = super.validate(mapping, request); 55 if (isCommiting()) { 56 } 58 return errs; 59 } 60 61 66 public int getTabCount() { 67 return 3; 69 } 70 71 76 public String getTabName(int idx) { 77 switch (idx) { 79 case 0: 80 return "details"; 81 case 1: 82 return "other"; 83 default: 84 return "policies"; 85 } 86 } 87 88 96 public void initialise(User user, Resource resource, boolean editing, MultiSelectSelectionModel policyModel, 97 PropertyList selectedPolicies, User owner) throws Exception { 98 super.initialise(user, resource, editing, policyModel, selectedPolicies, owner); 99 } 100 101 106 public String getSelectedTab() { 107 return selectedTab; 108 } 109 110 115 public void setSelectedTab(String selectedTab) { 116 this.selectedTab = selectedTab; 117 } 118 119 122 public String getTabTitle(int i) { 123 return null; 125 } 126 127 132 public void applyToResource() throws Exception { 133 136 } 137 138 141 public String getTabBundle(int idx) { 142 return null; 143 } 144 } | Popular Tags |