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.KNSServiceLocator; |
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 = KNSServiceLocator.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 = KNSServiceLocator.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 = KNSServiceLocator.getBusinessObjectDictionaryService().getLookupableID(Class.forName(localBusinessObjectClassName)); |
166 | 0 | if (lookupImplID == null) { |
167 | 0 | lookupImplID = "kualiLookupable"; |
168 | |
} |
169 | |
|
170 | 0 | setLookupableImplServiceName(lookupImplID); |
171 | |
} |
172 | 0 | localLookupable = KNSServiceLocator.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 | if (getParameter(request, "returnLocation") != null) { |
204 | 0 | setBackLocation(getParameter(request, "returnLocation")); |
205 | |
} |
206 | 0 | if (getParameter(request, "conversionFields") != null) { |
207 | 0 | setConversionFields(getParameter(request, "conversionFields")); |
208 | |
} |
209 | 0 | if (getParameter(request, KNSConstants.EXTRA_BUTTON_SOURCE) != null) { |
210 | |
|
211 | 0 | ddExtraButton=false; |
212 | 0 | setExtraButtonSource(getParameter(request, KNSConstants.EXTRA_BUTTON_SOURCE)); |
213 | |
} |
214 | 0 | if (getParameter(request, KNSConstants.EXTRA_BUTTON_PARAMS) != null) { |
215 | 0 | setExtraButtonParams(getParameter(request, KNSConstants.EXTRA_BUTTON_PARAMS)); |
216 | |
} |
217 | 0 | String value = getParameter(request, "multipleValues"); |
218 | 0 | if (value != null) { |
219 | 0 | if ("YES".equals(value.toUpperCase())) { |
220 | 0 | setMultipleValues(true); |
221 | |
} |
222 | |
else { |
223 | 0 | setMultipleValues(new Boolean(getParameter(request, "multipleValues")).booleanValue()); |
224 | |
} |
225 | |
} |
226 | 0 | if (getParameter(request, KNSConstants.REFERENCES_TO_REFRESH) != null) { |
227 | 0 | setReferencesToRefresh(getParameter(request, KNSConstants.REFERENCES_TO_REFRESH)); |
228 | |
} |
229 | |
|
230 | 0 | if (getParameter(request, "readOnlyFields") != null) { |
231 | 0 | setReadOnlyFields(getParameter(request, "readOnlyFields")); |
232 | 0 | setReadOnlyFieldsList(LookupUtils.translateReadOnlyFieldsToList(this.readOnlyFields)); |
233 | 0 | localLookupable.setReadOnlyFieldsList(getReadOnlyFieldsList()); |
234 | |
} |
235 | |
|
236 | |
|
237 | 0 | localLookupable.setBusinessObjectClass(Class.forName(getBusinessObjectClassName())); |
238 | 0 | Map<String, String> fieldValues = new HashMap<String, String>(); |
239 | 0 | Map<String, String> formFields = getFields(); |
240 | 0 | Class boClass = Class.forName(getBusinessObjectClassName()); |
241 | |
|
242 | 0 | for (Iterator iter = localLookupable.getRows().iterator(); iter.hasNext();) { |
243 | 0 | Row row = (Row) iter.next(); |
244 | |
|
245 | 0 | for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) { |
246 | 0 | Field field = (Field) iterator.next(); |
247 | |
|
248 | |
|
249 | 0 | if (formFields != null && formFields.containsKey(field.getPropertyName())) { |
250 | 0 | field.setPropertyValue(formFields.get(field.getPropertyName())); |
251 | |
} |
252 | |
|
253 | |
|
254 | 0 | if (getParameter(request, field.getPropertyName()) != null) { |
255 | 0 | if(!Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())) { |
256 | 0 | field.setPropertyValue(getParameter(request, field.getPropertyName()).trim()); |
257 | |
} else { |
258 | |
|
259 | 0 | field.setPropertyValues(getParameterValues(request, field.getPropertyName())); |
260 | |
} |
261 | |
} |
262 | |
|
263 | 0 | field.setPropertyValue(LookupUtils.forceUppercase(boClass, field.getPropertyName(), field.getPropertyValue())); |
264 | 0 | fieldValues.put(field.getPropertyName(), field.getPropertyValue()); |
265 | |
|
266 | 0 | localLookupable.applyFieldAuthorizationsFromNestedLookups(field); |
267 | 0 | } |
268 | 0 | } |
269 | |
|
270 | 0 | if (localLookupable.checkForAdditionalFields(fieldValues)) { |
271 | 0 | for (Iterator iter = localLookupable.getRows().iterator(); iter.hasNext();) { |
272 | 0 | Row row = (Row) iter.next(); |
273 | |
|
274 | 0 | for (Iterator iterator = row.getFields().iterator(); iterator.hasNext();) { |
275 | 0 | Field field = (Field) iterator.next(); |
276 | |
|
277 | |
|
278 | 0 | if (formFields != null && formFields.containsKey(field.getPropertyName())) { |
279 | 0 | field.setPropertyValue(formFields.get(field.getPropertyName())); |
280 | |
} |
281 | |
|
282 | |
|
283 | 0 | if (getParameter(request, field.getPropertyName()) != null) { |
284 | 0 | if(!Field.MULTI_VALUE_FIELD_TYPES.contains(field.getFieldType())) { |
285 | 0 | field.setPropertyValue(getParameter(request, field.getPropertyName()).trim()); |
286 | |
} else { |
287 | |
|
288 | 0 | field.setPropertyValues(getParameterValues(request, field.getPropertyName())); |
289 | |
} |
290 | |
} |
291 | 0 | fieldValues.put(field.getPropertyName(), field.getPropertyValue()); |
292 | 0 | } |
293 | 0 | } |
294 | |
|
295 | |
} |
296 | 0 | fieldValues.put(KNSConstants.DOC_FORM_KEY, this.getFormKey()); |
297 | 0 | fieldValues.put(KNSConstants.BACK_LOCATION, this.getBackLocation()); |
298 | 0 | if(this.getDocNum() != null){ |
299 | 0 | fieldValues.put(KNSConstants.DOC_NUM, this.getDocNum()); |
300 | |
} |
301 | 0 | if (StringUtils.isNotBlank(getReferencesToRefresh())) { |
302 | 0 | fieldValues.put(KNSConstants.REFERENCES_TO_REFRESH, this.getReferencesToRefresh()); |
303 | |
} |
304 | |
|
305 | 0 | this.setFields(fieldValues); |
306 | |
|
307 | 0 | setFieldConversions(LookupUtils.translateFieldConversions(this.conversionFields)); |
308 | 0 | localLookupable.setFieldConversions(getFieldConversions()); |
309 | 0 | if(StringUtils.isNotEmpty(localLookupable.getExtraButtonSource())) { |
310 | 0 | setExtraButtonSource(localLookupable.getExtraButtonSource()); |
311 | |
|
312 | 0 | ddExtraButton=true; |
313 | |
} |
314 | 0 | if(StringUtils.isNotEmpty(localLookupable.getExtraButtonParams())) { |
315 | 0 | setExtraButtonParams(localLookupable.getExtraButtonParams()); |
316 | |
} |
317 | 0 | setLookupable(localLookupable); |
318 | 0 | setFieldsForLookup(fieldValues); |
319 | |
|
320 | |
|
321 | 0 | if (!isShowMaintenanceLinks()) { |
322 | 0 | if (StringUtils.contains(getBackLocation(), "/"+KNSConstants.PORTAL_ACTION) |
323 | |
|| StringUtils.contains(getBackLocation(), "/index.html")) { |
324 | 0 | showMaintenanceLinks = true; |
325 | |
} |
326 | |
} |
327 | |
} |
328 | 0 | catch (ClassNotFoundException e) { |
329 | 0 | LOG.error("Business Object class " + getBusinessObjectClassName() + " not found"); |
330 | 0 | throw new RuntimeException("Business Object class " + getBusinessObjectClassName() + " not found", e); |
331 | 0 | } |
332 | 0 | } |
333 | |
|
334 | |
|
335 | |
|
336 | |
|
337 | |
public String getLookupableImplServiceName() { |
338 | 0 | return lookupableImplServiceName; |
339 | |
} |
340 | |
|
341 | |
|
342 | |
|
343 | |
|
344 | |
public void setLookupableImplServiceName(String lookupableImplServiceName) { |
345 | 0 | this.lookupableImplServiceName = lookupableImplServiceName; |
346 | 0 | } |
347 | |
|
348 | |
|
349 | |
|
350 | |
|
351 | |
public String getFormKey() { |
352 | 0 | return formKey; |
353 | |
} |
354 | |
|
355 | |
|
356 | |
|
357 | |
|
358 | |
public void setFormKey(String formKey) { |
359 | 0 | this.formKey = formKey; |
360 | 0 | } |
361 | |
|
362 | |
|
363 | |
|
364 | |
|
365 | |
public Map<String, String> getFields() { |
366 | 0 | return fields; |
367 | |
} |
368 | |
|
369 | |
|
370 | |
|
371 | |
|
372 | |
public void setFields(Map<String, String> fields) { |
373 | 0 | this.fields = fields; |
374 | 0 | } |
375 | |
|
376 | |
|
377 | |
|
378 | |
|
379 | |
public String getConversionFields() { |
380 | 0 | return conversionFields; |
381 | |
} |
382 | |
|
383 | |
|
384 | |
|
385 | |
|
386 | |
public void setConversionFields(String conversionFields) { |
387 | 0 | this.conversionFields = conversionFields; |
388 | 0 | } |
389 | |
|
390 | |
|
391 | |
|
392 | |
|
393 | |
public Map getFieldConversions() { |
394 | 0 | return fieldConversions; |
395 | |
} |
396 | |
|
397 | |
|
398 | |
|
399 | |
|
400 | |
public void setFieldConversions(Map fieldConversions) { |
401 | 0 | this.fieldConversions = fieldConversions; |
402 | 0 | } |
403 | |
|
404 | |
|
405 | |
|
406 | |
|
407 | |
public String getBusinessObjectClassName() { |
408 | 0 | return businessObjectClassName; |
409 | |
} |
410 | |
|
411 | |
|
412 | |
|
413 | |
|
414 | |
public void setBusinessObjectClassName(String businessObjectClassName) { |
415 | 0 | this.businessObjectClassName = businessObjectClassName; |
416 | 0 | } |
417 | |
|
418 | |
|
419 | |
|
420 | |
|
421 | |
|
422 | |
public Lookupable getLookupable() { |
423 | 0 | return lookupable; |
424 | |
} |
425 | |
|
426 | |
|
427 | |
|
428 | |
|
429 | |
|
430 | |
public void setLookupable(Lookupable lookupable) { |
431 | 0 | this.lookupable = lookupable; |
432 | 0 | } |
433 | |
|
434 | |
|
435 | |
|
436 | |
|
437 | |
|
438 | |
public boolean isHideReturnLink() { |
439 | 0 | return hideReturnLink; |
440 | |
} |
441 | |
|
442 | |
|
443 | |
|
444 | |
|
445 | |
public void setSuppressActions(boolean suppressActions) { |
446 | 0 | this.suppressActions = suppressActions; |
447 | 0 | } |
448 | |
|
449 | |
|
450 | |
|
451 | |
|
452 | |
public boolean isSuppressActions() { |
453 | 0 | return suppressActions; |
454 | |
} |
455 | |
|
456 | |
|
457 | |
|
458 | |
|
459 | |
|
460 | |
public void setHideReturnLink(boolean hideReturnLink) { |
461 | 0 | this.hideReturnLink = hideReturnLink; |
462 | 0 | } |
463 | |
|
464 | |
|
465 | |
public String getExtraButtonParams() { |
466 | 0 | return extraButtons.get(0).getExtraButtonParams(); |
467 | |
} |
468 | |
|
469 | |
|
470 | |
public void setExtraButtonParams(String extraButtonParams) { |
471 | 0 | extraButtons.get(0).setExtraButtonParams( extraButtonParams ); |
472 | 0 | } |
473 | |
|
474 | |
|
475 | |
public String getExtraButtonSource() { |
476 | 0 | return extraButtons.get(0).getExtraButtonSource(); |
477 | |
} |
478 | |
|
479 | |
|
480 | |
public void setExtraButtonSource(String extraButtonSource) { |
481 | 0 | extraButtons.get(0).setExtraButtonSource( extraButtonSource ); |
482 | 0 | } |
483 | |
|
484 | |
|
485 | |
|
486 | |
|
487 | |
|
488 | |
|
489 | |
public boolean isMultipleValues() { |
490 | 0 | return multipleValues; |
491 | |
} |
492 | |
|
493 | |
|
494 | |
|
495 | |
|
496 | |
|
497 | |
public void setMultipleValues(boolean multipleValues) { |
498 | 0 | this.multipleValues = multipleValues; |
499 | 0 | } |
500 | |
|
501 | |
public String getLookupAnchor() { |
502 | 0 | return lookupAnchor; |
503 | |
} |
504 | |
|
505 | |
public void setLookupAnchor(String lookupAnchor) { |
506 | 0 | this.lookupAnchor = lookupAnchor; |
507 | 0 | } |
508 | |
|
509 | |
|
510 | |
|
511 | |
|
512 | |
|
513 | |
public Map getFieldsForLookup() { |
514 | 0 | return fieldsForLookup; |
515 | |
} |
516 | |
|
517 | |
|
518 | |
|
519 | |
|
520 | |
|
521 | |
public void setFieldsForLookup(Map fieldsForLookup) { |
522 | 0 | this.fieldsForLookup = fieldsForLookup; |
523 | 0 | } |
524 | |
|
525 | |
|
526 | |
|
527 | |
|
528 | |
|
529 | |
public String getReadOnlyFields() { |
530 | 0 | return readOnlyFields; |
531 | |
} |
532 | |
|
533 | |
|
534 | |
|
535 | |
|
536 | |
|
537 | |
public void setReadOnlyFields(String readOnlyFields) { |
538 | 0 | this.readOnlyFields = readOnlyFields; |
539 | 0 | } |
540 | |
|
541 | |
|
542 | |
|
543 | |
|
544 | |
|
545 | |
public List getReadOnlyFieldsList() { |
546 | 0 | return readOnlyFieldsList; |
547 | |
} |
548 | |
|
549 | |
|
550 | |
|
551 | |
|
552 | |
|
553 | |
public void setReadOnlyFieldsList(List readOnlyFieldsList) { |
554 | 0 | this.readOnlyFieldsList = readOnlyFieldsList; |
555 | 0 | } |
556 | |
|
557 | |
public String getReferencesToRefresh() { |
558 | 0 | return referencesToRefresh; |
559 | |
} |
560 | |
|
561 | |
public void setReferencesToRefresh(String referencesToRefresh) { |
562 | 0 | this.referencesToRefresh = referencesToRefresh; |
563 | 0 | } |
564 | |
|
565 | |
public String getPrimaryKeyFieldLabels() { |
566 | 0 | return primaryKeyFieldLabels; |
567 | |
} |
568 | |
|
569 | |
public void setPrimaryKeyFieldLabels(String primaryKeyFieldLabels) { |
570 | 0 | this.primaryKeyFieldLabels = primaryKeyFieldLabels; |
571 | 0 | } |
572 | |
|
573 | |
public boolean isSearchUsingOnlyPrimaryKeyValues() { |
574 | 0 | return searchUsingOnlyPrimaryKeyValues; |
575 | |
} |
576 | |
|
577 | |
public void setSearchUsingOnlyPrimaryKeyValues(boolean searchUsingOnlyPrimaryKeyValues) { |
578 | 0 | this.searchUsingOnlyPrimaryKeyValues = searchUsingOnlyPrimaryKeyValues; |
579 | 0 | } |
580 | |
|
581 | |
|
582 | |
|
583 | |
|
584 | |
|
585 | |
public boolean isShowMaintenanceLinks() { |
586 | 0 | return showMaintenanceLinks; |
587 | |
} |
588 | |
|
589 | |
|
590 | |
|
591 | |
|
592 | |
|
593 | |
public void setShowMaintenanceLinks(boolean showMaintenanceLinks) { |
594 | 0 | this.showMaintenanceLinks = showMaintenanceLinks; |
595 | 0 | } |
596 | |
|
597 | |
|
598 | |
|
599 | |
|
600 | |
|
601 | |
|
602 | |
public boolean isHasReturnableRow() { |
603 | 0 | return this.hasReturnableRow; |
604 | |
} |
605 | |
|
606 | |
|
607 | |
|
608 | |
|
609 | |
|
610 | |
|
611 | |
public void setHasReturnableRow(boolean hasReturnableRow) { |
612 | 0 | this.hasReturnableRow = hasReturnableRow; |
613 | 0 | } |
614 | |
|
615 | |
|
616 | |
|
617 | |
|
618 | |
public String getLookupObjectId() { |
619 | 0 | return this.lookupObjectId; |
620 | |
} |
621 | |
|
622 | |
|
623 | |
|
624 | |
|
625 | |
public void setLookupObjectId(String lookupObjectId) { |
626 | 0 | this.lookupObjectId = lookupObjectId; |
627 | 0 | } |
628 | |
|
629 | |
|
630 | |
|
631 | |
|
632 | |
public boolean isLookupCriteriaEnabled() { |
633 | 0 | return this.lookupCriteriaEnabled; |
634 | |
} |
635 | |
|
636 | |
|
637 | |
|
638 | |
|
639 | |
public void setLookupCriteriaEnabled(boolean lookupCriteriaEnabled) { |
640 | 0 | this.lookupCriteriaEnabled = lookupCriteriaEnabled; |
641 | 0 | } |
642 | |
|
643 | |
|
644 | |
|
645 | |
|
646 | |
public boolean isSupplementalActionsEnabled() { |
647 | 0 | return this.supplementalActionsEnabled; |
648 | |
} |
649 | |
|
650 | |
|
651 | |
|
652 | |
|
653 | |
public void setSupplementalActionsEnabled(boolean supplementalActionsEnabled) { |
654 | 0 | this.supplementalActionsEnabled = supplementalActionsEnabled; |
655 | 0 | } |
656 | |
|
657 | |
|
658 | |
|
659 | |
|
660 | |
|
661 | |
public void setActionUrlsExist(boolean actionUrlsExist) { |
662 | 0 | this.actionUrlsExist = actionUrlsExist; |
663 | 0 | } |
664 | |
|
665 | |
|
666 | |
|
667 | |
|
668 | |
public boolean isActionUrlsExist() { |
669 | 0 | return actionUrlsExist; |
670 | |
} |
671 | |
|
672 | |
|
673 | |
|
674 | |
|
675 | |
public boolean isDdExtraButton() { |
676 | 0 | return this.ddExtraButton; |
677 | |
} |
678 | |
|
679 | |
|
680 | |
|
681 | |
|
682 | |
public void setDdExtraButton(boolean ddExtraButton) { |
683 | 0 | this.ddExtraButton = ddExtraButton; |
684 | 0 | } |
685 | |
|
686 | |
public boolean isHeaderBarEnabled() { |
687 | 0 | return headerBarEnabled; |
688 | |
} |
689 | |
|
690 | |
public void setHeaderBarEnabled(boolean headerBarEnabled) { |
691 | 0 | this.headerBarEnabled = headerBarEnabled; |
692 | 0 | } |
693 | |
|
694 | |
public boolean isDisableSearchButtons() { |
695 | 0 | return this.disableSearchButtons; |
696 | |
} |
697 | |
|
698 | |
public void setDisableSearchButtons(boolean disableSearchButtons) { |
699 | 0 | this.disableSearchButtons = disableSearchButtons; |
700 | 0 | } |
701 | |
|
702 | |
|
703 | |
|
704 | |
|
705 | |
|
706 | |
|
707 | |
|
708 | |
public boolean getRenderSearchButtons() { |
709 | 0 | boolean renderSearchButtons = true; |
710 | |
|
711 | 0 | if (disableSearchButtons |
712 | |
|| KNSServiceLocator.getBusinessObjectDictionaryService().disableSearchButtonsInLookup( |
713 | |
getLookupable().getBusinessObjectClass())) { |
714 | 0 | renderSearchButtons = false; |
715 | |
} |
716 | |
|
717 | 0 | return renderSearchButtons; |
718 | |
} |
719 | |
} |