blob: c7dcc86157cedc2581ad0bc06f431d3613d97c86 [file] [log] [blame]
// Copyright 2004 The Apache Software Foundation
//
// 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.apache.tapestry.workbench;
import java.io.IOException;
import javax.servlet.ServletException;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.engine.HomeService;
import org.apache.tapestry.engine.IEngineServiceView;
import org.apache.tapestry.request.ResponseOutputStream;
/**
* Special version of the home service used to reset the visit tab when re-entering
* the Tapestry application from a static HTML page.
*
* @author Howard Lewis Ship
* @version $Id$
* @see Redirect
*
**/
public class WorkbenchHomeService extends HomeService
{
public void service(IEngineServiceView engine, IRequestCycle cycle, ResponseOutputStream output)
throws ServletException, IOException
{
Visit visit = (Visit) engine.getVisit();
if (visit != null)
visit.setActiveTabName("Home");
super.service(engine, cycle, output);
}
}