001/** 002 * Copyright 2005-2018 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.krad.uif.widget; 017 018import org.kuali.rice.krad.datadictionary.parse.BeanTag; 019import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; 020 021/** 022 * The breadcrumb widget contains various settings for setting up 023 * Breadcrumb/History support on the view 024 * 025 * @author Kuali Rice Team (rice.collab@kuali.org) 026 */ 027@BeanTag(name = "breadcrumbs", parent = "Uif-Breadcrumbs") 028public class Breadcrumbs extends WidgetBase { 029 private static final long serialVersionUID = -2864287914665842251L; 030 031 private boolean displayBreadcrumbsWhenOne; 032 private boolean usePathBasedBreadcrumbs; 033 034 public Breadcrumbs() { 035 super(); 036 } 037 038 /** 039 * If false, breadcrumbs will not be displayed if only one breadcrumb is 040 * going to be shown, this improves visual clarity of the page 041 * 042 * @return the displayBreadcrumbsWhenOne 043 */ 044 @BeanTagAttribute 045 public boolean isDisplayBreadcrumbsWhenOne() { 046 return this.displayBreadcrumbsWhenOne; 047 } 048 049 /** 050 * Set displayBreadcrumbsWhenOne 051 * 052 * @param displayBreadcrumbsWhenOne the displayBreadcrumbsWhenOne to set 053 */ 054 public void setDisplayBreadcrumbsWhenOne(boolean displayBreadcrumbsWhenOne) { 055 this.displayBreadcrumbsWhenOne = displayBreadcrumbsWhenOne; 056 } 057 058 /** 059 * If set to true, the breadcrumbs on the View will always be path-based (history backed) 060 * 061 * @return true if using path based breadcrumbs, false otherwise 062 */ 063 @BeanTagAttribute 064 public boolean isUsePathBasedBreadcrumbs() { 065 return usePathBasedBreadcrumbs; 066 } 067 068 /** 069 * Set usePathBasedBreadcrumbs to true to use path-based breadcrumbs 070 * 071 * @param usePathBasedBreadcrumbs 072 */ 073 public void setUsePathBasedBreadcrumbs(boolean usePathBasedBreadcrumbs) { 074 this.usePathBasedBreadcrumbs = usePathBasedBreadcrumbs; 075 } 076}