Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package org.cdlflex.ui.markup.html.nav;
 
 import java.util.List;
 
Wraps a DropDownButton to be used within the Navbar.
 
 public abstract class NavbarDropDown extends AbstractNavbarComponent<DropDownButton> {
 
     private static final long serialVersionUID = 1L;
 
     private IModel<?> displayModel;
     private IModel<IconTypeiconType;
 
     public NavbarDropDown(IModel<?> displayModel) {
         this(displayModelnull);
     }
 
     protected NavbarDropDown(IModel<?> displayModelIModel<IconTypeiconType) {
         super();
         this. = displayModel;
         this. = iconType;
     }
 
     public NavbarDropDown(Position positionIModel<?> displayModel) {
         this(positiondisplayModelnull);
     }
 
     protected NavbarDropDown(Position positionIModel<?> displayModelIModel<IconTypeiconType) {
         super(position);
         this. = displayModel;
         this. = iconType;
     }
 
     @Override
     public DropDownButton create(String id) {
         return new DropDownButton(id) {
             private static final long serialVersionUID = 1L;
 
             @Override
             protected List<AbstractLinknewSubMenuButtons(String buttonMarkupId) {
                 return NavbarDropDown.this.newSubMenuButtons(buttonMarkupId);
             }
 
         }.setType(.);
     }
 
     @Override
     public void onAfterPopulateItem(ListItem<INavbarComponent<? extends Component>> item) {
         item.add(new CssClassNameAppender("dropdown"));
     }
 
     public IModel<IconTypegetIconType() {
         return ;
     }
 
     public NavbarDropDown setIconType(IModel<IconTypeiconType) {
         this. = iconType;
         return this;
     }
 
     public NavbarDropDown setIconType(IconType iconType) {
         if (this. == null) {
             setIconType(Model.of(iconType));
         } else {
             this..setObject(iconType);
         }
         return this;
     }

    
Propagated call from org.cdlflex.ui.markup.html.button.DropDownButton.newSubMenuButtons(java.lang.String).

Parameters:
id the markup id used for creating links
Returns:
a list of links to be rendered in the dropdown
 
    protected abstract List<AbstractLinknewSubMenuButtons(String id);
New to GrepCode? Check out our FAQ X