1 /** 2 * Copyright 2005-2015 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.kuali.rice.krad.datadictionary.parse.BeanTag; 19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; 20 21 /** 22 * The breadcrumb widget contains various settings for setting up 23 * Breadcrumb/History support on the view 24 * 25 * @author Kuali Rice Team (rice.collab@kuali.org) 26 */ 27 @BeanTag(name = "breadcrumbs", parent = "Uif-Breadcrumbs") 28 public class Breadcrumbs extends WidgetBase { 29 private static final long serialVersionUID = -2864287914665842251L; 30 31 private boolean displayBreadcrumbsWhenOne; 32 private boolean usePathBasedBreadcrumbs; 33 34 public Breadcrumbs() { 35 super(); 36 } 37 38 /** 39 * If false, breadcrumbs will not be displayed if only one breadcrumb is 40 * going to be shown, this improves visual clarity of the page 41 * 42 * @return the displayBreadcrumbsWhenOne 43 */ 44 @BeanTagAttribute 45 public boolean isDisplayBreadcrumbsWhenOne() { 46 return this.displayBreadcrumbsWhenOne; 47 } 48 49 /** 50 * Set displayBreadcrumbsWhenOne 51 * 52 * @param displayBreadcrumbsWhenOne the displayBreadcrumbsWhenOne to set 53 */ 54 public void setDisplayBreadcrumbsWhenOne(boolean displayBreadcrumbsWhenOne) { 55 this.displayBreadcrumbsWhenOne = displayBreadcrumbsWhenOne; 56 } 57 58 /** 59 * If set to true, the breadcrumbs on the View will always be path-based (history backed) 60 * 61 * @return true if using path based breadcrumbs, false otherwise 62 */ 63 @BeanTagAttribute 64 public boolean isUsePathBasedBreadcrumbs() { 65 return usePathBasedBreadcrumbs; 66 } 67 68 /** 69 * Set usePathBasedBreadcrumbs to true to use path-based breadcrumbs 70 * 71 * @param usePathBasedBreadcrumbs 72 */ 73 public void setUsePathBasedBreadcrumbs(boolean usePathBasedBreadcrumbs) { 74 this.usePathBasedBreadcrumbs = usePathBasedBreadcrumbs; 75 } 76 }