View Javadoc

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