You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2012/02/15 05:03:16 UTC

svn commit: r1244342 [5/5] - in /openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging: ./ css/ img/ js/ js/jquery/ js/tomee/ js/tomee/util/ js/tomee/view/

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/Application.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/Application.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/Application.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/Application.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,42 @@
+/**
+ *
+ * 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.
+ */
+
+/**
+ * This is the entry point for our javascript application.
+ * DO NOT add any logic here. All business logic should be implemented in the ApplicationController object.
+ * That is ok to add global utility methods here.
+ */
+var TOMEE = {};
+$(document).ready(function () {
+    TOMEE.ApplicationController();
+});
+
+TOMEE.log = {
+    info:function (msg) {
+        //it is really needed to access console via window in ie8 or we get a "console is undefined" error
+        if (window.console && window.console.info) {
+            window.console.info(msg);
+        }
+    },
+    error:function (msg) {
+        //it is really needed to access console via window in ie8 or we get a "console is undefined" error
+        if (window.console && window.console.error) {
+            window.console.error(msg);
+        }
+    }
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationChannel.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationChannel.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationChannel.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationChannel.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,102 @@
+/**
+ *
+ * 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.
+ */
+
+/**
+ * This is the communication channel of our application.
+ * One can send a message through this object. Other object can register listeners to the messages coming from it.
+ *
+ * Some other frameworks use the term MessageBus for similar  utilities.
+ *
+ * This appliation has many instances of this class because it is usefull to have a private channel/messageBus between two components.
+ * In this application an example of that is the pagingToolChannel sending message to its parent.
+ *
+ */
+TOMEE.ApplicationChannel = function (initParams) {
+    var listeners = {};
+
+    /**
+     * Bind a listener to a given message
+     *
+     * @param messageKey this is the messageKey sent by another object
+     * @param callback this is your callback function. It contains one parameter with all values sent by the sender object
+     */
+    var bind = function (messageKey, callback) {
+        //avoiding "NullPointerException"
+        if (!listeners[messageKey]) {
+            listeners[messageKey] = [];
+        }
+
+        var myListeners = listeners[messageKey];
+        if (myListeners.indexOf(callback) < 0) {
+            myListeners.push(callback);
+        }
+    };
+
+    /**
+     * Unbind a listener to a given message
+     *
+     * @param messageKey this is the messageKey sent by another object
+     * @param callback the same "function" object you used in the "bind" method
+     */
+    var unbind = function (messageKey, callback) {
+        if (!listeners[messageKey]) {
+            return;
+        }
+
+        var myListeners = listeners[messageKey];
+        var index = myListeners.indexOf(callback);
+        if (index >= 0) {
+            myListeners.splice(index, 1);
+        }
+    };
+
+    /**
+     * Send a message
+     *
+     * @param messageKey your message key
+     * @param paramsObj the parameters to the listeners callback methods
+     */
+    var send = function (messageKey, paramsObj) {
+        if (!listeners[messageKey]) {
+            return;
+        }
+
+        var myListeners = listeners[messageKey];
+
+        //the safeParamsObj will never be null or undefined
+        var safeParamsObj = paramsObj;
+        if (!safeParamsObj) {
+            safeParamsObj = {};
+        }
+
+        TOMEE.log.info("Message " + messageKey + " * " + myListeners.length);
+
+        for (var i = 0; i < myListeners.length; i++) {
+            (function (callback) {
+                callback(safeParamsObj);
+
+            })(myListeners[i]);
+        }
+    };
+
+    return {
+        bind:bind,
+        unbind:unbind,
+        send:send
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationController.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationController.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationController.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationController.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,47 @@
+/**
+ *
+ * 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.
+ */
+
+/**
+ * This is the application controller. This is the central point for logic and to forward actions to the views.
+ * It contains all the views and model instances.
+ */
+TOMEE.ApplicationController = function () {
+
+    //the application communication channel
+    //The views communicate with the controller (or other components) through this object
+    var channel = TOMEE.ApplicationChannel({});
+
+    //this object handles all the data manipulation.
+    var model = TOMEE.ApplicationModel({
+        channel:channel
+    });
+
+    //The user clicked in one of the buttons in the application toolbar
+    channel.bind('toolbar_button_executed', function (params) {
+        var a = 0;
+
+    });
+
+    TOMEE.ApplicationView({
+        channel:channel
+    });
+
+    return {
+
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationI18N.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationI18N.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationI18N.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationI18N.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.ApplicationI18N = (function (cfg) {
+    var messages = {
+        'application.name':'Apache Tomee',
+        'application.footer':'Copyright © 2011 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache and the Apache feather logo are trademarks of The Apache Software Foundation.',
+
+        'app.toolbar.home':'Home',
+        'app.toolbar.log':'Log',
+
+        'app.home.menu.setup':'Setup',
+        'app.home.menu.setup.test':'Testing your setup',
+
+        'app.home.menu.tools':'Tools',
+        'app.home.menu.tools.jndi':'JNDI Browser',
+        'app.home.menu.tools.class':'Class Viewer',
+        'app.home.menu.tools.ejb':'EJB Viewer',
+        'app.home.menu.tools.obj':'Object Invoker',
+
+        'dummy':'dummy'
+    };
+
+    var get = function (key) {
+        var result = messages[key];
+        if (!result) {
+            result = '[!' + key + '!]';
+            TOMEE.log.error('Missing i18n message. key: "' + key + '"');
+        }
+        return result;
+    }
+
+    return {
+        get:get
+    };
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationModel.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationModel.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationModel.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/ApplicationModel.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,104 @@
+/**
+ *
+ * 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.
+ */
+
+/**
+ * This object handles all the data manipulation.
+ *
+ * @param cfg
+ */
+TOMEE.ApplicationModel = function (cfg) {
+    var channel = cfg.channel;
+
+    //holder for all the request parameters.
+    var requestParameters = {};
+
+    //keep tracking of the current request
+    //so we can cancel it if necessary
+    var currentRequest = null;
+
+    var getArray = function (obj) {
+        if (!obj) {
+            return [];
+        }
+
+        if (obj instanceof Array) {
+            return obj;
+        }
+
+        return [obj];
+    };
+
+    var getObject = function (obj) {
+        if (!obj) {
+            return {};
+        }
+        return obj;
+    };
+
+    /**
+     * Prepare internal values.
+     *
+     * @param data request json value
+     */
+    var prepareData = function (data) {
+
+    };
+
+    /**
+     * Delayed task for the remote request.
+     */
+    var load = new TOMEE.DelayedTask({
+        callback:function () {
+            //if we already have a running request, cancel it.
+            if (currentRequest) {
+                currentRequest.abort();
+            }
+
+            //start a new request
+            currentRequest = $.ajax({
+                type:'GET',
+                url:'some.servlet',
+                success:function (data) {
+
+                },
+                error:function (data) {
+
+                }
+            });
+        }
+    });
+
+    var getRequestParameter = function (key) {
+        return requestParameters[key];
+    };
+
+    var setRequestParameter = function (key, value) {
+        requestParameters[key] = value;
+    };
+
+    return {
+        setRequestParameter:setRequestParameter,
+        getRequestParameter:getRequestParameter,
+        load:function () {
+            //wait 1 second before triggering this request
+            //the user may be still selecting his parameters
+            //the last calling thread will trigger the request
+            load.delay(1000);
+        }
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/DelayedTask.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/DelayedTask.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/DelayedTask.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/DelayedTask.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,37 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.DelayedTask = function (cfg) {
+    if (!cfg.callback) {
+        throw "You should give me a callback method to execute";
+    }
+
+    var callback = cfg.callback;
+    var currentTimer = null;
+
+    var delay = function (millis) {
+        if (currentTimer !== null) {
+            clearTimeout(currentTimer);
+        }
+        currentTimer = setTimeout(callback, millis);
+    };
+
+    return {
+        delay:delay
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/Sequence.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/Sequence.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/Sequence.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/util/Sequence.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,41 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.Sequence = (function () {
+    var sequenceMap = {};
+
+    var next = function (prefix) {
+        var myPrefix = prefix;
+        if (!myPrefix || myPrefix === '') {
+            myPrefix = 'TOMEE-';
+        }
+
+        var sequence = sequenceMap[myPrefix];
+        if (!sequence) {
+            sequence = 0;
+            sequenceMap[myPrefix] = sequence;
+        }
+
+        sequenceMap[myPrefix] = sequence + 1;
+        return sequence;
+    };
+
+    return {
+        next:next
+    };
+})();
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationFooter.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationFooter.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationFooter.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationFooter.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,24 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.ApplicationToolbar = function (cfg) {
+
+    return {
+
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanel.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanel.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanel.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanel.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,51 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.ApplicationHomePanel = function (cfg) {
+    var channel = cfg.channel;
+
+    var elements = (function () {
+        var divBodyUid = TOMEE.Sequence.next();
+        var tpl = [
+            '<div class="container-fluid">',
+            '<div id="' + divBodyUid + '" class="row-fluid"/>',
+            '<hr>',
+            '<footer><p>' + TOMEE.ApplicationI18N.get('application.footer') + '</p></footer>',
+            '</div>'
+        ];
+
+        //create the element
+        var all = $(tpl.join(''));
+        var body = all.find("#" + divBodyUid);
+        return {
+            all:all,
+            body:body
+        };
+    })();
+
+    var menu = TOMEE.ApplicationHomePanelMenu(cfg);
+
+    elements.body.append(menu.getEl());
+
+    return {
+        getEl:function(){
+            return elements.all;
+        }
+
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanelMenu.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanelMenu.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanelMenu.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationHomePanelMenu.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,137 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.ApplicationHomePanelMenu = function (cfg) {
+    var channel = cfg.channel;
+
+    var elements = (function () {
+        var ulUid = TOMEE.Sequence.next();
+        var tpl = [
+            '<div class="span3">',
+            '<div class="well sidebar-nav">',
+            '<ul id="' + ulUid + '" class="nav nav-list">',
+            '</ul>',
+            '</div>',
+            '</div>'
+        ];
+
+        //create the element
+        var all = $(tpl.join(''));
+        var list = all.find("#" + ulUid);
+        return {
+            all:all,
+            list:list
+        };
+    })();
+
+    var btnGroups = [
+        {
+            title:TOMEE.ApplicationI18N.get('app.home.menu.setup'),
+            btns:[
+                {
+                    title:TOMEE.ApplicationI18N.get('app.home.menu.setup.test'),
+                    callback:function () {
+
+                    }
+                }
+            ]
+        },
+
+        {
+            title:TOMEE.ApplicationI18N.get('app.home.menu.tools'),
+            btns:[
+                {
+                    title:TOMEE.ApplicationI18N.get('app.home.menu.tools.jndi'),
+                    callback:function () {
+
+                    }
+                },
+
+                {
+                    title:TOMEE.ApplicationI18N.get('app.home.menu.tools.class'),
+                    callback:function () {
+
+                    }
+                },
+
+                {
+                    title:TOMEE.ApplicationI18N.get('app.home.menu.tools.ejb'),
+                    callback:function () {
+
+                    }
+                },
+
+                {
+                    title:TOMEE.ApplicationI18N.get('app.home.menu.tools.obj'),
+                    callback:function () {
+
+                    }
+                }
+            ]
+        }
+    ];
+
+    $.each(btnGroups, function (i, grp) {
+
+        var anchorUid = TOMEE.Sequence.next();
+
+        (function () {
+            var liUid = TOMEE.Sequence.next();
+            elements.list.append($('<li class="nav-header" id="' + liUid + '">' + grp.title + '</li>'));
+            return elements.list.find('#' + liUid);
+        })();
+
+        $.each(grp.btns, function (ii, btn) {
+            var el = (function () {
+                var liUid = TOMEE.Sequence.next();
+                var anchorUid = TOMEE.Sequence.next();
+                elements.list.append($('<li id="' + liUid + '"><a id="' + anchorUid + '" href="#">' + btn.title + '</a></li>'));
+                return {
+                    li:elements.list.find('#' + liUid),
+                    anchor:elements.list.find('#' + anchorUid)
+                };
+            })();
+            el.anchor.on('click', function () {
+                var allLinks = elements.list.find('li');
+                allLinks.removeClass('active');
+
+                el.li.addClass('active');
+
+                btn.callback();
+            });
+        });
+
+        var anchor = elements.list.find('#' + anchorUid);
+
+        anchor.on("click", function () {
+            var allLinks = elements.list.find('li');
+            allLinks.removeClass('active');
+
+            li.addClass('active');
+
+            button.callback();
+        });
+    });
+
+    return {
+        getEl:function () {
+            return elements.all;
+        }
+
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationToolbar.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationToolbar.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationToolbar.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationToolbar.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,93 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.ApplicationToolbar = function (cfg) {
+    var channel = cfg.channel;
+
+    var elements = (function () {
+        var ulUid = TOMEE.Sequence.next();
+        var tpl = [
+            '<div class="navbar navbar-fixed-top">',
+            '<div class="navbar-inner">',
+            '<div class="container-fluid">',
+            '<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">',
+            '<span class="icon-bar"></span>',
+            '<span class="icon-bar"></span>',
+            '<span class="icon-bar"></span>',
+            '</a>',
+            '<a class="brand" href="#">' + TOMEE.ApplicationI18N.get('application.name') + '</a>',
+            '<div class="nav-collapse">',
+            '<ul id="' + ulUid + '" class="nav"></ul>',
+            '</div>',
+            '</div>',
+            '</div>',
+            '</div>'
+        ];
+
+        //create the element
+        var all = $(tpl.join(''));
+        var ul = all.find("#" + ulUid);
+        return {
+            all:all,
+            list:ul
+        };
+    })();
+
+    var buttons = [
+        {
+            title:TOMEE.ApplicationI18N.get('app.toolbar.home'),
+            callback:function () {
+                channel.send('toolbar_button_executed', {
+                    key:'home'
+                });
+            }
+        },
+        {
+            title:TOMEE.ApplicationI18N.get('app.toolbar.log'),
+            callback:function () {
+                channel.send('toolbar_button_executed', {
+                    key:'log'
+                });
+            }
+        }
+    ];
+
+    $.each(buttons, function (i, button) {
+        var liUid = TOMEE.Sequence.next();
+        var anchorUid = TOMEE.Sequence.next();
+        elements.list.append($('<li id="' + liUid + '"><a id="' + anchorUid + '" href="#">' + button.title + '</a></li>'));
+
+        var li = elements.list.find('#' + liUid);
+        var anchor = elements.list.find('#' + anchorUid);
+
+        anchor.on("click", function () {
+            var allLinks = elements.list.find('li');
+            allLinks.removeClass('active');
+
+            li.addClass('active');
+
+            button.callback();
+        });
+    });
+
+    return {
+        getEl:function () {
+            return elements.all;
+        }
+    };
+};
\ No newline at end of file

Added: openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationView.js
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationView.js?rev=1244342&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationView.js (added)
+++ openejb/trunk/openejb/tomee/tomee-webapp/src/main/webapp/staging/js/tomee/view/ApplicationView.js Wed Feb 15 04:03:15 2012
@@ -0,0 +1,29 @@
+/**
+ *
+ * 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.
+ */
+
+TOMEE.ApplicationView = function (cfg) {
+    var appToolbar = TOMEE.ApplicationToolbar(cfg);
+    var home = TOMEE.ApplicationHomePanel(cfg);
+
+    $('body').append(appToolbar.getEl());
+    $('body').append(home.getEl());
+
+    return {
+
+    };
+};
\ No newline at end of file