You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2007/05/09 23:26:53 UTC
svn commit: r536714 - in
/incubator/xap/trunk/samples/WebContent/examples/customTag/plugins: ./
blackbox/ blackbox/org/ blackbox/org/mycompany/ blackbox/org/mycompany/xap/
blackbox/org/mycompany/xap/BlackBox.js blackbox/plugin.xml
Author: jmargaris
Date: Wed May 9 16:26:52 2007
New Revision: 536714
URL: http://svn.apache.org/viewvc?view=rev&rev=536714
Log:
https://issues.apache.org/jira/browse/XAP-425
Added:
incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/
incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/
incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/
incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/
incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/xap/
incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/xap/BlackBox.js (with props)
incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/plugin.xml (with props)
Added: incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/xap/BlackBox.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/xap/BlackBox.js?view=auto&rev=536714
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/xap/BlackBox.js (added)
+++ incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/xap/BlackBox.js Wed May 9 16:26:52 2007
@@ -0,0 +1,52 @@
+/**
+ *
+ * This is a sample tag file
+ *
+ */
+
+/**
+ * Use Xap.provide() to create a global object 'org.mycompany.xap.BlackBox
+ */
+Xap.provide('org.mycompany.xap.BlackBox');
+
+
+/**
+ * Our custom tag requires AbstractWidgetBridge
+ */
+Xap.require('xap.bridges.basic.AbstractWidgetBridge') ;
+
+
+/**
+ * Instance constructor
+ */
+org.mycompany.xap.BlackBox = function() {};
+
+
+/**
+ * Instance of BlackBox will inherit all properties and functions of AbstractWidgetBridge
+ */
+Xap.setupClassAsSubclassOf("org.mycompany.xap.BlackBox","xap.bridges.basic.AbstractWidgetBridge");
+
+
+/**
+ * Creates peer object to visually represent our <BlackBox> tag.
+ */
+org.mycompany.xap.BlackBox.prototype.createPeer = function() {
+ var node = document.createElement("div");
+ // get our "size" attribute
+ var size = this.getElement().getAttribute('size');
+ // use size as div's width and height
+ node.style.width = size;
+ node.style.height = size;
+ // set div object as our peer
+ this.setPeer(node);
+}
+
+
+/**
+ * Returns a topmost peer node.
+ * Return our one node peer object as our root node.
+ */
+org.mycompany.xap.BlackBox.prototype.getRootDomNode = function() {
+ return this.getPeer();
+};
\ No newline at end of file
Propchange: incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/org/mycompany/xap/BlackBox.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/plugin.xml
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/plugin.xml?view=auto&rev=536714
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/plugin.xml (added)
+++ incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/plugin.xml Wed May 9 16:26:52 2007
@@ -0,0 +1,27 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one
+ - or more contributor license agreements. See the NOTICE file
+ - distributed with this work for additional information
+ - regarding copyright ownership. The ASF licenses this file
+ - to you 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.
+ -
+-->
+
+<plugin>
+
+ <tag-mappings namespace="http://mycompany.org/xap" document="ui">
+ <mapping class="org.mycompany.xap.BlackBox" name="BlackBox"/>
+ </tag-mappings>
+
+
+</plugin>
Propchange: incubator/xap/trunk/samples/WebContent/examples/customTag/plugins/blackbox/plugin.xml
------------------------------------------------------------------------------
svn:eol-style = native