View Javadoc

1   /**
2    * Copyright 2005-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.uif.widget;
17  
18  import org.apache.commons.lang.StringUtils;
19  import org.kuali.rice.krad.bo.DataObjectRelationship;
20  import org.kuali.rice.krad.datadictionary.parse.BeanTag;
21  import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute;
22  import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
23  import org.kuali.rice.krad.uif.UifParameters;
24  import org.kuali.rice.krad.uif.container.CollectionGroup;
25  import org.kuali.rice.krad.uif.element.Action;
26  import org.kuali.rice.krad.uif.field.InputField;
27  import org.kuali.rice.krad.uif.view.View;
28  import org.kuali.rice.krad.uif.component.BindingInfo;
29  import org.kuali.rice.krad.uif.component.Component;
30  import org.kuali.rice.krad.uif.util.ViewModelUtils;
31  import org.kuali.rice.krad.util.KRADUtils;
32  import org.springframework.context.annotation.Bean;
33  
34  import java.util.HashMap;
35  import java.util.List;
36  import java.util.Map;
37  
38  /**
39   * Widget for navigating to a lookup from a field (called a quickfinder)
40   *
41   * @author Kuali Rice Team (rice.collab@kuali.org)
42   */
43  @BeanTag(name="quickFinder")
44  public class QuickFinder extends WidgetBase {
45      private static final long serialVersionUID = 3302390972815386785L;
46  
47      // lookup configuration
48      private String baseLookupUrl;
49      private String dataObjectClassName;
50      private String viewName;
51  
52      private String referencesToRefresh;
53  
54      private Map<String, String> fieldConversions;
55      private Map<String, String> lookupParameters;
56  
57      // lookup view options
58      private String readOnlySearchFields;
59  
60      private Boolean hideReturnLink;
61      private Boolean suppressActions;
62      private Boolean autoSearch;
63      private Boolean lookupCriteriaEnabled;
64      private Boolean supplementalActionsEnabled;
65      private Boolean disableSearchButtons;
66      private Boolean headerBarEnabled;
67      private Boolean showMaintenanceLinks;
68  
69      private Boolean multipleValuesSelect;
70      private String lookupCollectionName;
71  
72      private Action quickfinderAction;
73      private LightBox lightBoxLookup;
74  
75      public QuickFinder() {
76          super();
77  
78          fieldConversions = new HashMap<String, String>();
79          lookupParameters = new HashMap<String, String>();
80      }
81  
82      /**
83       * The following initialization is performed:
84       *
85       * <ul>
86       * <li>Set defaults for binding</li>
87       * </ul>
88       *
89       * @see org.kuali.rice.krad.uif.component.ComponentBase#performInitialization(org.kuali.rice.krad.uif.view.View,
90       *      java.lang.Object)
91       */
92      @Override
93      public void performInitialization(View view, Object model) {
94          super.performInitialization(view, model);
95  
96          if (quickfinderAction != null) {
97              quickfinderAction.setActionScript("voidAction");
98          }
99      }
100 
101     /**
102      * The following finalization is performed:
103      *
104      * <ul>
105      * <li>
106      * Sets defaults on collectionLookup such as collectionName, and the class if not set
107      *
108      * <p>
109      * If the data object class was not configured for the lookup, the class configured for the collection group will
110      * be used if it has a lookup defined. If not data object class is found for the lookup it will be disabled. The
111      * collection name is also defaulted to the binding path for this collection group, so the results returned from
112      * the lookup will populate this collection. Finally field conversions will be generated based on the PK fields of
113      * the collection object class
114      * </p>
115      * </li>
116      * </ul>
117      *
118      * @see org.kuali.rice.krad.uif.widget.Widget#performFinalize(org.kuali.rice.krad.uif.view.View,
119      *      java.lang.Object, org.kuali.rice.krad.uif.component.Component)
120      */
121     @Override
122     public void performFinalize(View view, Object model, Component parent) {
123         super.performFinalize(view, model, parent);
124 
125         if (!isRender()) {
126             return;
127         }
128 
129         if (parent instanceof InputField) {
130             InputField field = (InputField) parent;
131 
132             // determine lookup class, field conversions and lookup parameters in
133             // not set
134             if (StringUtils.isBlank(dataObjectClassName)) {
135                 DataObjectRelationship relationship = getRelationshipForField(view, model, field);
136 
137                 // if no relationship found cannot have a quickfinder
138                 if (relationship == null) {
139                     setRender(false);
140                     return;
141                 }
142 
143                 dataObjectClassName = relationship.getRelatedClass().getName();
144 
145                 if ((fieldConversions == null) || fieldConversions.isEmpty()) {
146                     generateFieldConversions(field, relationship);
147                 }
148 
149                 if ((lookupParameters == null) || lookupParameters.isEmpty()) {
150                     generateLookupParameters(field, relationship);
151                 }
152             }
153 
154             // adjust paths based on associated attribute field
155             updateFieldConversions(field.getBindingInfo());
156             updateLookupParameters(field.getBindingInfo());
157         } else if (parent instanceof CollectionGroup) {
158             CollectionGroup collectionGroup = (CollectionGroup) parent;
159 
160             // check to see if data object class is configured for lookup, if so we will assume it should be enabled
161             // if not and the class configured for the collection group is lookupable, use that
162             if (StringUtils.isBlank(getDataObjectClassName())) {
163                 Class<?> collectionObjectClass = collectionGroup.getCollectionObjectClass();
164                 boolean isCollectionClassLookupable = KRADServiceLocatorWeb.getViewDictionaryService().isLookupable(
165                         collectionObjectClass);
166                 if (isCollectionClassLookupable) {
167                     setDataObjectClassName(collectionObjectClass.getName());
168 
169                     if ((fieldConversions == null) || fieldConversions.isEmpty()) {
170                         // use PK fields for collection class
171                         List<String> collectionObjectPKFields =
172                                 KRADServiceLocatorWeb.getDataObjectMetaDataService().listPrimaryKeyFieldNames(
173                                         collectionObjectClass);
174 
175                         for (String pkField : collectionObjectPKFields) {
176                             fieldConversions.put(pkField, pkField);
177                         }
178                     }
179                 } else {
180                     // no available data object class to lookup so need to disable quickfinder
181                     setRender(false);
182                 }
183             }
184 
185             // set the lookup return collection name to this collection path
186             if (isRender() && StringUtils.isBlank(getLookupCollectionName())) {
187                 setLookupCollectionName(collectionGroup.getBindingInfo().getBindingPath());
188             }
189         }
190 
191         quickfinderAction.addActionParameter(UifParameters.BASE_LOOKUP_URL, baseLookupUrl);
192         quickfinderAction.addActionParameter(UifParameters.DATA_OBJECT_CLASS_NAME, dataObjectClassName);
193 
194         if (!fieldConversions.isEmpty()) {
195             quickfinderAction.addActionParameter(UifParameters.CONVERSION_FIELDS, KRADUtils.buildMapParameterString(
196                     fieldConversions));
197         }
198 
199         if (!lookupParameters.isEmpty()) {
200             quickfinderAction.addActionParameter(UifParameters.LOOKUP_PARAMETERS, KRADUtils.buildMapParameterString(
201                     lookupParameters));
202         }
203 
204         addActionParameterIfNotNull(UifParameters.VIEW_NAME, viewName);
205         addActionParameterIfNotNull(UifParameters.READ_ONLY_FIELDS, readOnlySearchFields);
206         addActionParameterIfNotNull(UifParameters.HIDE_RETURN_LINK, hideReturnLink);
207         addActionParameterIfNotNull(UifParameters.SUPRESS_ACTIONS, suppressActions);
208         addActionParameterIfNotNull(UifParameters.REFERENCES_TO_REFRESH, referencesToRefresh);
209         addActionParameterIfNotNull(UifParameters.AUTO_SEARCH, autoSearch);
210         addActionParameterIfNotNull(UifParameters.LOOKUP_CRITERIA_ENABLED, lookupCriteriaEnabled);
211         addActionParameterIfNotNull(UifParameters.SUPPLEMENTAL_ACTIONS_ENABLED, supplementalActionsEnabled);
212         addActionParameterIfNotNull(UifParameters.DISABLE_SEARCH_BUTTONS, disableSearchButtons);
213         addActionParameterIfNotNull(UifParameters.HEADER_BAR_ENABLED, headerBarEnabled);
214         addActionParameterIfNotNull(UifParameters.SHOW_MAINTENANCE_LINKS, showMaintenanceLinks);
215         addActionParameterIfNotNull(UifParameters.MULTIPLE_VALUES_SELECT, multipleValuesSelect);
216         addActionParameterIfNotNull(UifParameters.LOOKUP_COLLECTION_NAME, lookupCollectionName);
217 
218         // TODO:
219         // org.kuali.rice.kns.util.FieldUtils.populateQuickfinderDefaultsForLookup(Class,
220         // String, Field)
221     }
222 
223     protected void addActionParameterIfNotNull(String parameterName, Object parameterValue) {
224         if ((parameterValue != null) && StringUtils.isNotBlank(parameterValue.toString())) {
225             quickfinderAction.addActionParameter(parameterName, parameterValue.toString());
226         }
227     }
228 
229     protected DataObjectRelationship getRelationshipForField(View view, Object model, InputField field) {
230         String propertyName = field.getBindingInfo().getBindingName();
231 
232         // get object instance and class for parent
233         Object parentObject = ViewModelUtils.getParentObjectForMetadata(view, model, field);
234         Class<?> parentObjectClass = null;
235         if (parentObject != null) {
236             parentObjectClass = parentObject.getClass();
237         }
238 
239         // get relationship from metadata service
240         return KRADServiceLocatorWeb.getDataObjectMetaDataService().getDataObjectRelationship(parentObject,
241                 parentObjectClass, propertyName, "", true, true, false);
242     }
243 
244     protected void generateFieldConversions(InputField field, DataObjectRelationship relationship) {
245         fieldConversions = new HashMap<String, String>();
246         for (Map.Entry<String, String> entry : relationship.getParentToChildReferences().entrySet()) {
247             String fromField = entry.getValue();
248             String toField = entry.getKey();
249 
250             // TODO: displayedFieldnames in
251             // org.kuali.rice.kns.lookup.LookupUtils.generateFieldConversions(BusinessObject,
252             // String, DataObjectRelationship, String, List, String)
253 
254             fieldConversions.put(fromField, toField);
255         }
256     }
257 
258     protected void generateLookupParameters(InputField field, DataObjectRelationship relationship) {
259         lookupParameters = new HashMap<String, String>();
260         for (Map.Entry<String, String> entry : relationship.getParentToChildReferences().entrySet()) {
261             String fromField = entry.getKey();
262             String toField = entry.getValue();
263 
264             // TODO: displayedFieldnames and displayedQFFieldNames in
265             // generateLookupParameters(BusinessObject,
266             // String, DataObjectRelationship, String, List, String)
267 
268             if (relationship.getUserVisibleIdentifierKey() == null || relationship.getUserVisibleIdentifierKey().equals(
269                     fromField)) {
270                 lookupParameters.put(fromField, toField);
271             }
272         }
273     }
274 
275     /**
276      * Adjusts the path on the field conversion to property to match the binding
277      * path prefix of the given <code>BindingInfo</code>
278      *
279      * @param bindingInfo - binding info instance to copy binding path prefix from
280      */
281     public void updateFieldConversions(BindingInfo bindingInfo) {
282         Map<String, String> adjustedFieldConversions = new HashMap<String, String>();
283         for (String fromField : fieldConversions.keySet()) {
284             String toField = fieldConversions.get(fromField);
285             String adjustedToFieldPath = bindingInfo.getPropertyAdjustedBindingPath(toField);
286 
287             adjustedFieldConversions.put(fromField, adjustedToFieldPath);
288         }
289 
290         this.fieldConversions = adjustedFieldConversions;
291     }
292 
293     /**
294      * Adjusts the path on the lookup parameter from property to match the binding
295      * path prefix of the given <code>BindingInfo</code>
296      *
297      * @param bindingInfo - binding info instance to copy binding path prefix from
298      */
299     public void updateLookupParameters(BindingInfo bindingInfo) {
300         Map<String, String> adjustedLookupParameters = new HashMap<String, String>();
301         for (String fromField : lookupParameters.keySet()) {
302             String toField = lookupParameters.get(fromField);
303             String adjustedFromFieldPath = bindingInfo.getPropertyAdjustedBindingPath(fromField);
304 
305             adjustedLookupParameters.put(adjustedFromFieldPath, toField);
306         }
307 
308         this.lookupParameters = adjustedLookupParameters;
309     }
310 
311     /**
312      * @see org.kuali.rice.krad.uif.component.ComponentBase#getComponentsForLifecycle()
313      */
314     @Override
315     public List<Component> getComponentsForLifecycle() {
316         List<Component> components = super.getComponentsForLifecycle();
317 
318         components.add(quickfinderAction);
319         components.add(lightBoxLookup);
320 
321         return components;
322     }
323 
324     /**
325      * Returns the URL for the lookup for which parameters will be added
326      *
327      * <p>
328      * The base URL includes the domain, context, and controller mapping for the lookup invocation. Parameters are
329      * then added based on configuration to complete the URL. This is generally defaulted to the application URL and
330      * internal KRAD servlet mapping, but can be changed to invoke another application such as the Rice standalone
331      * server
332      * </p>
333      *
334      * @return String lookup base URL
335      */
336     @BeanTagAttribute(name="baseLookupUrl")
337     public String getBaseLookupUrl() {
338         return this.baseLookupUrl;
339     }
340 
341     /**
342      * Setter for the lookup base url (domain, context, and controller)
343      *
344      * @param baseLookupUrl
345      */
346     public void setBaseLookupUrl(String baseLookupUrl) {
347         this.baseLookupUrl = baseLookupUrl;
348     }
349 
350     /**
351      * Full class name the lookup should be provided for
352      *
353      * <p>
354      * This is passed on to the lookup request for the data object the lookup should be rendered for. This is then
355      * used by the lookup framework to select the lookup view (if more than one lookup view exists for the same
356      * data object class name, the {@link #getViewName()} property should be specified to select the view to render).
357      * </p>
358      *
359      * @return String lookup class name
360      */
361     @BeanTagAttribute(name="dataOjbectClassName")
362     public String getDataObjectClassName() {
363         return this.dataObjectClassName;
364     }
365 
366     /**
367      * Setter for the class name that lookup should be provided for
368      *
369      * @param dataObjectClassName
370      */
371     public void setDataObjectClassName(String dataObjectClassName) {
372         this.dataObjectClassName = dataObjectClassName;
373     }
374 
375     /**
376      * When multiple target lookup views exists for the same data object class, the view name can be set to
377      * determine which one to use
378      *
379      * <p>
380      * When creating multiple lookup views for the same data object class, the view name can be specified for the
381      * different versions (for example 'simple' and 'advanced'). When multiple lookup views exist the view name must
382      * be sent with the data object class for the request. Note the view id can be alternatively used to uniquely
383      * identify the lookup view
384      * </p>
385      */
386     @BeanTagAttribute(name="viewName")
387     public String getViewName() {
388         return this.viewName;
389     }
390 
391     /**
392      * Setter for the view name configured on the lookup view that should be invoked by the quickfinder widget
393      *
394      * @param viewName
395      */
396     public void setViewName(String viewName) {
397         this.viewName = viewName;
398     }
399 
400     /**
401      * List of property names on the model that should be refreshed when the lookup returns
402      *
403      * <p>
404      * Note this is only relevant when the return by script option is not enabled (meaning the server will be invoked
405      * on the lookup return call)
406      * </p>
407      *
408      * <p>
409      * When a lookup return call is made (to return a result value) the controller refresh method will be invoked. If
410      * refresh properties are configured, a call to refresh those references from the database will be made. This is
411      * useful if the lookup returns a foreign key field and the related record is needed.
412      * </p>
413      *
414      * @return String list of property names to refresh
415      *         TODO: refactor this to be a List type
416      */
417     @BeanTagAttribute(name="referencesToRefresh")
418     public String getReferencesToRefresh() {
419         return this.referencesToRefresh;
420     }
421 
422     /**
423      * Setter for the list of property names that should be refreshed when the lookup returns
424      *
425      * @param referencesToRefresh
426      */
427     public void setReferencesToRefresh(String referencesToRefresh) {
428         this.referencesToRefresh = referencesToRefresh;
429     }
430 
431     /**
432      * Map that determines what properties from a result lookup row (if selected) will be returned to properties on
433      * the calling view
434      *
435      * <p>
436      * The purpose of using the lookup is to search for a particular value and return that value to the form being
437      * completed. In order for the lookup framework to return the field back to us, we must specify the name of the
438      * field on the data object class whose value we need, and the name of the field on the calling view. Furthermore,
439      * we can choose to have the lookup return additional fields that populate other form fields or informational
440      * properties (see ‘Field Queries and Informational Properties’). These pairs of fields are known as
441      * ‘field conversions’.
442      * </p>
443      *
444      * <p>
445      * The fieldConversions property is a Map. Each entry represents a field that will be returned back from the
446      * lookup, with the entry key being the field name on the data object class, and the entry value being the field
447      * name on the calling view. It is helpful to think of this as a from-to mapping. Pulling from the data object
448      * field (map key) to the calling view field (map value).
449      * </p>
450      *
451      * @return Map<String, String> mapping of lookup data object property names to view property names
452      */
453     @BeanTagAttribute(name="fieldConversions",type= BeanTagAttribute.AttributeType.MAPVALUE)
454     public Map<String, String> getFieldConversions() {
455         return this.fieldConversions;
456     }
457 
458     /**
459      * Setter for the map that determines what properties on a lookup result row are returned and how they map to
460      * properties on the calling view
461      *
462      * @param fieldConversions
463      */
464     public void setFieldConversions(Map<String, String> fieldConversions) {
465         this.fieldConversions = fieldConversions;
466     }
467 
468     /**
469      * Map that determines what properties from a calling view will be sent to properties on that are rendered
470      * for the lookup view's search fields (they can be hidden)
471      *
472      * <p>
473      * When invoking a lookup view, we can pre-populate search fields on the lookup view with data from the view
474      * that called the lookup. The user can then perform the search with these values, or (if edited is allowed or
475      * the fields are not hidden) change the passed in values. When the lookup is invoked, the values for the
476      * properties configured within the lookup parameters Map will be pulled and passed along as values for the
477      * lookup view properties
478      * </p>
479      *
480      * @return Map<String, String> mapping of calling view properties to lookup view search fields
481      */
482     @BeanTagAttribute(name="lookupParameters",type= BeanTagAttribute.AttributeType.MAPVALUE)
483     public Map<String, String> getLookupParameters() {
484         return this.lookupParameters;
485     }
486 
487     /**
488      * Setter for the map that determines what property values on the calling view will be sent to properties on the
489      * lookup views search fields
490      *
491      * @param lookupParameters
492      */
493     public void setLookupParameters(Map<String, String> lookupParameters) {
494         this.lookupParameters = lookupParameters;
495     }
496 
497     /**
498      * Comma delimited String of property names on the lookup view that should be read only
499      *
500      * <p>
501      * When requesting a lookup view, property names for fields that are rendered as search criteria can be marked
502      * as read-only. This is usually done when a lookup parameter for that property is sent in and the user should
503      * not be allowed to change the value
504      * </p>
505      *
506      * @return String property names (delimited by a comma) whose criteria fields should be read-only on the
507      *         lookup view
508      */
509     @BeanTagAttribute(name="readOnlySearchFields")
510     public String getReadOnlySearchFields() {
511         return this.readOnlySearchFields;
512     }
513 
514     /**
515      * Setter for property names for criteria fields on the lookup view that should be read-only (multiple property
516      * names are specified using a comma delimiter)
517      *
518      * @param readOnlySearchFields
519      */
520     public void setReadOnlySearchFields(String readOnlySearchFields) {
521         this.readOnlySearchFields = readOnlySearchFields;
522     }
523 
524     /**
525      * Indicates whether the return links for lookup results should be rendered
526      *
527      * <p>
528      * A lookup view can be invoked to allow the user to select a value (or set of values) to return back to the
529      * calling view. For single value lookups this is done with a return link that is rendered for each row. This
530      * return link can be disabled by setting this property to true
531      * </p>
532      *
533      * @return boolean true if the return link should not be shown, false if it should be
534      */
535     @BeanTagAttribute(name="hideReturnLink")
536     public Boolean getHideReturnLink() {
537         return this.hideReturnLink;
538     }
539 
540     /**
541      * Setter for the hide return link indicator
542      *
543      * @param hideReturnLink
544      */
545     public void setHideReturnLink(Boolean hideReturnLink) {
546         this.hideReturnLink = hideReturnLink;
547     }
548 
549     /**
550      * Indicates whether the maintenance actions (or others) are rendered on the invoked lookup view
551      *
552      * <p>
553      * By default a lookup view will add an actions column for the result table that display maintenance links (in
554      * addition to a new link at the top of the page) if a maintenance action is available. Custom links can also be
555      * added to the action column as necessary. This flag can be set to true to suppress the rendering of the actions
556      * for the lookup call.
557      * </p>
558      *
559      * <p>
560      * An example of when this might be useful is when invoking a lookup to return a value to a value. Generally in
561      * these cases you don't want to the user going off to another view (such as the maintenance view)
562      * </p>
563      *
564      * @return boolean true if actions should be rendered, false if not
565      */
566     @BeanTagAttribute(name="supressActions")
567     public Boolean getSuppressActions() {
568         return suppressActions;
569     }
570 
571     /**
572      * Setter for the suppress actions indicator
573      *
574      * @param suppressActions
575      */
576     public void setSuppressActions(Boolean suppressActions) {
577         this.suppressActions = suppressActions;
578     }
579 
580     /**
581      * Indicates whether the search should be executed when first rendering the lookup view
582      *
583      * <p>
584      * By default the lookup view is rendered, the user enters search values and executes the results. This flag can
585      * be set to true to indicate the search should be performed before showing the screen to the user. This is
586      * generally used when search criteria is being passed in as well
587      * </p>
588      *
589      * @return boolean true if the search should be performed initially, false if not
590      */
591     @BeanTagAttribute(name="autoSearch")
592     public Boolean getAutoSearch() {
593         return this.autoSearch;
594     }
595 
596     /**
597      * Setter for the auto search indicator
598      *
599      * @param autoSearch
600      */
601     public void setAutoSearch(Boolean autoSearch) {
602         this.autoSearch = autoSearch;
603     }
604 
605     /**
606      * Indicates whether the lookup criteria (search group) should be enabled on the invoked lookup view
607      *
608      * <p>
609      * Setting the this to false will not display the lookup criteria but only the results. Therefore this is only
610      * useful when setting {@link #getAutoSearch()} to true and passing in criteria
611      * </p>
612      *
613      * @return true if lookup criteria should be displayed, false if not
614      */
615     @BeanTagAttribute(name="lookupCriteriaEnabled")
616     public Boolean getLookupCriteriaEnabled() {
617         return this.lookupCriteriaEnabled;
618     }
619 
620     /**
621      * Setter for enabling the lookup criteria group
622      *
623      * @param lookupCriteriaEnabled
624      */
625     public void setLookupCriteriaEnabled(Boolean lookupCriteriaEnabled) {
626         this.lookupCriteriaEnabled = lookupCriteriaEnabled;
627     }
628 
629     /**
630      * TODO: not implemented currently
631      *
632      * @return
633      */
634     @BeanTagAttribute(name="supplementalActionsEnabled")
635     public Boolean getSupplementalActionsEnabled() {
636         return this.supplementalActionsEnabled;
637     }
638 
639     public void setSupplementalActionsEnabled(Boolean supplementalActionsEnabled) {
640         this.supplementalActionsEnabled = supplementalActionsEnabled;
641     }
642 
643     /**
644      * TODO: not implemented currently
645      *
646      * @return
647      */
648     @BeanTagAttribute(name="disabledSearchButtons")
649     public Boolean getDisableSearchButtons() {
650         return this.disableSearchButtons;
651     }
652 
653     public void setDisableSearchButtons(Boolean disableSearchButtons) {
654         this.disableSearchButtons = disableSearchButtons;
655     }
656 
657     /**
658      * TODO: not implemented currently
659      *
660      * @return
661      */
662     @BeanTagAttribute(name="headerBarEnabled")
663     public Boolean getHeaderBarEnabled() {
664         return this.headerBarEnabled;
665     }
666 
667     public void setHeaderBarEnabled(Boolean headerBarEnabled) {
668         this.headerBarEnabled = headerBarEnabled;
669     }
670 
671     /**
672      * Indicates whether the maintenance action links should be rendered for the invoked lookup view
673      *
674      * <p>
675      * If a maintenance view exists for the data object associated with the lookup view, the framework will add
676      * links to initiate a new maintenance document. This flag can be used to disable the rendering of these links
677      * </p>
678      *
679      * <p>
680      * Note this serves similar purpose to {@link #getSuppressActions()} but the intent is to only remove the
681      * maintenance links in this situation, not the complete actions column TODO: this is not in place!
682      * </p>
683      *
684      * @return boolean true if maintenance links should be shown on the lookup view, false if not
685      */
686     @BeanTagAttribute(name="showMaintenanceLinks")
687     public Boolean getShowMaintenanceLinks() {
688         return this.showMaintenanceLinks;
689     }
690 
691     /**
692      * Setter for the show maintenance links indicator
693      *
694      * @param showMaintenanceLinks
695      */
696     public void setShowMaintenanceLinks(Boolean showMaintenanceLinks) {
697         this.showMaintenanceLinks = showMaintenanceLinks;
698     }
699 
700     /**
701      * Action component that is used to rendered for the field for invoking the quickfinder action (bringin up the
702      * lookup)
703      *
704      * <p>
705      * Through the action configuration the image (or link, button) rendered for the quickfinder can be modified. In
706      * addition to other action component settings
707      * </p>
708      *
709      * @return Action instance rendered for quickfinder
710      */
711     @BeanTagAttribute(name="quickfinderAction",type= BeanTagAttribute.AttributeType.SINGLEBEAN)
712     public Action getQuickfinderAction() {
713         return this.quickfinderAction;
714     }
715 
716     /**
717      * Setter for the action field component to render for the quickfinder
718      *
719      * @param quickfinderAction
720      */
721     public void setQuickfinderAction(Action quickfinderAction) {
722         this.quickfinderAction = quickfinderAction;
723     }
724 
725     /**
726      * Setter for the light box lookup widget
727      *
728      * @param lightBoxLookup <code>LightBoxLookup</code> widget to set
729      */
730     public void setLightBoxLookup(LightBox lightBoxLookup) {
731         this.lightBoxLookup = lightBoxLookup;
732     }
733 
734     /**
735      * LightBoxLookup widget for the field
736      *
737      * <p>
738      * The light box lookup widget will change the lookup behaviour to open the
739      * lookup in a light box.
740      * </p>
741      *
742      * @return the <code>DirectInquiry</code> field DirectInquiry
743      */
744     @BeanTagAttribute(name="lightBoxLookup",type= BeanTagAttribute.AttributeType.SINGLEBEAN)
745     public LightBox getLightBoxLookup() {
746         return lightBoxLookup;
747     }
748 
749     /**
750      * Indicates whether a multi-values lookup should be requested
751      *
752      * @return boolean true if multi-value lookup should be requested, false for normal lookup
753      */
754     @BeanTagAttribute(name="MultipleValuesSelect")
755     public Boolean getMultipleValuesSelect() {
756         return multipleValuesSelect;
757     }
758 
759     /**
760      * Setter for the multi-values lookup indicator
761      *
762      * @param multipleValuesSelect
763      */
764     public void setMultipleValuesSelect(Boolean multipleValuesSelect) {
765         this.multipleValuesSelect = multipleValuesSelect;
766     }
767 
768     /**
769      * For the case of multi-value lookup, indicates the collection that should be populated with
770      * the return results
771      *
772      * <p>
773      * Note when the quickfinder is associated with a <code>CollectionGroup</code>, this property is
774      * set automatically from the collection name associated with the group
775      * </p>
776      *
777      * @return String collection name (must be full binding path)
778      */
779     @BeanTagAttribute(name="lookupCollectionName")
780     public String getLookupCollectionName() {
781         return lookupCollectionName;
782     }
783 
784     /**
785      * Setter for the name of the collection that should be populated with lookup results
786      *
787      * @param lookupCollectionName
788      */
789     public void setLookupCollectionName(String lookupCollectionName) {
790         this.lookupCollectionName = lookupCollectionName;
791     }
792 }