Java tutorial
/* ========================================================================== * Copyright 2002-2004 Cyclops Group Community * * Licensed under the Open Software License, Version 2.1 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://opensource.org/licenses/osl-2.1.php * * 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 com.cyclopsgroup.waterview.navigator.impl; import org.apache.commons.jelly.JellyTagException; import org.apache.commons.jelly.MissingAttributeException; import org.apache.commons.jelly.TagSupport; import org.apache.commons.jelly.XMLOutput; /** * @author <a href="mailto:jiaqi.guo@gmail.com">Jiaqi Guo</a> * * Navigation tag in navigation.xml */ public class NavigationTag extends TagSupport { private DefaultNavigatorService navigator; /** * Overwrite or implement method in NavigationTag * * @see org.apache.commons.jelly.Tag#doTag(org.apache.commons.jelly.XMLOutput) */ public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { navigator = (DefaultNavigatorService) getContext().getVariable(DefaultNavigatorService.class.getName()); invokeBody(output); } /** * Navigation home * * @return Default navigation home */ public DefaultNavigatorService getNavigator() { return navigator; } }