001 /** 002 * Copyright 2005-2012 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.rice.krad.uif; 017 018 /** 019 * General constants used within the User Interface Framework 020 * 021 * @author Kuali Rice Team (rice.collab@kuali.org) 022 */ 023 public class UifConstants { 024 public static final String CONTROLLER_METHOD_DISPATCH_PARAMETER_NAME = "methodToCall"; 025 public static final String DEFAULT_MODEL_NAME = "KualiForm"; 026 public static final String COMPONENT_MODEL_NAME = "Component"; 027 public static final String DEFAULT_VIEW_NAME = "default"; 028 public static final String COMPONENT_ID_PREFIX = "u"; 029 030 // uncomment for freemarker testing 031 public static final String SPRING_VIEW_ID = "/krad/WEB-INF/ftl/uifRender"; 032 public static final String SPRING_REDIRECT_ID = "/krad/WEB-INF/ftl/redirect"; 033 public static final String REDIRECT_PREFIX = "redirect:"; 034 035 public static final String EL_PLACEHOLDER_PREFIX = "@{"; 036 public static final String EL_PLACEHOLDER_SUFFIX = "}"; 037 public static final String NO_BIND_ADJUST_PREFIX = "#form."; 038 public static final String DEFAULT_PATH_BIND_ADJUST_PREFIX = "#dp."; 039 public static final String FIELD_PATH_BIND_ADJUST_PREFIX = "#fp."; 040 public static final String LINE_PATH_BIND_ADJUST_PREFIX = "#lp."; 041 public static final String NODE_PATH_BIND_ADJUST_PREFIX = "#np."; 042 043 public static final String DATA_ATTRIBUTE_CONTROL_FOR = "controlFor"; 044 public static final String REQUEST_FORM = "requestForm"; 045 046 public static enum Position { 047 BOTTOM, LEFT, RIGHT, TOP 048 } 049 050 public static enum Order { 051 FIRST 052 } 053 054 public static enum NavigationType { 055 VERTICAL_MENU, HORIZONTAL_TABS 056 } 057 058 public static enum Orientation { 059 HORIZONTAL, VERTICAL 060 } 061 062 public static enum ViewType { 063 DEFAULT, DOCUMENT, INQUIRY, LOOKUP, MAINTENANCE, INCIDENT; 064 } 065 066 public static enum ControlType { 067 CHECKBOX, CHECKBOXGROUP, FILE, GROUP, HIDDEN, RADIOGROUP, SELECT, 068 TEXTAREA, TEXT, USER 069 } 070 071 public static enum WorkflowAction { 072 SAVE, ROUTE, BLANKETAPPROVE, APPROVE, DISAPPROVE, CANCEL, FYI, ACKNOWLEDGE, COMPLETE 073 } 074 075 public enum AjaxReturnTypes { 076 UPADATEPAGE("update-page"), UPDATECOMPONENT("update-component"), REDIRECT("redirect"), SHOWINCIDENT("update-view"); 077 078 private String key; 079 080 AjaxReturnTypes(String key) { 081 this.key = key; 082 } 083 084 public String getKey() { 085 return key; 086 } 087 088 public void setKey(String key) { 089 this.key = key; 090 } 091 } 092 093 public static class MethodToCallNames { 094 public static final String NAVIGATE = "navigate"; 095 public static final String START = "start"; 096 public static final String SAVE = "save"; 097 public static final String SEARCH = "search"; 098 public static final String CLOSE = "close"; 099 public static final String ADD_LINE = "addLine"; 100 public static final String DELETE_LINE = "deleteLine"; 101 public static final String REFRESH = "refresh"; 102 public static final String CANCEL = "cancel"; 103 public static final String TOGGLE_INACTIVE = "toggleInactiveRecordDisplay"; 104 } 105 106 public static class ActionEvents { 107 public static final String ADD_LINE = "addLine"; 108 public static final String ADD_BLANK_LINE = "addBlankLine"; 109 } 110 111 public static class LayoutComponentOptions { 112 public static final String COLUMN_SPAN = "colSpan"; 113 public static final String ROW_SPAN = "rowSpan"; 114 } 115 116 public static class IdSuffixes { 117 public static final String ADD_LINE = "_add"; 118 public static final String CONTROL = "_control"; 119 public static final String ATTRIBUTE = "_attribute"; 120 public static final String COMPARE = "_comp"; 121 public static final String CONSTRAINT = "_constraint"; 122 public static final String DIRECT_INQUIRY = "_directinquiry"; 123 public static final String ERRORS = "_errors"; 124 public static final String INSTRUCTIONAL = "_instructional"; 125 public static final String LINE = "_line"; 126 public static final String LABEL = "_label"; 127 public static final String FIELDSET = "_fieldset"; 128 public static final String SUB = "_sub"; 129 public static final String SUGGEST = "_suggest"; 130 public static final String QUICK_FINDER = "_quickfinder"; 131 } 132 133 public static class ViewPhases { 134 public static final String INITIALIZE = "INITIALIZE"; 135 public static final String APPLY_MODEL = "APPLY_MODEL"; 136 public static final String FINALIZE = "FINALIZE"; 137 } 138 139 public static class ViewStatus { 140 public static final String CREATED = "C"; 141 public static final String INITIALIZED = "I"; 142 public static final String FINAL = "F"; 143 } 144 145 public static class ContextVariableNames { 146 public static final String COLLECTION_GROUP = "collectionGroup"; 147 public static final String CONFIG_PROPERTIES = "ConfigProperties"; 148 public static final String COMPONENT = "component"; 149 public static final String CONSTANTS = "Constants"; 150 public static final String DOCUMENT_ENTRY = "DocumentEntry"; 151 public static final String INDEX = "index"; 152 public static final String IS_ADD_LINE = "isAddLine"; 153 public static final String LINE = "line"; 154 public static final String READONLY_LINE = "readOnlyLine"; 155 public static final String MANAGER = "manager"; 156 public static final String NODE = "node"; 157 public static final String NODE_PATH = "nodePath"; 158 public static final String PARENT = "parent"; 159 public static final String UIF_CONSTANTS = "UifConstants"; 160 public static final String VIEW = "view"; 161 public static final String VIEW_HELPER = "ViewHelper"; 162 public static final String PARENT_LINE = "parentLine"; 163 } 164 165 public static class TableToolsKeys { 166 public static final String AASORTING = "aaSorting"; 167 public static final String BAUTO_TYPE = "bAutoType"; 168 public static final String SDOM = "sDom"; 169 public static final String LANGUAGE = "oLanguage"; 170 public static final String EMPTY_TABLE = "sEmptyTable"; 171 public static final String AO_COLUMNS = "aoColumns"; 172 public static final String SORT_SKIP_ROWS = "aiSortingSkipRows"; 173 public static final String SORT_DATA_TYPE = "sSortDataType"; 174 public static final String SORTABLE = "bSortable"; 175 public static final String VISIBLE = "bVisible"; 176 public static final String SORT_TYPE = "sType"; 177 public static final String TABLE_SORT = "bSort"; 178 public static final String SAJAX_SOURCE = "sAjaxSource"; 179 } 180 181 public static class TableToolsValues { 182 public static final String DOM_TEXT = "dom-text"; 183 public static final String DOM_SELECT = "dom-select"; 184 public static final String DOM_CHECK = "dom-checkbox"; 185 public static final String DOM_RADIO = "dom-radio"; 186 public static final String NUMERIC = "numeric"; 187 public static final String STRING = "string"; 188 public static final String DATE = "kuali_date"; 189 public static final String PERCENT = "kuali_percent"; 190 public static final String CURRENCY = "kuali_currency"; 191 public static final String TIMESTAMP = "kuali_timestamp"; 192 public static final String FALSE = "false"; 193 194 public static final int ADD_ROW_DEFAULT_INDEX = 0; 195 } 196 197 public static class ReordererOptionKeys { 198 public static final String SELECTORS = "selectors"; 199 public static final String MOVABLES = "movables"; 200 } 201 202 public static class TitleAppendTypes { 203 public static final String DASH = "dash"; 204 public static final String PARENTHESIS = "parenthesis"; 205 public static final String REPLACE = "replace"; 206 public static final String NONE = "none"; 207 } 208 209 public static class UrlParams { 210 public static final String ACTION_EVENT = "actionEvent"; 211 public static final String SHOW_HISTORY = "showHistory"; 212 public static final String SHOW_HOME = "showHome"; 213 public static final String FORM_KEY = "formKey"; 214 public static final String PAGE_ID = "pageId"; 215 public static final String HISTORY = "history"; 216 public static final String LAST_FORM_KEY = "lastFormKey"; 217 } 218 219 public static class Messages { 220 public static final String VALIDATION_MSG_KEY_PREFIX = "validation."; 221 public static final String STATE_PREFIX = "validation.statePrefix"; 222 } 223 224 public static class MessageKeys { 225 public static final String QUERY_DATA_NOT_FOUND = "query.dataNotFound"; 226 } 227 228 public static class ClientSideVariables { 229 public static final String KRAD_IMAGE_LOCATION = "kradImageLocation"; 230 public static final String KRAD_URL = "kradUrl"; 231 } 232 233 public static class RefreshCallerTypes { 234 public static final String LOOKUP = "LOOKUP"; 235 public static final String MULTI_VALUE_LOOKUP = "MULTI_VALUE_LOOKUP"; 236 public static final String QUESTION = "QUESTION"; 237 } 238 239 public static final class DataAttributes { 240 public static final String SERVER_MESSAGES = "server-messages"; 241 public static final String VALIDATION_MESSAGES = "validationMessages"; 242 public static final String SUMMARIZE = "summarize"; 243 public static final String DISPLAY_MESSAGES = "displayMessages"; 244 public static final String COLLAPSE_FIELD_MESSAGES = "collapseFieldMessages"; 245 public static final String DISPLAY_LABEL = "displayLabel"; 246 public static final String HAS_OWN_MESSAGES = "hasOwnMessages"; 247 public static final String PAGE_LEVEL = "pageLevel"; 248 public static final String FORCE_SHOW = "forceShow"; 249 public static final String SECTIONS = "sections"; 250 public static final String ORDER = "order"; 251 public static final String SERVER_ERRORS = "serverErrors"; 252 public static final String SERVER_WARNINGS = "serverWarnings"; 253 public static final String SERVER_INFO = "serverInfo"; 254 public static final String VIGNORE = "vignore"; 255 } 256 257 public static final class CaseConstraintOperators { 258 public static final String HAS_VALUE = "has_value"; 259 public static final String EQUALS = "equals"; 260 public static final String GREATER_THAN_EQUAL = "greater_than_equal"; 261 public static final String LESS_THAN_EQUAL = "less_than_equal"; 262 public static final String NOT_EQUAL = "not_equal"; 263 public static final String NOT_EQUALS = "not_equals"; 264 public static final String GREATER_THAN = "greater_than"; 265 public static final String LESS_THAN = "less_than"; 266 } 267 268 }