
org.efaps.ui.wicket.components.ChildCallBackHeaderContributer Maven / Gradle / Ivy
/*
* Copyright 2003 - 2012 The eFaps Team
*
* 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.
*
* Revision: $Rev: 7532 $
* Last Changed: $Date: 2012-05-19 01:31:05 -0500 (Sat, 19 May 2012) $
* Last Changed By: $Author: [email protected] $
*/
package org.efaps.ui.wicket.components;
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.core.util.string.JavaScriptUtils;
/**
* Header Contributer that adds a javascript to the header needed
* to executed a method for a child in the parent frame.
*
* @author The eFaps Team
* @version $Id: ChildCallBackHeaderContributer.java 7532 2012-05-19 06:31:05Z [email protected] $
*/
public class ChildCallBackHeaderContributer
extends Behavior
{
/**
* The Constant serialVersionUID.
*/
private static final long serialVersionUID = 1L;
/**
* The Constant javaScript.
*/
private static final String JAVASCRIPT =
JavaScriptUtils.SCRIPT_OPEN_TAG
+ "function childCallBack(_call){\n"
+ " _call = _call.replace(/^javascript:/, \"\");\n"
+ " eval(_call);\n"
+ "}\n"
+ JavaScriptUtils.SCRIPT_CLOSE_TAG;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy