All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.myfaces.trinidad.component.UIXNavigationLevel Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
// WARNING: This file was automatically generated. Do not edit it directly,
//          or you will lose your changes.

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.apache.myfaces.trinidad.component;

import javax.faces.component.NamingContainer;
import javax.faces.component.UIComponent;
import javax.faces.component.visit.VisitCallback;
import javax.faces.component.visit.VisitContext;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
import org.apache.myfaces.trinidad.bean.FacesBean;
import org.apache.myfaces.trinidad.bean.PropertyKey;
import org.apache.myfaces.trinidad.util.ComponentUtils;

/**
 *
 * The navigationLevel component creates a series of navigation items representing one level in a navigation hierarchy.
 *
 * 

Events:

* * * * * * * * * * * *
TypePhasesDescription
org.apache.myfaces.trinidad.event.AttributeChangeEventInvoke
Application
Apply
Request
Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.
*/ public class UIXNavigationLevel extends UIXNavigationHierarchy implements NamingContainer { static public final FacesBean.Type TYPE = new FacesBean.Type( UIXNavigationHierarchy.TYPE); static public final PropertyKey VALUE_KEY = TYPE.registerKey("value"); static public final PropertyKey LEVEL_KEY = TYPE.registerKey("level", Integer.class, Integer.valueOf(0)); static public final PropertyKey VAR_STATUS_KEY = TYPE.registerKey("varStatus", String.class, PropertyKey.CAP_NOT_BOUND); static public final String NODE_STAMP_FACET = "nodeStamp"; static public final String COMPONENT_FAMILY = "org.apache.myfaces.trinidad.NavigationLevel"; static public final String COMPONENT_TYPE = "org.apache.myfaces.trinidad.NavigationLevel"; /** * Construct an instance of the UIXNavigationLevel. */ public UIXNavigationLevel() { super("org.apache.myfaces.trinidad.NavigationLevel"); } @Override protected void processFacetsAndChildren( FacesContext context, PhaseId phaseId) { Object oldPath = getRowKey(); try { HierarchyUtils.__setStartDepthPath(this, getLevel()); // process stamp for one level HierarchyUtils.__processLevel(context, phaseId, this); } finally { setRowKey(oldPath); } // process the children TableUtils.__processChildren(context, this, phaseId); } @Override protected boolean visitChildren( VisitContext visitContext, VisitCallback callback) { if (ComponentUtils.isSkipIterationVisit(visitContext)) { return visitChildrenWithoutIterating(visitContext, callback); } else { return _visitChildrenIterating(visitContext, callback); } } private boolean _visitChildrenIterating( VisitContext visitContext, VisitCallback callback) { boolean done = visitData(visitContext, callback); if (!done) { // process the children int childCount = getChildCount(); if (childCount > 0) { for (UIComponent child : getChildren()) { done = UIXComponent.visitTree(visitContext, child, callback); if (done) break; } } } return done; } @Override protected boolean visitData( VisitContext visitContext, VisitCallback callback) { Object oldKey = getRowKey(); boolean done; try { HierarchyUtils.__setStartDepthPath(this, getLevel()); done = visitLevel(visitContext, callback, getStamps()); } finally { setRowKey(oldKey); } return done; } /** * the component to use to stamp each element in the * navigation. A CommandNavigationItem is expected. */ final public UIComponent getNodeStamp() { return getFacet(NODE_STAMP_FACET); } /** * the component to use to stamp each element in the * navigation. A CommandNavigationItem is expected. */ @SuppressWarnings("unchecked") final public void setNodeStamp(UIComponent nodeStampFacet) { getFacets().put(NODE_STAMP_FACET, nodeStampFacet); } /** * Gets the hierarchy of navigation data - must be of type * org.apache.myfaces.trinidad.model.MenuModel * * @return the new value value */ final public Object getValue() { return getProperty(VALUE_KEY); } /** * Sets the hierarchy of navigation data - must be of type * org.apache.myfaces.trinidad.model.MenuModel * * @param value the new value value */ final public void setValue(Object value) { setProperty(VALUE_KEY, (value)); } /** * Gets the level, based on a 0 based index, in the menuModel to render based on the focusPath of the menuModel. * * @return the new level value */ final public int getLevel() { return ComponentUtils.resolveInteger(getProperty(LEVEL_KEY), 0); } /** * Sets the level, based on a 0 based index, in the menuModel to render based on the focusPath of the menuModel. * * @param level the new level value */ final public void setLevel(int level) { setProperty(LEVEL_KEY, Integer.valueOf(level)); } /** * Gets * Name of the EL variable used to reference the varStatus information. * Once this component has completed rendering, this variable is * removed (or reverted back to its previous value). * The VarStatus provides contextual information about the state of the * component to EL expressions. For components that iterate, varStatus * also provides loop counter information. Please see the this * component's documentation for the specific properties on the varStatus. * The common properties on varStatus include:
  • "model" - returns the CollectionModel for this component
  • "index" - returns the zero based row index
* * @return the new varStatus value */ final public String getVarStatus() { return ComponentUtils.resolveString(getProperty(VAR_STATUS_KEY)); } /** * Sets * Name of the EL variable used to reference the varStatus information. * Once this component has completed rendering, this variable is * removed (or reverted back to its previous value). * The VarStatus provides contextual information about the state of the * component to EL expressions. For components that iterate, varStatus * also provides loop counter information. Please see the this * component's documentation for the specific properties on the varStatus. * The common properties on varStatus include:
  • "model" - returns the CollectionModel for this component
  • "index" - returns the zero based row index
* * @param varStatus the new varStatus value */ final public void setVarStatus(String varStatus) { setProperty(VAR_STATUS_KEY, (varStatus)); } @Override public String getFamily() { return COMPONENT_FAMILY; } @Override protected FacesBean.Type getBeanType() { return TYPE; } /** * Construct an instance of the UIXNavigationLevel. */ protected UIXNavigationLevel( String rendererType ) { super(rendererType); } static { TYPE.lockAndRegister("org.apache.myfaces.trinidad.NavigationLevel","org.apache.myfaces.trinidad.NavigationLevel"); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy