1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kns.web.struts.form; |
17 | |
|
18 | |
import java.util.HashMap; |
19 | |
import java.util.Iterator; |
20 | |
import java.util.List; |
21 | |
import java.util.Map; |
22 | |
|
23 | |
import javax.servlet.http.HttpServletRequest; |
24 | |
|
25 | |
import org.apache.commons.lang.StringUtils; |
26 | |
import org.kuali.rice.kns.lookup.LookupUtils; |
27 | |
import org.kuali.rice.kns.lookup.Lookupable; |
28 | |
import org.kuali.rice.kns.service.DataDictionaryService; |
29 | |
import org.kuali.rice.kns.service.KNSServiceLocatorWeb; |
30 | |
import org.kuali.rice.kns.util.ExternalizableBusinessObjectUtils; |
31 | |
import org.kuali.rice.kns.util.KNSConstants; |
32 | |
import org.kuali.rice.kns.web.ui.Field; |
33 | |
import org.kuali.rice.kns.web.ui.Row; |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | 0 | public class LookupForm extends KualiForm { |
39 | |
private static final long serialVersionUID = 1L; |
40 | |
|
41 | 0 | private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(LookupForm.class); |
42 | |
|
43 | |
private String formKey; |
44 | |
private Map<String, String> fields; |
45 | |
private Map fieldsForLookup; |
46 | |
private String lookupableImplServiceName; |
47 | |
private String conversionFields; |
48 | |
private Map fieldConversions; |
49 | |
private String businessObjectClassName; |
50 | |
private Lookupable lookupable; |
51 | 0 | private boolean hideReturnLink = false; |
52 | 0 | private boolean suppressActions = false; |
53 | 0 | private boolean multipleValues = false; |
54 | |
private String lookupAnchor; |
55 | |
private String readOnlyFields; |
56 | |
private List readOnlyFieldsList; |
57 | |
private String referencesToRefresh; |
58 | |
private boolean searchUsingOnlyPrimaryKeyValues; |
59 | |
private String primaryKeyFieldLabels; |
60 | 0 | private boolean showMaintenanceLinks = false; |
61 | |
private String docNum; |
62 | |
private String htmlDataType; |
63 | |
private String lookupObjectId; |
64 | 0 | private boolean lookupCriteriaEnabled = true; |
65 | 0 | private boolean supplementalActionsEnabled = false; |
66 | 0 | private boolean actionUrlsExist = false; |
67 | 0 | private boolean ddExtraButton = false; |
68 | 0 | private boolean headerBarEnabled = true; |
69 | 0 | private boolean disableSearchButtons = false; |
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
public void addRequiredNonEditableProperties(){ |
75 | 0 | super.addRequiredNonEditableProperties(); |
76 | 0 | registerRequiredNonEditableProperty(KNSConstants.LOOKUPABLE_IMPL_ATTRIBUTE_NAME); |
77 | 0 | registerRequiredNonEditableProperty(KNSConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE); |
78 | 0 | registerRequiredNonEditableProperty(KNSConstants.DISPATCH_REQUEST_PARAMETER); |
79 | 0 | registerRequiredNonEditableProperty(KNSConstants.DOC_FORM_KEY); |
80 | 0 | registerRequiredNonEditableProperty(KNSConstants.REFRESH_CALLER); |
81 | 0 | registerRequiredNonEditableProperty(KNSConstants.DOC_NUM); |
82 | 0 | registerRequiredNonEditableProperty(KNSConstants.REFERENCES_TO_REFRESH); |
83 | 0 | registerRequiredNonEditableProperty(KNSConstants.FORM_KEY); |
84 | 0 | registerRequiredNonEditableProperty(KNSConstants.CONVERSION_FIELDS_PARAMETER); |
85 | 0 | registerRequiredNonEditableProperty(KNSConstants.FIELDS_CONVERSION_PARAMETER); |
86 | 0 | registerRequiredNonEditableProperty(KNSConstants.HIDE_LOOKUP_RETURN_LINK); |
87 | 0 | registerRequiredNonEditableProperty(KNSConstants.MULTIPLE_VALUE); |
88 | 0 | registerRequiredNonEditableProperty(KNSConstants.BACK_LOCATION); |
89 | 0 | registerRequiredNonEditableProperty(KNSConstants.LOOKUP_ANCHOR); |
90 | 0 | registerRequiredNonEditableProperty("searchUsingOnlyPrimaryKeyValues"); |
91 | 0 | registerRequiredNonEditableProperty(KNSConstants.MULTIPLE_VALUE_LOOKUP_PREVIOUSLY_SELECTED_OBJ_IDS_PARAM); |
92 | 0 | registerRequiredNonEditableProperty(KNSConstants.TableRenderConstants.VIEWED_PAGE_NUMBER); |
93 | 0 | } |
94 | |
|
95 | |
|
96 | |
|
97 | |
|
98 | |
public String getHtmlDataType() { |
99 | 0 | return this.htmlDataType; |
100 | |
} |
101 | |
|
102 | |
|
103 | |
|
104 | |
|
105 | |
public void setHtmlDataType(String htmlDataType) { |
106 | 0 | this.htmlDataType = htmlDataType; |
107 | 0 | } |
108 | |
|
109 | |
|
110 | |
|
111 | |
|
112 | |
public String getDocNum() { |
113 | 0 | return this.docNum; |
114 | |
} |
115 | |
|
116 | |
|
117 | |
|
118 | |
|
119 | |
public void setDocNum(String docNum) { |
120 | 0 | this.docNum = docNum; |
121 | 0 | } |
122 | |
|
123 | |
|
124 | |
|
125 | |
|
126 | |
private boolean hasReturnableRow; |
127 | |
|
128 | |
|
129 | |
|
130 | |
private Map requestParameters; |
131 | |
|
132 | |
|
133 | |
|
134 | |
|
135 | |
@Override |
136 | |
public void postprocessRequestParameters(Map requestParameters) { |
137 | 0 | this.requestParameters = requestParameters; |
138 | 0 | super.postprocessRequestParameters(requestParameters); |
139 | 0 | } |
140 | |
|
141 | |
|
142 | |
|
143 | |
|
144 | |
public void populate(HttpServletRequest request) { |
145 | 0 | super.populate(request); |
146 | |
|
147 | 0 | DataDictionaryService ddService = KNSServiceLocatorWeb.getDataDictionaryService(); |
148 | |
|
149 | |
try { |
150 | 0 | Lookupable localLookupable = null; |
151 | 0 | if (StringUtils.isBlank(getParameter(request, KNSConstants.LOOKUPABLE_IMPL_ATTRIBUTE_NAME)) && StringUtils.isBlank(getLookupableImplServiceName())) { |
152 | |
|
153 | 0 | String localBusinessObjectClassName = getParameter(request, KNSConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE); |
154 | 0 | if ( ExternalizableBusinessObjectUtils.isExternalizableBusinessObjectInterface(localBusinessObjectClassName) ) { |
155 | 0 | Class localBusinessObjectClass = Class.forName(localBusinessObjectClassName); |
156 | 0 | localBusinessObjectClassName = KNSServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(localBusinessObjectClass).getExternalizableBusinessObjectImplementation(localBusinessObjectClass).getName(); |
157 | |
} |
158 | 0 | setBusinessObjectClassName(localBusinessObjectClassName); |
159 | 0 | if (StringUtils.isBlank(localBusinessObjectClassName)) { |
160 | 0 | LOG.error("Business object class not passed to lookup."); |
161 | 0 | throw new RuntimeException("Business object class not passed to lookup."); |
162 | |
} |
163 | |
|
164 | |
|
165 | 0 | String lookupImplID = KNSServiceLocatorWeb.getBusinessObjectDictionaryService().getLookupableID(Class.forName(localBusinessObjectClassName)); |
166 | 0 | if (lookupImplID == null) { |
167 | 0 | lookupImplID = "kualiLookupable"; |
168 | |
} |
169 | |
|
170 | 0 | setLookupableImplServiceName(lookupImplID); |
171 | |
} |
172 | 0 | localLookupable = KNSServiceLocatorWeb.getLookupable(getLookupableImplServiceName()); |
173 | |
|
174 | 0 | if (localLookupable == null) { |
175 | 0 | LOG.error("Lookup impl not found for lookup impl name " + getLookupableImplServiceName()); |
176 | 0 | throw new RuntimeException("Lookup impl not found for lookup impl name " + getLookupableImplServiceName()); |
177 | |
} |
178 | |
|
179 | |
|
180 | 0 | localLookupable.setParameters(requestParameters); |
181 | 0 | requestParameters = null; |
182 | |
|
183 | 0 | if (getParameter(request, KNSConstants.LOOKUPABLE_IMPL_ATTRIBUTE_NAME) != null) { |
184 | 0 | setLookupableImplServiceName(getParameter(request, KNSConstants.LOOKUPABLE_IMPL_ATTRIBUTE_NAME)); |
185 | |
} |
186 | |
|
187 | 0 | if (getParameter(request, KNSConstants.LOOKUPABLE_IMPL_ATTRIBUTE_NAME) != null) { |
188 | 0 | setLookupableImplServiceName(getParameter(request, KNSConstants.LOOKUPABLE_IMPL_ATTRIBUTE_NAME)); |
189 | |
} |
190 | |
|
191 | |
|
192 | 0 | if (request.getAttribute(KNSConstants.DOC_FORM_KEY) != null && StringUtils.isBlank(this.getFormKey())) { |
193 | 0 | setFormKey((String) request.getAttribute(KNSConstants.DOC_FORM_KEY)); |
194 | |
} |
195 | 0 | else if (getParameter(request, KNSConstants.DOC_FORM_KEY) != null && StringUtils.isBlank(this.getFormKey())) { |
196 | 0 | setFormKey(getParameter(request, KNSConstants.DOC_FORM_KEY)); |
197 | |
} |
198 | |
|
199 | 0 | if (getParameter(request, KNSConstants.DOC_NUM) != null) { |
200 | 0 | setDocNum(getParameter(request, KNSConstants.DOC_NUM)); |
201 | |
} |
202 | |
|
203 | 0 | String returnLocation = getParameter(request, "returnLocation"); |
204 | 0 | if (StringUtils.isNotBlank(returnLocation)) { |
205 | 0 | setBackLocation(returnLocation); |
206 | 0 | localLookupable.getLookupableHelperService().setBackLocation(returnLocation); |
207 | |
} |
208 | |
|
209 | 0 | if (getParameter(request, "conversionFields") != null) { |
210 | 0 | setConversionFields(getParameter(request, "conversionFields")); |
211 | |
} |
212 | 0 | if (getParameter(request, KNSConstants.EXTRA_BUTTON_SOURCE) != null) { |
213 | |
|
214 | 0 | ddExtraButton=false; |
215 | 0 | setExtraButtonSource(getParameter(request, KNSConstants.EXTRA_BUTTON_SOURCE)); |
216 | |
} |
217 | 0 | if (getParameter(request, KNSConstants.EXTRA_BUTTON_PARAMS) != null) { |
218 | 0 | setExtraButtonParams(getParameter(request, KNSConstants.EXTRA_BUTTON_PARAMS)); |
219 | |
} |
220 | 0 | String value = getParameter(request, "multipleValues"); |
221 | 0 | if (value != null) { |
222 | 0 | if ("YES".equals(value.toUpperCase())) { |
223 | 0 | setMultipleValues(true); |
224 | |
} |
225 | |
else { |
226 | 0 | setMultipleValues(new Boolean(getParameter(request, "multipleValues")).booleanValue()); |
227 | |
} |
228 | |
} |
229 | 0 | if (getParameter(request, KNSConstants.REFERENCES_TO_REFRESH) != null) { |
230 | 0 | setReferencesToRefresh(getParameter(request, KNSConstants.REFERENCES_TO_REFRESH)); |
231 | |
} |
232 | |
|
233 | 0 | if (getParameter(request, "readOnlyFields") != null) { |
234 | 0 | setReadOnlyFields(getParameter(request, "readOnlyFields")); |
235 | 0 | setReadOnlyFieldsList(LookupUtils.translateReadOnlyFieldsToList(this.readOnlyFields)); |
236 | 0 | localLookupable.setReadOnlyFieldsList(getReadOnlyFieldsList()); |
237 | |
} |
238 | |
|
239 | |
|
240 | 0 | localLookupable.setBusinessObjectClass(Class.forName(getBusinessObjectClassName())); |
241 | 0 | Map<String, String> fieldValues = new HashMap<String, String>(); |
242 | 0 | Map<String, String> formFields = getFields(); |
243 | 0 | Class boClass = Class.forName(getBusinessObjectClassName()); |
244 | |
|
245 | 0 | for (Iterator iter = localLookupable.getRows().iterator(); iter.hasNext();) { |
246 | 0 | Row row = (Row) iter.next(); |
247 | |
|
248 | 0 | for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) { |
249 | 0 | Field field = (Field) iterator.next(); |
250 | |
|
251 | |
|
252 | 0 | if (formFields != null && formFields.containsKey(field.getPropertyName())) { |
253 | 0 | field.setPropertyValue(formFields.get(field.getPropertyName())); |
254 | |
} |
255 | |
|
256 | |
|
257 | 0 | if (getParameter(request, field.getPropertyName()) != null) { |
258 | 0 | if(!Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())) { |
259 | 0 | field.setPropertyValue(getParameter(request, field.getPropertyName()).trim()); |
260 | |
} else { |
261 | |
|
262 | 0 | field.setPropertyValues(getParameterValues(request, field.getPropertyName())); |
263 | |
} |
264 | |
} |
265 | |
|
266 | 0 | field.setPropertyValue(LookupUtils.forceUppercase(boClass, field.getPropertyName(), field.getPropertyValue())); |
267 | 0 | fieldValues.put(field.getPropertyName(), field.getPropertyValue()); |
268 | |
|
269 | 0 | localLookupable.applyFieldAuthorizationsFromNestedLookups(field); |
270 | 0 | } |
271 | 0 | } |
272 | |
|
273 | 0 | if (localLookupable.checkForAdditionalFields(fieldValues)) { |
274 | 0 | for (Iterator iter = localLookupable.getRows().iterator(); iter.hasNext();) { |
275 | 0 | Row row = (Row) iter.next(); |
276 | |
|
277 | 0 | for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) { |
278 | 0 | Field field = (Field) iterator.next(); |
279 | |
|
280 | |
|
281 | 0 | if (formFields != null && formFields.containsKey(field.getPropertyName())) { |
282 | 0 | field.setPropertyValue(formFields.get(field.getPropertyName())); |
283 | |
} |
284 | |
|
285 | |
|
286 | 0 | if (getParameter(request, field.getPropertyName()) != null) { |
287 | 0 | if(!Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())) { |
288 | 0 | field.setPropertyValue(getParameter(request, field.getPropertyName()).trim()); |
289 | |
} else { |
290 | |
|
291 | 0 | field.setPropertyValues(getParameterValues(request, field.getPropertyName())); |
292 | |
} |
293 | |
} |
294 | 0 | fieldValues.put(field.getPropertyName(), field.getPropertyValue()); |
295 | 0 | } |
296 | 0 | } |
297 | |
|
298 | |
} |
299 | 0 | fieldValues.put(KNSConstants.DOC_FORM_KEY, this.getFormKey()); |
300 | 0 | fieldValues.put(KNSConstants.BACK_LOCATION, this.getBackLocation()); |
301 | 0 | if(this.getDocNum() != null){ |
302 | 0 | fieldValues.put(KNSConstants.DOC_NUM, this.getDocNum()); |
303 | |
} |
304 | 0 | if (StringUtils.isNotBlank(getReferencesToRefresh())) { |
305 | 0 | fieldValues.put(KNSConstants.REFERENCES_TO_REFRESH, this.getReferencesToRefresh()); |
306 | |
} |
307 | |
|
308 | 0 | this.setFields(fieldValues); |
309 | |
|
310 | 0 | setFieldConversions(LookupUtils.translateFieldConversions(this.conversionFields)); |
311 | 0 | localLookupable.setFieldConversions(getFieldConversions()); |
312 | 0 | if(StringUtils.isNotEmpty(localLookupable.getExtraButtonSource())) { |
313 | 0 | setExtraButtonSource(localLookupable.getExtraButtonSource()); |
314 | |
|
315 | 0 | ddExtraButton=true; |
316 | |
} |
317 | 0 | if(StringUtils.isNotEmpty(localLookupable.getExtraButtonParams())) { |
318 | 0 | setExtraButtonParams(localLookupable.getExtraButtonParams()); |
319 | |
} |
320 | 0 | setLookupable(localLookupable); |
321 | 0 | setFieldsForLookup(fieldValues); |
322 | |
|
323 | |
|
324 | 0 | if (!isShowMaintenanceLinks()) { |
325 | 0 | if (StringUtils.contains(getBackLocation(), "/"+KNSConstants.PORTAL_ACTION) |
326 | |
|| StringUtils.contains(getBackLocation(), "/index.html")) { |
327 | 0 | showMaintenanceLinks = true; |
328 | |
} |
329 | |
} |
330 | |
} |
331 | 0 | catch (ClassNotFoundException e) { |
332 | 0 | LOG.error("Business Object class " + getBusinessObjectClassName() + " not found"); |
333 | 0 | throw new RuntimeException("Business Object class " + getBusinessObjectClassName() + " not found", e); |
334 | 0 | } |
335 | 0 | } |
336 | |
|
337 | |
|
338 | |
|
339 | |
|
340 | |
public String getLookupableImplServiceName() { |
341 | 0 | return lookupableImplServiceName; |
342 | |
} |
343 | |
|
344 | |
|
345 | |
|
346 | |
|
347 | |
public void setLookupableImplServiceName(String lookupableImplServiceName) { |
348 | 0 | this.lookupableImplServiceName = lookupableImplServiceName; |
349 | 0 | } |
350 | |
|
351 | |
|
352 | |
|
353 | |
|
354 | |
public String getFormKey() { |
355 | 0 | return formKey; |
356 | |
} |
357 | |
|
358 | |
|
359 | |
|
360 | |
|
361 | |
public void setFormKey(String formKey) { |
362 | 0 | this.formKey = formKey; |
363 | 0 | } |
364 | |
|
365 | |
|
366 | |
|
367 | |
|
368 | |
public Map<String, String> getFields() { |
369 | 0 | return fields; |
370 | |
} |
371 | |
|
372 | |
|
373 | |
|
374 | |
|
375 | |
public void setFields(Map<String, String> fields) { |
376 | 0 | this.fields = fields; |
377 | 0 | } |
378 | |
|
379 | |
|
380 | |
|
381 | |
|
382 | |
public String getConversionFields() { |
383 | 0 | return conversionFields; |
384 | |
} |
385 | |
|
386 | |
|
387 | |
|
388 | |
|
389 | |
public void setConversionFields(String conversionFields) { |
390 | 0 | this.conversionFields = conversionFields; |
391 | 0 | } |
392 | |
|
393 | |
|
394 | |
|
395 | |
|
396 | |
public Map getFieldConversions() { |
397 | 0 | return fieldConversions; |
398 | |
} |
399 | |
|
400 | |
|
401 | |
|
402 | |
|
403 | |
public void setFieldConversions(Map fieldConversions) { |
404 | 0 | this.fieldConversions = fieldConversions; |
405 | 0 | } |
406 | |
|
407 | |
|
408 | |
|
409 | |
|
410 | |
public String getBusinessObjectClassName() { |
411 | 0 | return businessObjectClassName; |
412 | |
} |
413 | |
|
414 | |
|
415 | |
|
416 | |
|
417 | |
public void setBusinessObjectClassName(String businessObjectClassName) { |
418 | 0 | this.businessObjectClassName = businessObjectClassName; |
419 | 0 | } |
420 | |
|
421 | |
|
422 | |
|
423 | |
|
424 | |
|
425 | |
public Lookupable getLookupable() { |
426 | 0 | return lookupable; |
427 | |
} |
428 | |
|
429 | |
|
430 | |
|
431 | |
|
432 | |
|
433 | |
public void setLookupable(Lookupable lookupable) { |
434 | 0 | this.lookupable = lookupable; |
435 | 0 | } |
436 | |
|
437 | |
|
438 | |
|
439 | |
|
440 | |
|
441 | |
public boolean isHideReturnLink() { |
442 | 0 | return hideReturnLink; |
443 | |
} |
444 | |
|
445 | |
|
446 | |
|
447 | |
|
448 | |
public void setSuppressActions(boolean suppressActions) { |
449 | 0 | this.suppressActions = suppressActions; |
450 | 0 | } |
451 | |
|
452 | |
|
453 | |
|
454 | |
|
455 | |
public boolean isSuppressActions() { |
456 | 0 | return suppressActions; |
457 | |
} |
458 | |
|
459 | |
|
460 | |
|
461 | |
|
462 | |
|
463 | |
public void setHideReturnLink(boolean hideReturnLink) { |
464 | 0 | this.hideReturnLink = hideReturnLink; |
465 | 0 | } |
466 | |
|
467 | |
|
468 | |
public String getExtraButtonParams() { |
469 | 0 | return extraButtons.get(0).getExtraButtonParams(); |
470 | |
} |
471 | |
|
472 | |
|
473 | |
public void setExtraButtonParams(String extraButtonParams) { |
474 | 0 | extraButtons.get(0).setExtraButtonParams( extraButtonParams ); |
475 | 0 | } |
476 | |
|
477 | |
|
478 | |
public String getExtraButtonSource() { |
479 | 0 | return extraButtons.get(0).getExtraButtonSource(); |
480 | |
} |
481 | |
|
482 | |
|
483 | |
public void setExtraButtonSource(String extraButtonSource) { |
484 | 0 | extraButtons.get(0).setExtraButtonSource( extraButtonSource ); |
485 | 0 | } |
486 | |
|
487 | |
|
488 | |
|
489 | |
|
490 | |
|
491 | |
|
492 | |
public boolean isMultipleValues() { |
493 | 0 | return multipleValues; |
494 | |
} |
495 | |
|
496 | |
|
497 | |
|
498 | |
|
499 | |
|
500 | |
public void setMultipleValues(boolean multipleValues) { |
501 | 0 | this.multipleValues = multipleValues; |
502 | 0 | } |
503 | |
|
504 | |
public String getLookupAnchor() { |
505 | 0 | return lookupAnchor; |
506 | |
} |
507 | |
|
508 | |
public void setLookupAnchor(String lookupAnchor) { |
509 | 0 | this.lookupAnchor = lookupAnchor; |
510 | 0 | } |
511 | |
|
512 | |
|
513 | |
|
514 | |
|
515 | |
|
516 | |
public Map getFieldsForLookup() { |
517 | 0 | return fieldsForLookup; |
518 | |
} |
519 | |
|
520 | |
|
521 | |
|
522 | |
|
523 | |
|
524 | |
public void setFieldsForLookup(Map fieldsForLookup) { |
525 | 0 | this.fieldsForLookup = fieldsForLookup; |
526 | 0 | } |
527 | |
|
528 | |
|
529 | |
|
530 | |
|
531 | |
|
532 | |
public String getReadOnlyFields() { |
533 | 0 | return readOnlyFields; |
534 | |
} |
535 | |
|
536 | |
|
537 | |
|
538 | |
|
539 | |
|
540 | |
public void setReadOnlyFields(String readOnlyFields) { |
541 | 0 | this.readOnlyFields = readOnlyFields; |
542 | 0 | } |
543 | |
|
544 | |
|
545 | |
|
546 | |
|
547 | |
|
548 | |
public List getReadOnlyFieldsList() { |
549 | 0 | return readOnlyFieldsList; |
550 | |
} |
551 | |
|
552 | |
|
553 | |
|
554 | |
|
555 | |
|
556 | |
public void setReadOnlyFieldsList(List readOnlyFieldsList) { |
557 | 0 | this.readOnlyFieldsList = readOnlyFieldsList; |
558 | 0 | } |
559 | |
|
560 | |
public String getReferencesToRefresh() { |
561 | 0 | return referencesToRefresh; |
562 | |
} |
563 | |
|
564 | |
public void setReferencesToRefresh(String referencesToRefresh) { |
565 | 0 | this.referencesToRefresh = referencesToRefresh; |
566 | 0 | } |
567 | |
|
568 | |
public String getPrimaryKeyFieldLabels() { |
569 | 0 | return primaryKeyFieldLabels; |
570 | |
} |
571 | |
|
572 | |
public void setPrimaryKeyFieldLabels(String primaryKeyFieldLabels) { |
573 | 0 | this.primaryKeyFieldLabels = primaryKeyFieldLabels; |
574 | 0 | } |
575 | |
|
576 | |
public boolean isSearchUsingOnlyPrimaryKeyValues() { |
577 | 0 | return searchUsingOnlyPrimaryKeyValues; |
578 | |
} |
579 | |
|
580 | |
public void setSearchUsingOnlyPrimaryKeyValues(boolean searchUsingOnlyPrimaryKeyValues) { |
581 | 0 | this.searchUsingOnlyPrimaryKeyValues = searchUsingOnlyPrimaryKeyValues; |
582 | 0 | } |
583 | |
|
584 | |
|
585 | |
|
586 | |
|
587 | |
|
588 | |
public boolean isShowMaintenanceLinks() { |
589 | 0 | return showMaintenanceLinks; |
590 | |
} |
591 | |
|
592 | |
|
593 | |
|
594 | |
|
595 | |
|
596 | |
public void setShowMaintenanceLinks(boolean showMaintenanceLinks) { |
597 | 0 | this.showMaintenanceLinks = showMaintenanceLinks; |
598 | 0 | } |
599 | |
|
600 | |
|
601 | |
|
602 | |
|
603 | |
|
604 | |
|
605 | |
public boolean isHasReturnableRow() { |
606 | 0 | return this.hasReturnableRow; |
607 | |
} |
608 | |
|
609 | |
|
610 | |
|
611 | |
|
612 | |
|
613 | |
|
614 | |
public void setHasReturnableRow(boolean hasReturnableRow) { |
615 | 0 | this.hasReturnableRow = hasReturnableRow; |
616 | 0 | } |
617 | |
|
618 | |
|
619 | |
|
620 | |
|
621 | |
public String getLookupObjectId() { |
622 | 0 | return this.lookupObjectId; |
623 | |
} |
624 | |
|
625 | |
|
626 | |
|
627 | |
|
628 | |
public void setLookupObjectId(String lookupObjectId) { |
629 | 0 | this.lookupObjectId = lookupObjectId; |
630 | 0 | } |
631 | |
|
632 | |
|
633 | |
|
634 | |
|
635 | |
public boolean isLookupCriteriaEnabled() { |
636 | 0 | return this.lookupCriteriaEnabled; |
637 | |
} |
638 | |
|
639 | |
|
640 | |
|
641 | |
|
642 | |
public void setLookupCriteriaEnabled(boolean lookupCriteriaEnabled) { |
643 | 0 | this.lookupCriteriaEnabled = lookupCriteriaEnabled; |
644 | 0 | } |
645 | |
|
646 | |
|
647 | |
|
648 | |
|
649 | |
public boolean isSupplementalActionsEnabled() { |
650 | 0 | return this.supplementalActionsEnabled; |
651 | |
} |
652 | |
|
653 | |
|
654 | |
|
655 | |
|
656 | |
public void setSupplementalActionsEnabled(boolean supplementalActionsEnabled) { |
657 | 0 | this.supplementalActionsEnabled = supplementalActionsEnabled; |
658 | 0 | } |
659 | |
|
660 | |
|
661 | |
|
662 | |
|
663 | |
|
664 | |
public void setActionUrlsExist(boolean actionUrlsExist) { |
665 | 0 | this.actionUrlsExist = actionUrlsExist; |
666 | 0 | } |
667 | |
|
668 | |
|
669 | |
|
670 | |
|
671 | |
public boolean isActionUrlsExist() { |
672 | 0 | return actionUrlsExist; |
673 | |
} |
674 | |
|
675 | |
|
676 | |
|
677 | |
|
678 | |
public boolean isDdExtraButton() { |
679 | 0 | return this.ddExtraButton; |
680 | |
} |
681 | |
|
682 | |
|
683 | |
|
684 | |
|
685 | |
public void setDdExtraButton(boolean ddExtraButton) { |
686 | 0 | this.ddExtraButton = ddExtraButton; |
687 | 0 | } |
688 | |
|
689 | |
public boolean isHeaderBarEnabled() { |
690 | 0 | return headerBarEnabled; |
691 | |
} |
692 | |
|
693 | |
public void setHeaderBarEnabled(boolean headerBarEnabled) { |
694 | 0 | this.headerBarEnabled = headerBarEnabled; |
695 | 0 | } |
696 | |
|
697 | |
public boolean isDisableSearchButtons() { |
698 | 0 | return this.disableSearchButtons; |
699 | |
} |
700 | |
|
701 | |
public void setDisableSearchButtons(boolean disableSearchButtons) { |
702 | 0 | this.disableSearchButtons = disableSearchButtons; |
703 | 0 | } |
704 | |
|
705 | |
|
706 | |
|
707 | |
|
708 | |
|
709 | |
|
710 | |
|
711 | |
public boolean getRenderSearchButtons() { |
712 | 0 | boolean renderSearchButtons = true; |
713 | |
|
714 | 0 | if (disableSearchButtons |
715 | |
|| KNSServiceLocatorWeb.getBusinessObjectDictionaryService().disableSearchButtonsInLookup( |
716 | |
getLookupable().getBusinessObjectClass())) { |
717 | 0 | renderSearchButtons = false; |
718 | |
} |
719 | |
|
720 | 0 | return renderSearchButtons; |
721 | |
} |
722 | |
} |