/*
 * Copyright 2004-2014 ICEsoft Technologies Canada Corp.
 *
 * 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.icefaces.samples.showcase.example.ace.breadcrumbmenu;

import org.icefaces.ace.component.menuitem.MenuItem;
import org.icefaces.ace.component.tree.Tree;
import org.icefaces.ace.model.DefaultMenuModel;
import org.icefaces.ace.model.MenuModel;
import org.icefaces.ace.model.tree.NodeState;
import org.icefaces.ace.model.tree.NodeStateCreationCallback;
import org.icefaces.ace.model.tree.NodeStateMap;
import org.icefaces.samples.showcase.example.ace.tree.LocationNodeImpl;
import org.icefaces.samples.showcase.example.ace.tree.TreeDataFactory;
import org.icefaces.samples.showcase.metadata.annotation.*;
import org.icefaces.samples.showcase.metadata.context.ComponentExampleImpl;
import org.icefaces.util.JavaScriptRunner;

import javax.annotation.PostConstruct;
import javax.faces.bean.CustomScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import javax.faces.event.AjaxBehaviorEvent;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack;

@ComponentExample(
        title = "example.ace.breadcrumbmenu.title",
        description = "example.ace.breadcrumbmenu.description",
        example = "/resources/examples/ace/breadcrumbmenu/breadcrumbMenu.xhtml"
)
@ExampleResources(
        resources = {
                // xhtml
                @ExampleResource(type = ResourceType.xhtml,
                        title = "breadcrumbMenu.xhtml",
                        resource = "/resources/examples/ace/breadcrumbmenu/breadcrumbMenu.xhtml"),
                // Java Source
                @ExampleResource(type = ResourceType.java,
                        title = "BreadcrumbMenuViewScopedBean.java",
                        resource = "/WEB-INF/classes/org/icefaces/samples/showcase" +
                                "/example/ace/breadcrumbmenu/BreadcrumbMenuViewScopedBean.java")
        }
)
@Menu(
        title = "menu.ace.breadcrumbmenu.subMenu.title",
        menuLinks = {
                @MenuLink(title = "menu.ace.breadcrumbmenu.subMenu.main", isDefault = true, exampleBeanName = BreadcrumbMenuBean.BEAN_NAME)
        }
)
@ManagedBean(name = BreadcrumbMenuBean.BEAN_NAME)
@CustomScoped(value = "#{window}")
public class BreadcrumbMenuBean extends ComponentExampleImpl<BreadcrumbMenuBean> implements Serializable {
    public static final String BEAN_NAME = "breadcrumbMenuBean";

    private static final long serialVersionUID = -4267466225380580467L;


    public BreadcrumbMenuBean() {
        super(BreadcrumbMenuBean.class);
    }

    @PostConstruct
    public void initMetaData() {
        super.initMetaData();
    }


}
