001 package org.apache.myfaces.tobago.context; 002 003 import org.apache.myfaces.tobago.component.ComponentUtil; 004 import org.apache.myfaces.tobago.component.UIPage; 005 import org.apache.myfaces.tobago.layout.Box; 006 007 import javax.faces.context.FacesContext; 008 009 /* 010 * Licensed to the Apache Software Foundation (ASF) under one or more 011 * contributor license agreements. See the NOTICE file distributed with 012 * this work for additional information regarding copyright ownership. 013 * The ASF licenses this file to You under the Apache License, Version 2.0 014 * (the "License"); you may not use this file except in compliance with 015 * the License. You may obtain a copy of the License at 016 * 017 * http://www.apache.org/licenses/LICENSE-2.0 018 * 019 * Unless required by applicable law or agreed to in writing, software 020 * distributed under the License is distributed on an "AS IS" BASIS, 021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 022 * See the License for the specific language governing permissions and 023 * limitations under the License. 024 */ 025 026 /** 027 * User: lofwyr 028 * Date: 11.06.2008 16:17:03 029 */ 030 public class TobagoContext { 031 032 public Box getActionPosition() { 033 FacesContext facesContext = FacesContext.getCurrentInstance(); 034 UIPage page = ComponentUtil.findPage(facesContext); 035 return page.getActionPosition(); 036 } 037 }