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

gadgets.log.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8" ?>
<!--

    Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<Module id="foo">
    <ModulePrefs title="Log Gadget" /> 
    <UserPref name="NotUsed" default_value="abc" />
    <Content type="html">
	<![CDATA[ 
	    <form>
		<input id="msg" type="text" />
		<input type="button" value=" Send Message to Log " onClick="sendLogMessage(document.getElementById('msg').value);" />
	    </form>
	    <script type="text/javascript">
		function sendLogMessage(theMsg) {

		    /*
		    admingui.gadget.invoke(
			"getChildrenTable",
			{
			    objectNameStr: "amx:pp=/domain/configs/config[server-config],type=iiop-service",
			    childType: "iiop-listener",
			    result: "#{requestScope.listOfRows}"
			});
		    */

		    admingui.gadget.invoke("println", {value: theMsg});

		    /*
		    admingui.gadget.invoke("dumpSessionAttributes",
			{
			    value: "#{requestScope.doesnotmatter}"
			});
		    */
		    admingui.gadget.invoke("roundTo2DecimalPoint",
			{
			    input: "33.638377",
			    output: "#{requestScope.foo}"
			});
		    var response = admingui.gadget.getResponse();
		    if (response) {
			alert(response.output);
		    } else {
			alert('A JSF2 bug may be causing the response to not yet be set because synchronous requests are not yet supported!');
		    }
		    /*
		    alert(response.result[1].Port);
		    alert(response.result[1].Name);
		    */
		}
	    </script>
	]]>
    </Content> 
</Module>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy