1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif;
17
18
19
20
21
22
23 public class UifConstants {
24 public static final String CONTROLLER_METHOD_DISPATCH_PARAMETER_NAME = "methodToCall";
25 public static final String DEFAULT_MODEL_NAME = "KualiForm";
26 public static final String COMPONENT_MODEL_NAME = "Component";
27 public static final String DEFAULT_VIEW_NAME = "default";
28 public static final String COMPONENT_ID_PREFIX = "u";
29
30 public static final String DEFAULT_THEMES_DIRECTORY = "/themes";
31 public static final String DEFAULT_IMAGES_DIRECTORY = "images";
32 public static final String DEFAULT_SCRIPTS_DIRECTORY = "scripts";
33 public static final String DEFAULT_STYLESHEETS_DIRECTORY = "stylesheets";
34 public static final String THEME_DERIVED_PROPERTY_FILE = "theme-derived.properties";
35 public static final String THEME_CSS_FILES = "themeCssFiles";
36 public static final String THEME_JS_FILES = "themeJsFiles";
37
38
39 public static final String SPRING_VIEW_ID = "/krad/WEB-INF/ftl/uifRender";
40 public static final String SPRING_REDIRECT_ID = "/krad/WEB-INF/ftl/redirect";
41 public static final String REDIRECT_PREFIX = "redirect:";
42
43 public static final String EL_PLACEHOLDER_PREFIX = "@{";
44 public static final String EL_PLACEHOLDER_SUFFIX = "}";
45 public static final String NO_BIND_ADJUST_PREFIX = "#form.";
46 public static final String DEFAULT_PATH_BIND_ADJUST_PREFIX = "#dp.";
47 public static final String FIELD_PATH_BIND_ADJUST_PREFIX = "#fp.";
48 public static final String LINE_PATH_BIND_ADJUST_PREFIX = "#lp.";
49 public static final String NODE_PATH_BIND_ADJUST_PREFIX = "#np.";
50 public static final String STRING_TEMPLATE_PARAMETER_PLACEHOLDER = "@";
51
52 public static final String SPACE = " ";
53
54 public static final String REQUEST_FORM = "requestForm";
55
56 public static final String BLOCKUI_NAVOPTS = "navigation";
57 public static final String BLOCKUI_REFRESHOPTS = "refresh";
58
59 public static final String VALIDATE_VIEWS_ONBUILD = "validate.views.onbuild";
60
61 public static final String MESSAGE_VIEW_ID = "Uif-MessageView";
62 public static final String SESSION_TIMEOUT_VIEW_ID = "Uif-SessionTimeoutView";
63 public static final String LOGGED_OUT_VIEW_ID = "Uif-LoggedOutView";
64 public static final String GROUP_VALIDATION_DEFAULTS_MAP_ID = "Uif-GroupValidationMessages-DataDefaults";
65 public static final String FIELD_VALIDATION_DEFAULTS_MAP_ID = "Uif-FieldValidationMessages-DataDefaults";
66 public static final String REFERER = "Referer";
67 public static final String NO_RETURN = "NO_RETURN";
68
69 public static enum ReadOnlyListTypes {
70 DELIMITED, BREAK, OL, UL
71 }
72
73 public static enum Position {
74 BOTTOM, LEFT, RIGHT, TOP
75 }
76
77 public static enum Order {
78 FIRST, LINE_FIRST, NEXT_INPUT, SELF
79 }
80
81 public static enum NavigationType {
82 VERTICAL_MENU, HORIZONTAL_TABS
83 }
84
85 public static enum Orientation {
86 HORIZONTAL, VERTICAL
87 }
88
89 public static enum ViewType {
90 DEFAULT, DOCUMENT, INQUIRY, LOOKUP, MAINTENANCE, INCIDENT, TRANSACTIONAL;
91 }
92
93 public static enum ControlType {
94 CHECKBOX, CHECKBOXGROUP, FILE, GROUP, HIDDEN, RADIOGROUP, SELECT,
95 TEXTAREA, TEXT, USER
96 }
97
98 public static enum WorkflowAction {
99 SAVE, ROUTE, BLANKETAPPROVE, APPROVE, DISAPPROVE, CANCEL, FYI, ACKNOWLEDGE, COMPLETE, SENDADHOCREQUESTS
100 }
101
102
103
104
105 public enum AjaxReturnTypes {
106 UPDATEPAGE("update-page"), UPDATECOMPONENT("update-component"), REDIRECT("redirect"),
107 UPDATEVIEW("update-view"), UPDATECOLLECTION("update-collection"),
108 UPDATENONE("update-none"), DISPLAYLIGHTBOX("display-lightbox"),
109 UPDATEDIALOG("update-dialog");
110
111 private String key;
112
113 AjaxReturnTypes(String key) {
114 this.key = key;
115 }
116
117 public String getKey() {
118 return key;
119 }
120
121 public void setKey(String key) {
122 this.key = key;
123 }
124 }
125
126 public static class MethodToCallNames {
127 public static final String NAVIGATE = "navigate";
128 public static final String START = "start";
129 public static final String SAVE = "save";
130 public static final String SEARCH = "search";
131 public static final String CLOSE = "close";
132 public static final String ADD_LINE = "addLine";
133 public static final String DELETE_LINE = "deleteLine";
134 public static final String REFRESH = "refresh";
135 public static final String CANCEL = "cancel";
136 public static final String SESSION_TIMEOUT = "sessionTimeout";
137 public static final String TABLE_JSON = "tableJsonRetrieval";
138 public static final String TABLE_DATA = "tableDataRetrieval";
139 }
140
141 public static class ActionEvents {
142 public static final String ADD_LINE = "addLine";
143 public static final String ADD_BLANK_LINE = "addBlankLine";
144 }
145
146 public static class LayoutComponentOptions {
147 public static final String COLUMN_SPAN = "colSpan";
148 public static final String ROW_SPAN = "rowSpan";
149 }
150
151 public static class RowSelection {
152 public static final String ALL = "all";
153 public static final String ODD = "odd";
154 public static final String EVEN = "even";
155 }
156
157 public static class IdSuffixes {
158 public static final String ADD_LINE = "_add";
159 public static final String CONTROL = "_control";
160 public static final String ATTRIBUTE = "_attribute";
161 public static final String COLUMN = "_c";
162 public static final String COLUMN_SORTS = "_columnSorts";
163 public static final String COMPARE = "_comp";
164 public static final String CONSTRAINT = "_constraint";
165 public static final String DETAIL_LINK = "_detLink";
166 public static final String DETAIL_GROUP = "_detGroup";
167 public static final String DIRECT_INQUIRY = "_directinquiry";
168 public static final String ERRORS = "_errors";
169 public static final String INSTRUCTIONAL = "_instructional";
170 public static final String LINE = "_line";
171 public static final String LABEL = "_label";
172 public static final String FIELDSET = "_fieldset";
173 public static final String SUB = "_sub";
174 public static final String SUGGEST = "_suggest";
175 public static final String QUICK_FINDER = "_quickfinder";
176 public static final String SPAN = "_span";
177 public static final String TAB = "_tab";
178 }
179
180 public static class ViewPhases {
181 public static final String INITIALIZE = "INITIALIZE";
182 public static final String APPLY_MODEL = "APPLY_MODEL";
183 public static final String FINALIZE = "FINALIZE";
184 }
185
186 public static class ViewStatus {
187 public static final String CREATED = "C";
188 public static final String INITIALIZED = "I";
189 public static final String FINAL = "F";
190 }
191
192 public static class ContextVariableNames {
193 public static final String COLLECTION_GROUP = "collectionGroup";
194 public static final String CONFIG_PROPERTIES = "ConfigProperties";
195 public static final String COMPONENT = "component";
196 public static final String CONSTANTS = "Constants";
197 public static final String DOCUMENT_ENTRY = "DocumentEntry";
198 public static final String INDEX = "index";
199 public static final String IS_ADD_LINE = "isAddLine";
200 public static final String LINE = "line";
201 public static final String LINE_SUFFIX = "lineSuffix";
202 public static final String READONLY_LINE = "readOnlyLine";
203 public static final String MANAGER = "manager";
204 public static final String NODE = "node";
205 public static final String NODE_PATH = "nodePath";
206 public static final String PARENT = "parent";
207 public static final String THEME_IMAGES = "ThemeImages";
208 public static final String UIF_CONSTANTS = "UifConstants";
209 public static final String VIEW = "view";
210 public static final String VIEW_HELPER = "ViewHelper";
211 public static final String PARENT_LINE = "parentLine";
212 }
213
214 public static class TableToolsKeys {
215 public static final String AASORTING = "aaSorting";
216 public static final String BAUTO_TYPE = "bAutoType";
217 public static final String BPROCESSING = "bProcessing";
218 public static final String BSERVER_SIDE = "bServerSide";
219 public static final String SDOM = "sDom";
220 public static final String CELL_CLASS = "sClass";
221 public static final String MDATA = "mDataProp";
222 public static final String LANGUAGE = "oLanguage";
223 public static final String EMPTY_TABLE = "sEmptyTable";
224 public static final String AO_COLUMNS = "aoColumns";
225 public static final String AO_COLUMN_DEFS = "aoColumnDefs";
226 public static final String SORT_SKIP_ROWS = "aiSortingSkipRows";
227 public static final String SORT_DATA_TYPE = "sSortDataType";
228 public static final String SORTABLE = "bSortable";
229 public static final String TARGETS = "aTargets";
230 public static final String VISIBLE = "bVisible";
231 public static final String SORT_TYPE = "sType";
232 public static final String TABLE_SORT = "bSort";
233 public static final String SAJAX_SOURCE = "sAjaxSource";
234 public static final String FOOTER_CALLBACK = "fnFooterCallback";
235 public static final String AA_DATA = "aaData";
236 public static final String DEFER_RENDER = "bDeferRender";
237 public static final String SDOWNLOAD_SOURCE = "sDownloadSource";
238 }
239
240 public static class TableToolsValues {
241 public static final String DOM_TEXT = "dom-text";
242 public static final String DOM_SELECT = "dom-select";
243 public static final String DOM_CHECK = "dom-checkbox";
244 public static final String DOM_RADIO = "dom-radio";
245
246
247
248 public static final String NUMERIC = "numeric";
249 public static final String STRING = "string";
250 public static final String DATE = "kuali_date";
251 public static final String PERCENT = "kuali_percent";
252 public static final String CURRENCY = "kuali_currency";
253 public static final String TIMESTAMP = "kuali_timestamp";
254
255 public static final String FALSE = "false";
256 public static final String TRUE = "true";
257
258 public static final int ADD_ROW_DEFAULT_INDEX = 0;
259 public static final String JSON_TEMPLATE = "dataTablesJson.ftl";
260 }
261
262 public static class TableLayoutValues {
263 public static final int ACTIONS_COLUMN_LEFT_INDEX = 1;
264 public static final int ACTIONS_COLUMN_RIGHT_INDEX = -1;
265 }
266
267 public static class TabOptionKeys {
268 public static final String ACTIVE = "active";
269 }
270
271 public static class TitleAppendTypes {
272 public static final String DASH = "dash";
273 public static final String PARENTHESIS = "parenthesis";
274 public static final String REPLACE = "replace";
275 public static final String NONE = "none";
276 }
277
278 public static class ComponentProperties {
279 public static final String HEADER_TEXT = "headerText";
280 }
281
282 public static class UrlParams {
283 public static final String ACTION_EVENT = "actionEvent";
284 public static final String FORM_KEY = "formKey";
285 public static final String VIEW_ID = "viewId";
286 public static final String PAGE_ID = "pageId";
287 public static final String HISTORY = "history";
288 public static final String LAST_FORM_KEY = "lastFormKey";
289 public static final String LOGIN_USER = "__login_user";
290 }
291
292 public static class Messages {
293 public static final String VALIDATION_MSG_KEY_PREFIX = "validation.";
294 public static final String STATE_PREFIX = "validation.statePrefix";
295 }
296
297 public static class MessageKeys {
298 public static final String QUERY_DATA_NOT_FOUND = "query.dataNotFound";
299 public static final String OPTION_ALL = "option.all";
300 }
301
302 public static class ClientSideVariables {
303 public static final String KRAD_IMAGE_LOCATION = "kradImageLocation";
304 public static final String KRAD_URL = "kradUrl";
305 public static final String APPLICATION_URL = "applicationUrl";
306 }
307
308 public static class RefreshCallerTypes {
309 public static final String LOOKUP = "LOOKUP";
310 public static final String MULTI_VALUE_LOOKUP = "MULTI_VALUE_LOOKUP";
311 public static final String QUESTION = "QUESTION";
312 }
313
314 public static final class HistoryFlow {
315 public static final String HISTORY_MANAGER = "historyManager";
316 public static final String FLOW = "flow";
317 public static final String START = "start";
318 public static final String RETURN_TO_START = "returnToStart";
319 public static final String SEPARATOR = "@@";
320 }
321
322 public static final class RoleTypes {
323 public static final String CONTROL = "Control";
324 public static final String INPUT_FIELD = "InputField";
325 public static final String GROUP = "Group";
326 public static final String ROW_GROUPING = "RowGrouping";
327 }
328
329 public static final class DataAttributes {
330 public static final String TYPE = "type";
331 public static final String ROLE = "role";
332 public static final String ONCLICK = "onclick";
333 public static final String SUBMIT_DATA = "submit_data";
334 public static final String HAS_MESSAGES = "has_messages";
335 public static final String SERVER_MESSAGES = "server_messages";
336 public static final String VALIDATION_MESSAGES = "validation_messages";
337 public static final String GROUP_VALIDATION_DEFAULTS = "group_validation_defaults";
338 public static final String FIELD_VALIDATION_DEFAULTS = "field_validation_defaults";
339 public static final String MESSAGES_FOR = "messages_for";
340 public static final String PARENT = "parent";
341 public static final String SUMMARIZE = "summarize";
342 public static final String DISPLAY_MESSAGES = "displayMessages";
343 public static final String COLLAPSE_FIELD_MESSAGES = "collapseFieldMessages";
344 public static final String DISPLAY_LABEL = "displayLabel";
345 public static final String SHOW_PAGE_SUMMARY_HEADER = "showPageSummaryHeader";
346 public static final String DISPLAY_HEADER_SUMMARY = "displayHeaderSummary";
347 public static final String IS_TABLE_COLLECTION = "isTableCollection";
348 public static final String HAS_OWN_MESSAGES = "hasOwnMessages";
349 public static final String PAGE_LEVEL = "pageLevel";
350 public static final String FORCE_SHOW = "forceShow";
351 public static final String SECTIONS = "sections";
352 public static final String ORDER = "order";
353 public static final String SERVER_ERRORS = "serverErrors";
354 public static final String SERVER_WARNINGS = "serverWarnings";
355 public static final String SERVER_INFO = "serverInfo";
356 public static final String VIGNORE = "vignore";
357 public static final String TOTAL = "total";
358 public static final String SKIP_TOTAL = "skip_total";
359 public static final String LABEL = "label";
360 public static final String GROUP = "group";
361 public static final String LABEL_FOR = "label_for";
362 public static final String CONTROL_FOR = "control_for";
363 public static final String ADD_CONTROLS = "add_controls";
364 public static final String HEADER_FOR = "header_for";
365 public static final String STICKY_FOOTER = "sticky_footer";
366 public static final String DETAILS_DEFAULT_OPEN = "details_default_open";
367 public static final String TAB_FOR = "tabfor";
368 }
369
370 public static final class CaseConstraintOperators {
371 public static final String HAS_VALUE = "has_value";
372 public static final String EQUALS = "equals";
373 public static final String GREATER_THAN_EQUAL = "greater_than_equal";
374 public static final String LESS_THAN_EQUAL = "less_than_equal";
375 public static final String NOT_EQUAL = "not_equal";
376 public static final String NOT_EQUALS = "not_equals";
377 public static final String GREATER_THAN = "greater_than";
378 public static final String LESS_THAN = "less_than";
379 }
380
381 public static final class JsFunctions {
382 public static final String INITIALIZE_VIEW_STATE = "initializeViewState";
383 public static final String INITIALIZE_SESSION_TIMERS = "initializeSessionTimers";
384 public static final String SET_CONFIG_PARM = "setConfigParam";
385 public static final String SET_VALUE = "setValue";
386 }
387
388 public static final String EVENT_NAMESPACE = "uif";
389
390 public static final class JsEvents {
391 public static final String DIALOG_RESPONSE = "dialogresponse." + EVENT_NAMESPACE;
392 public static final String SHOW_DIALOG = "showdialog." + EVENT_NAMESPACE;
393 }
394
395 public static final class ConfigProperties {
396 public static final String KRAD_IMAGES_URL = "krad.externalizable.images.url";
397 public static final String KRAD_URL = "krad.url";
398 }
399
400 public static final class FileExtensions {
401 public static final String CSS = ".css";
402 public static final String JS = ".js";
403 public static final String MIN = ".min";
404 }
405
406 }