View Javadoc
1   /**
2    * Copyright 2005-2014 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.container;
17  
18  import java.util.List;
19  
20  import org.kuali.rice.krad.uif.element.BreadcrumbItem;
21  import org.kuali.rice.krad.uif.element.BreadcrumbOptions;
22  import org.kuali.rice.krad.uif.element.PageBreadcrumbOptions;
23  
24  /**
25   * Interface for top-level page components, to be used as items in a multi-page view. 
26   * 
27   * @author Kuali Rice Team (rice.collab@kuali.org)
28   */
29  public interface PageGroup extends Group {
30  
31      /**
32       * When this is true, the first field of the kualiForm will be focused by
33       * default, unless the parameter focusId is set on the form (by an
34       * actionField), then that field will be focused instead. When this setting
35       * if false, no field will be focused.
36       *
37       * @return the autoFocus
38       */
39      boolean isAutoFocus();
40  
41      /**
42       * @param autoFocus the autoFocus to set
43       */
44      void setAutoFocus(boolean autoFocus);
45  
46      /**
47       * The breadcrumbOptions specific to this page.
48       *
49       * <p>
50       * Important note: breadcrumbOptions for preViewBreadcrumbs, prePageBreadcrumbs, and
51       * breadcrumbOverrides are inherited from the View if not explicitly set from the PageGroup level's
52       * breadcrumbOptions
53       * (if they contain a value at the view level and the property is null at the page level - default behavior).
54       * Explicitly providing an empty list or setting these properties at the PageGroup level will
55       * override this inheritance.
56       * </p>
57       *
58       * @return the {@link BreadcrumbOptions}
59       */
60      PageBreadcrumbOptions getBreadcrumbOptions();
61  
62      /**
63       * Set the breadcrumbOptions
64       *
65       * @param breadcrumbOptions
66       */
67      void setBreadcrumbOptions(PageBreadcrumbOptions breadcrumbOptions);
68  
69      /**
70       * Gets the breadcrumb items indicating a homeward path.
71       *
72       * @return breadcrumb items
73       */
74      List<BreadcrumbItem> getHomewardPathBreadcrumbs();
75  
76      /**
77       * Gets the breadcrumb items leading to the current view.
78       *
79       * @return breadcrumb items
80       */
81      List<BreadcrumbItem> getPreViewBreadcrumbs();
82  
83      /**
84       * Gets the breadcrumb items leading to the current page.
85       *
86       * @return breadcrumb items
87       */
88      List<BreadcrumbItem> getPrePageBreadcrumbs();
89  
90      /**
91       * Gets the breadcrumb items overrides.
92       *
93       * @return breadcrumb items
94       */
95      List<BreadcrumbItem> getBreadcrumbOverrides();
96  
97      /**
98       * The breadcrumbItem for this page.  This is the item that (generally) appears last in the breadcrumb list.
99       *
100      * <p>
101      * If a label is not explicitly defined, the label is retrieved from the headerText of the PageGroup's header.
102      * If this is also not defined, the breadcrumbItem is NOT rendered.  The url properties do not need to be provided
103      * for this breadcrumbItem because it is automatically determined based on the this PageGroup's pageId, viewId,
104      * and controllerMapping retrieved from the initial controller request.
105      * </p>
106      *
107      * @return the breadcrumbItem for this page
108      */
109     BreadcrumbItem getBreadcrumbItem();
110 
111     /**
112      * Set the breadcrumbItem for this PageGroup
113      *
114      * @param breadcrumbItem
115      */
116     void setBreadcrumbItem(BreadcrumbItem breadcrumbItem);
117 
118     /**
119      * When true, this page's footer will become sticky (fixed) at the bottom of the window
120      *
121      * @return true if the page footer is sticky, false otherwise
122      */
123     boolean isStickyFooter();
124 
125     /**
126      * Set to true to make this page's footer sticky
127      *
128      * @param stickyFooter
129      */
130     void setStickyFooter(boolean stickyFooter);
131 
132     /**
133      * Specifies the URL the view's form should post to
134      *
135      * <p>
136      * Any valid form post URL (full or relative) can be specified. If left
137      * empty, the form will be posted to the same URL of the preceding request
138      * URL.
139      * </p>
140      *
141      * @return post URL
142      */
143     String getFormPostUrl();
144 
145     /**
146      * Setter for the form post URL
147      *
148      * @param formPostUrl
149      */
150     void setFormPostUrl(String formPostUrl);
151 
152 }