portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r592829 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF: security/permissions/view.vm view/selectors/portlet-selector.vm view/site/sitemap.vm
Date Wed, 07 Nov 2007 17:58:03 GMT
Author: taylor
Date: Wed Nov  7 09:58:01 2007
New Revision: 592829

URL: http://svn.apache.org/viewvc?rev=592829&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-590
more html errors, patch from Mohan K

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/portlet-selector.vm
    portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/site/sitemap.vm

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm?rev=592829&r1=592828&r2=592829&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/security/permissions/view.vm Wed Nov  7 09:58:01 2007
@@ -1,679 +1,680 @@
-#*
-  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.
-*#
-#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
-#set($req = $rc.Request)
-
-
-
-<!--
-javascript: alert( dojo.widget.byId( "portletsTable" ).data[3].actions = "none" )
-javascript: alert( dojo.widget.byId( "portletsTable" ).render(true) )
-
-
-var row=dojo.html.getParentByType(e.target,"tr");
-var body=dojo.html.getParentByType(row,"tbody");
-this.resetSelections(body);
-row.setAttribute("selected","true");
-this.setSelectionByRow(row);
-
-javascript: alert( dojo.widget.byId( "portletsTable").data[1].name )
-javascript: alert( updateSelectedRow() )
-
-javascript: alert( dojo.html.disableSelection(dojo.byId( "resourceName" )) )
-
-dojo.lang.shallowCopy(this.portlets) ;
--->
-
-<div dojoType="LayoutContainer" widgetId="permsRootLContainer" class="permsRootLContainer"
-     layoutChildPriority="left-right">
-
-    <div dojoType="LayoutContainer" widgetId="permsTabLContainer" class="permsTabLContainer" layoutAlign="top" layoutChildPriority="none">
-
-        <div id="permsTabContainer" dojoType="TabContainer" selectedChild="portlets" doLayout="false">
-
-            <div id="portlets" dojoType="ContentPane" label="Portlets">
-                <div class="tableContainer">
-
-                    <table dojoType="jetspeed:EditorTable" widgetId="portletsTable" class="permissions" headClass="fixedHeader" tbodyClass="scrollContent" enableMultipleSelect="true" enableAlternateRows="true" rowAlternateClass="alternateRow" templateCssPath="/j2-admin/css/security-permissions.css" cellpadding="0" cellspacing="0" border="0">
-                        <col width="45%"></col>
-                        <col width="15%"></col>
-                        <col width="35%"></col>
-                        <thead>
-                            <tr>
-                                <th field="name" dataType="String">Resource</th>
-                                <th field="actions" dataType="String">Actions</th>
-                                <th field="roles" dataType="String">Roles</th>        
-                            </tr>
-                        </thead>
-                        <tbody>
-                        </tbody>
-                    </table>
-
-                </div>
-            </div>
-
-            <div id="folders" dojoType="ContentPane" label="Folders">
-                <div class="tableContainer">
-
-                    <table dojoType="jetspeed:EditorTable" widgetId="foldersTable" class="permissions" headClass="fixedHeader" tbodyClass="scrollContent" enableMultipleSelect="true" enableAlternateRows="true" rowAlternateClass="alternateRow" templateCssPath="/j2-admin/css/security-permissions.css" cellpadding="0" cellspacing="0" border="0">
-                        <col width="45%"></col>
-                        <col width="15%"></col>
-                        <col width="35%"></col>
-                        <thead>
-                            <tr>
-                                <th field="name" dataType="String">Resource</th>
-                                <th field="actions" dataType="String">Actions</th>
-                                <th field="roles" dataType="String">Roles</th>        
-                            </tr>
-                        </thead>
-                        <tbody>
-                        </tbody>
-                    </table>
-
-                </div>
-            </div>
-
-            <div id="pages" dojoType="ContentPane" label="Pages">
-                <div class="tableContainer">
-
-                    <table dojoType="jetspeed:EditorTable" widgetId="pagesTable" class="permissions" headClass="fixedHeader" tbodyClass="scrollContent" enableMultipleSelect="true" enableAlternateRows="true" rowAlternateClass="alternateRow" templateCssPath="/j2-admin/css/security-permissions.css" cellpadding="0" cellspacing="0" border="0">
-                        <col width="45%"></col>
-                        <col width="15%"></col>
-                        <col width="35%"></col>
-                        <thead>
-                            <tr>
-                                <th field="name" dataType="String">Resource</th>
-                                <th field="actions" dataType="String">Actions</th>
-                                <th field="roles" dataType="String">Roles</th>    
-                            </tr>
-                        </thead>
-                        <tbody>
-                        </tbody>
-                    </table>
-
-                </div>
-            </div>
-        </div>
-    </div>
-
-
-    <div dojoType="LayoutContainer" widgetId="editorLContainer" class="editorLContainer" layoutAlign="client" layoutChildPriority="top-bottom">
-
-        <div dojoType="LayoutContainer" widgetId="editorLTop" class="editorLTop" layoutAlign="top">
-
-            <div dojoType="ContentPane"
-                 widgetId="resourceNameLContainer"
-                 class="resourceNameLContainer"
-                 layoutAlign="left">
-                <b>Resource</b><br/>
-                <input name="resourceName" id="resourceName" type="text" size="45" onChange="updateSelectedRow()">
-            </div>
-
-            <div dojoType="ContentPane"
-                 widgetId="editorControls"
-                 class="editorControlsLContainer buttonbox"
-                 layoutAlign="client">
-
-                <button widgetId="deleteButton" dojoType="Button" onclick="deleteEntry()">
-                    Delete
-                </button>
-
-                <button widgetId="revertButton" dojoType="Button" onclick="revertEntry()">
-                    Revert
-                </button>
-
-                <button widgetId="saveButton" dojoType="Button" onclick="saveEntry()">
-                    Save
-                </button>
-                
-                <button widgetId="newButton" dojoType="Button" onclick="newEntry()">
-                    New
-                </button>
-
-            </div>
-        </div>
-
-        <div dojoType="LayoutContainer" widgetId="editorLBottom" class="editorLBottom" layoutAlign="client">
-
-            <div dojoType="ContentPane"
-                 widgetId="actionsContainer"
-                 class="actionsLContainer"
-                 layoutAlign="right">
-                <b>Actions</b><br/>
-                <input type="checkbox" name="actionview" id="actionview" dojoType="Checkbox" /> <label for="actionview">View</label><br />
-                <input type="checkbox" name="actionedit" id="actionedit" dojoType="Checkbox" /> <label for="actionedit">Edit</label><br />
-                <input type="checkbox" name="actionhelp" id="actionhelp" dojoType="Checkbox" /> <label for="actionhelp">Help</label><br />
-            </div>
-
-            <div dojoType="ContentPane"
-                 widgetId="rolesContainer"
-                 class="rolesLContainer"
-                 layoutAlign="client">
-
-                <b>Roles</b><br />
-                #foreach ($role in $roles)
-                <input type="checkbox" name="role_$velocityCount" id="role_$velocityCount" dojoType="Checkbox" /> <label for="role_$velocityCount">$role.Principal.Name</label><br />
-                #end
-
-            </div>
-
-
-        </div>
-
-        <div dojoType="dialog" id="SaveWarningDialog" bgColor="grey" bgOpacity="0.5" toggle="fade" toggleDuration="250">
-            <form onsubmit="return false;">
-                <table>
-                    <tr>
-                        <td>Please Save or Revert changes to the selected permissions record before proceeding.</td><td>&nbsp;</td>
-                    </tr>
-                    <tr>
-                        <td colspan="2" align="right" class="buttonboxright">
-                            <button dojoType="Button" onClick="dojo.widget.byId( 'SaveWarningDialog' ).hide();" >Cancel</button>
-                            <button dojoType="Button" onClick="dojo.widget.byId( 'SaveWarningDialog' ).hide(); revertEntry();">Revert</button>
-                            <button dojoType="Button" onClick="dojo.widget.byId( 'SaveWarningDialog' ).hide(); saveEntry();">Save</button>
-                        </td>
-                    </tr>
-                </table>
-            </form>
-        </div>
-
-    </div>
-
-<script language="JavaScript" type="text/javascript">
-    rolePrincipals = new Array();
-#foreach ($role in $roles)
-    rolePrincipals.push( "$role.Principal.Name" );
-#end
-    actionNames = new Array();
-    actionNames.push( "view" );
-    actionNames.push( "edit" );
-    actionNames.push( "help" );
-</script>
-<script type="text/javascript">
-
-
-function processTableRowEvent(e, tableName)
-{
-    dojo.widget.byId( tableName ).processTableRowEvent( e );
-}
-
-function clearAndDisableEditor()
-{
-    var resourceTextBox = dojo.byId( "resourceName" );
-    if ( resourceTextBox )
-    {
-        resourceTextBox.value = "";
-        resourceTextBox.disabled = true;
-    }
-    for ( var i = 0 ; i < actionNames.length; i++ )
-    {
-        var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
-        if ( actionCheckbox )
-        {
-            actionCheckbox.checked = false;
-            actionCheckbox.disabled = true;
-            actionCheckbox._setInfo();
-        }
-    }
-    for ( var i = 0 ; i < rolePrincipals.length; i++ )
-    {
-        var roleIndex = i + 1;
-        var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
-        if ( roleCheckbox )
-        {
-            roleCheckbox.checked = false;
-            roleCheckbox.disabled = true;
-            roleCheckbox._setInfo();
-        }
-    }
-
-    var buttonWidget = dojo.widget.byId( "newButton" );
-    if ( buttonWidget )
-        buttonWidget.setDisabled(false);
-
-    buttonWidget = dojo.widget.byId( "saveButton" );
-    if ( buttonWidget )
-        buttonWidget.setDisabled(true);
-
-    buttonWidget = dojo.widget.byId( "revertButton" );
-    if ( buttonWidget )
-        buttonWidget.setDisabled(true);
-
-    buttonWidget = dojo.widget.byId( "deleteButton" );
-    if ( buttonWidget )
-        buttonWidget.setDisabled(true);
-}
-
-function updateEditor( rowData )
-{
-    var resourceTextBox = dojo.byId( "resourceName" );
-    if ( rowData.__isNew )
-    {
-        resourceTextBox.disabled = false;
-    }
-    else
-    {
-        resourceTextBox.disabled = true;
-    }
-    resourceTextBox.value = rowData.name;
-
-    for ( var i = 0 ; i < actionNames.length; i++ )
-    {
-        var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
-        if ( actionCheckbox )
-        {
-            actionCheckbox.disabled = false;
-            actionCheckbox.checked = false;
-            actionCheckbox._setInfo();
-        }
-    }
-
-    var actionsList = rowData.actions.split( new RegExp( " *, *" ) );
-    if ( actionsList )
-    {
-        for ( var i = 0 ; i < actionsList.length ; i++ )
-        {
-            var actionCheckbox = dojo.widget.byId( "action" + actionsList[i] );
-            if ( actionCheckbox )
-            {
-                actionCheckbox.checked = true;
-                actionCheckbox._setInfo();
-            }
-        }
-    }
-
-    for ( var i = 0 ; i < rolePrincipals.length; i++ )
-    {
-        var roleIndex = i + 1;
-        var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
-        roleCheckbox.disabled = false;
-        roleCheckbox.checked = false;
-        roleCheckbox._setInfo();
-    }
-    var rolesList = rowData.roles.split( new RegExp( " *, *" ) );
-    if ( rolesList )
-    {
-        for ( var i = 0 ; i < rolesList.length ; i++ )
-        {
-            var tRole = rolesList[i];
-            for ( var j = 0 ; j < rolePrincipals.length; j++ )
-            {
-                if ( tRole == rolePrincipals[j] )
-                {
-                    var roleIndex = j + 1;
-                    var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
-                    if ( roleCheckbox )
-                    {
-                        roleCheckbox.checked = true;
-                        roleCheckbox._setInfo();
-                    }
-                }
-            }
-        }
-    }
-
-    updateEditorControls();
-}
-function getTableWidget( containedInTab )
-{
-    if ( ! containedInTab )
-        containedInTab = dojo.widget.byId( "permsTabContainer" ).selectedChildWidget;
-    return dojo.widget.byId( containedInTab.widgetId + "Table" );
-}
-function checkForChanges()
-{
-    var tTableWidget = getTableWidget();
-    return tTableWidget.checkForChanges();
-}
-function updateSelectedRow()
-{
-    var tTableWidget = getTableWidget();
-    var selectedRowData = tTableWidget.getSelectedRow() ;
-    if ( selectedRowData != null )
-    {
-        selectedRowData.name = dojo.byId( "resourceName" ).value;
-
-        var updatedActions = "";
-        for ( var i = 0 ; i < actionNames.length; i++ )
-        {
-            var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
-            if ( actionCheckbox && actionCheckbox.checked )
-            {
-                if ( updatedActions.length > 0 )
-                    updatedActions += ", ";
-                updatedActions += actionNames[i];
-            }
-        }
-        selectedRowData.actions = updatedActions;
-
-        var updatedRoles = "";
-        for ( var i = 0 ; i < rolePrincipals.length; i++ )
-        {
-            var roleIndex = i + 1;
-            var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
-            if ( roleCheckbox && roleCheckbox.checked )
-            {
-                if ( updatedRoles.length > 0 )
-                    updatedRoles += ",";
-                updatedRoles += rolePrincipals[i];
-            }
-        }
-        selectedRowData.roles = updatedRoles;
-        
-        tTableWidget.updateClonedData( selectedRowData, tTableWidget.selected[0] );
-
-        tTableWidget.render(true);
-        tTableWidget.showSelections();
-
-        updateEditorControls();
-    }
-}
-
-function updateEditorControls()
-{
-    var hasChanged = checkForChanges();
-    if ( hasChanged )
-    {
-        var buttonWidget = dojo.widget.byId( "saveButton" );
-        if ( buttonWidget )
-            buttonWidget.setDisabled(false);
-
-        buttonWidget = dojo.widget.byId( "revertButton" );
-        if ( buttonWidget )
-        {
-            if ( hasChanged == "modified" )
-            {
-                buttonWidget.setDisabled(false);
-            }
-            else
-            {
-                buttonWidget.setDisabled(true);
-            }
-        }
-
-        buttonWidget = dojo.widget.byId( "newButton" );
-        if ( buttonWidget )
-            buttonWidget.setDisabled(true);
-
-        buttonWidget = dojo.widget.byId( "deleteButton" );
-        if ( buttonWidget )
-        {
-            if ( hasChanged == "modified" )
-            {
-                buttonWidget.setDisabled(true);
-            }
-            else
-            {
-                buttonWidget.setDisabled(false);
-            }
-        }
-    }
-    else
-    {
-        var buttonWidget = dojo.widget.byId( "saveButton" );
-        if ( buttonWidget )
-            buttonWidget.setDisabled(true);
-
-        buttonWidget = dojo.widget.byId( "revertButton" );
-        if ( buttonWidget )
-            buttonWidget.setDisabled(true);
-
-        buttonWidget = dojo.widget.byId( "newButton" );
-        if ( buttonWidget )
-            buttonWidget.setDisabled(false);
-
-        buttonWidget = dojo.widget.byId( "deleteButton" );
-        if ( buttonWidget )
-            buttonWidget.setDisabled(false);
-    }
-}
-
-
-
-// http://localhost:8080/jetspeed/ajaxapi?action=permissions&method=add&type=portlet&resource=demo::*&roles=role1,role2,role3&actions=view,edit
-// http://localhost:8080/jetspeed/ajaxapi?action=permissions&method=update&type=portlet&resource=jsf-demo%3A%3A*&roles=admin%2Cuser%2Csubsite2&actions=view%2C%20edit&oldactions=view%2C%20edit xml-content=<js><status>failure</status><action>unknown</action></js>
-
-
-function saveEntrySubmit( selectedRowData, removeEntry )
-{
-    var tTableWidget = getTableWidget();
-
-    if ( ! selectedRowData ) { dojo.raise( "saveEntrySubmit can't find selectedRowData" ) ; return; }
-
-    var masterData = tTableWidget.getData( tTableWidget.js_masterdata, selectedRowData.Id );
-    if ( ! masterData ) { dojo.raise( "saveEntrySubmit can't find masterdata" ) ; return; } 
-
-    var contextPath = document.location.protocol + "/" + "/" + document.location.host + "$req.ContextPath";
-    var requestUrl = contextPath + "/ajaxapi?action=permissions" ;
-
-    if ( removeEntry )
-    {
-        requestUrl += "&method=remove";
-    }
-    else if ( tTableWidget.entryIsNew( selectedRowData ) )
-    {
-        requestUrl += "&method=add";
-    }
-    else
-    {
-        requestUrl += "&method=update";
-    }
-    requestUrl += "&type=" + tTableWidget.js_type;
-    
-    requestUrl += "&resource=" + encodeURIComponent( selectedRowData.name );
-    requestUrl += "&roles=" + encodeURIComponent( selectedRowData.roles );
-    requestUrl += "&actions=" + encodeURIComponent( selectedRowData.actions );
-    requestUrl += "&oldactions=" + encodeURIComponent( masterData.actions );
-    
-    var mimeType = "text/xml";
-    dojo.io.bind({
-
-        url: requestUrl,
-
-        mimetype: mimeType,
-
-        load: function( type, data, evt )
-        {
-            var success = false;
-            var statusElmt = data.getElementsByTagName( "status" );
-            if ( statusElmt != null )
-            {
-                var successVal = statusElmt[0].firstChild.nodeValue;
-                if ( successVal == "success" )
-                    success = true;
-            }
-            if ( ! success )
-            {
-                var textContent = dojo.dom.innerXML( data );
-                if ( ! textContent )
-                    textContent = ( data != null ? "!= null (IE no XMLSerializer)" : "null" );
-                dojo.raise( "saveEntrySubmit failure url=" + requestUrl + "  xml-content=" + textContent );
-            }
-        },
-
-        error: function( type, error )
-        {
-            dojo.raise( "saveEntrySubmit failure url=" + requestUrl + " type=" + type + " error=" + error ) ;
-        }
-    });     
-};
-
-function newEntry()
-{
-    var tTableWidget = getTableWidget();
-    tTableWidget.newEntry();
-}
-function getNewEntryPrototype()
-{
-    return { name: "", actions: "", roles: "" };
-}
-
-function deleteEntry()
-{
-    var tTableWidget = getTableWidget();
-    tTableWidget.deleteEntry();
-}
-function saveEntry()
-{
-    var tTableWidget = getTableWidget();
-    tTableWidget.saveEntry();
-}
-
-function revertEntry()
-{
-    var tTableWidget = getTableWidget();
-    tTableWidget.revertEntry();
-}
-
-function okToChangeSelectionOrExit(invocation)
-{
-    var tTableWidget = getTableWidget();
-    return tTableWidget.okToChangeSelectionOrExit(invocation);
-}
-
-function dojoDebugCurrentTableData()
-{
-    dojo.debug( debugCurrentTableData() );
-}
-function alertDebugCurrentTableData()
-{
-    alert( debugCurrentTableData() );
-}
-function debugCurrentTableData()
-{
-    var tTableWidget = getTableWidget();
-    return tTableWidget.debugTableData();
-}
-
-function addListeners()
-{
-    var tabContainer = dojo.widget.byId("permsTabContainer");
-    dojo.event.connect("around", tabContainer, "selectChild", function(invocation) {
-        if ( checkForChanges() )
-        {
-            dojo.widget.byId( "SaveWarningDialog" ).show();
-            return;
-        }
-        invocation.proceed();
-        var tab = invocation.args[0];
-        var tTableWidget = getTableWidget( tab );
-        var selectedRowData = tTableWidget.getSelectedRow();
-    
-        if ( ! selectedRowData )
-        {
-            clearAndDisableEditor();
-        }
-        else
-        {
-            tTableWidget.showSelections();
-            updateEditor( selectedRowData );
-        }
-    });
-
-    var portletsTable = dojo.widget.byId("portletsTable");
-    dojo.event.connect( "around", portletsTable, "onUISelect", "okToChangeSelectionOrExit" );
-    dojo.event.connect(portletsTable, "onSelect", function(e) {
-        processTableRowEvent(e, "portletsTable");
-    });
-    dojo.event.connect(portletsTable, "updateEditor", updateEditor );
-    dojo.event.connect(portletsTable, "saveEntrySubmit", saveEntrySubmit );
-    dojo.event.connect(portletsTable, "clearAndDisableEditor", clearAndDisableEditor );
-    portletsTable.getNewEntryPrototype = getNewEntryPrototype;
-    var data = [] ;
-#foreach($p in $portletPermissions)
-    data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
-#end
-    portletsTable.js_masterdata = data;
-    portletsTable.js_type = "portlet";
-    portletsTable.saveWarningDialogWidgetId = "SaveWarningDialog";
-    portletsTable.parseData( portletsTable.js_masterdata );
-    portletsTable.render( true );
-    
-    
-    var foldersTable = dojo.widget.byId("foldersTable");
-    dojo.event.connect( "around", foldersTable, "onUISelect", "okToChangeSelectionOrExit" );
-    dojo.event.connect(foldersTable, "onSelect", function(e) {
-        //dojo.debugShallow( e.currentTarget );
-        processTableRowEvent(e, "foldersTable");
-    });
-    dojo.event.connect(foldersTable, "updateEditor", updateEditor );
-    dojo.event.connect(foldersTable, "saveEntrySubmit", saveEntrySubmit );
-    dojo.event.connect(foldersTable, "clearAndDisableEditor", clearAndDisableEditor );
-    foldersTable.getNewEntryPrototype = getNewEntryPrototype;
-    
-    data = [] ;
-#foreach($p in $folderPermissions)
-    data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
-#end
-    foldersTable.js_masterdata = data;
-    foldersTable.js_type = "folder";
-    foldersTable.saveWarningDialogWidgetId = "SaveWarningDialog";
-    foldersTable.parseData( data );
-    foldersTable.render( true );
-
-    var pagesTable = dojo.widget.byId("pagesTable");
-    dojo.event.connect( "around", pagesTable, "onUISelect", "okToChangeSelectionOrExit" );
-    dojo.event.connect(pagesTable, "onSelect", function(e) {
-        //dojo.debugShallow( e.currentTarget );
-        processTableRowEvent(e, "pagesTable");
-    });
-    dojo.event.connect(pagesTable, "updateEditor", updateEditor );
-    dojo.event.connect(pagesTable, "saveEntrySubmit", saveEntrySubmit );
-    dojo.event.connect(pagesTable, "clearAndDisableEditor", clearAndDisableEditor );
-    pagesTable.getNewEntryPrototype = getNewEntryPrototype;
-    data = [] ;
-#foreach($p in $pagePermissions)
-    data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
-#end
-    pagesTable.js_masterdata = data;
-    pagesTable.js_type = "page";
-    pagesTable.saveWarningDialogWidgetId = "SaveWarningDialog";
-    pagesTable.parseData( data );
-    pagesTable.render( true );
-
-    for ( var i = 0 ; i < actionNames.length; i++ )
-    {
-        var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
-        if ( actionCheckbox )
-        {
-            dojo.event.connect(actionCheckbox, "onClick", function() {
-                if(!actionCheckbox.disabled){
-                    updateSelectedRow();
-                }
-            });
-        }
-    }
-    for ( var i = 0 ; i < rolePrincipals.length; i++ )
-    {
-        var roleIndex = i + 1;
-        var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
-        if ( roleCheckbox )
-        {
-            dojo.event.connect(roleCheckbox, "onClick", function() {
-                if(!roleCheckbox.disabled){
-                    updateSelectedRow();
-                }
-            });
-        }
-    }
-
-    clearAndDisableEditor();
-}
-
-
-dojo.addOnLoad( window.addListeners );
-</script>
+#*
+  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.
+*#
+#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
+#set($req = $rc.Request)
+
+
+
+<!--
+javascript: alert( dojo.widget.byId( "portletsTable" ).data[3].actions = "none" )
+javascript: alert( dojo.widget.byId( "portletsTable" ).render(true) )
+
+
+var row=dojo.html.getParentByType(e.target,"tr");
+var body=dojo.html.getParentByType(row,"tbody");
+this.resetSelections(body);
+row.setAttribute("selected","true");
+this.setSelectionByRow(row);
+
+javascript: alert( dojo.widget.byId( "portletsTable").data[1].name )
+javascript: alert( updateSelectedRow() )
+
+javascript: alert( dojo.html.disableSelection(dojo.byId( "resourceName" )) )
+
+dojo.lang.shallowCopy(this.portlets) ;
+-->
+
+<div dojoType="LayoutContainer" widgetId="permsRootLContainer" class="permsRootLContainer"
+     layoutChildPriority="left-right">
+
+    <div dojoType="LayoutContainer" widgetId="permsTabLContainer" class="permsTabLContainer" layoutAlign="top" layoutChildPriority="none">
+
+        <div id="permsTabContainer" dojoType="TabContainer" selectedChild="portlets" doLayout="false">
+
+            <div id="portlets" dojoType="ContentPane" label="Portlets">
+                <div class="tableContainer">
+
+                    <table dojoType="jetspeed:EditorTable" widgetId="portletsTable" class="permissions" headClass="fixedHeader" tbodyClass="scrollContent" enableMultipleSelect="true" enableAlternateRows="true" rowAlternateClass="alternateRow" templateCssPath="/j2-admin/css/security-permissions.css" cellpadding="0" cellspacing="0" border="0">
+                        <col width="45%"></col>
+                        <col width="15%"></col>
+                        <col width="35%"></col>
+                        <thead>
+                            <tr>
+                                <th field="name" dataType="String">Resource</th>
+                                <th field="actions" dataType="String">Actions</th>
+                                <th field="roles" dataType="String">Roles</th>        
+                            </tr>
+                        </thead>
+                        <tbody>
+                        </tbody>
+                    </table>
+
+                </div>
+            </div>
+
+            <div id="folders" dojoType="ContentPane" label="Folders">
+                <div class="tableContainer">
+
+                    <table dojoType="jetspeed:EditorTable" widgetId="foldersTable" class="permissions" headClass="fixedHeader" tbodyClass="scrollContent" enableMultipleSelect="true" enableAlternateRows="true" rowAlternateClass="alternateRow" templateCssPath="/j2-admin/css/security-permissions.css" cellpadding="0" cellspacing="0" border="0">
+                        <col width="45%"></col>
+                        <col width="15%"></col>
+                        <col width="35%"></col>
+                        <thead>
+                            <tr>
+                                <th field="name" dataType="String">Resource</th>
+                                <th field="actions" dataType="String">Actions</th>
+                                <th field="roles" dataType="String">Roles</th>        
+                            </tr>
+                        </thead>
+                        <tbody>
+                        </tbody>
+                    </table>
+
+                </div>
+            </div>
+
+            <div id="pages" dojoType="ContentPane" label="Pages">
+                <div class="tableContainer">
+
+                    <table dojoType="jetspeed:EditorTable" widgetId="pagesTable" class="permissions" headClass="fixedHeader" tbodyClass="scrollContent" enableMultipleSelect="true" enableAlternateRows="true" rowAlternateClass="alternateRow" templateCssPath="/j2-admin/css/security-permissions.css" cellpadding="0" cellspacing="0" border="0">
+                        <col width="45%"></col>
+                        <col width="15%"></col>
+                        <col width="35%"></col>
+                        <thead>
+                            <tr>
+                                <th field="name" dataType="String">Resource</th>
+                                <th field="actions" dataType="String">Actions</th>
+                                <th field="roles" dataType="String">Roles</th>    
+                            </tr>
+                        </thead>
+                        <tbody>
+                        </tbody>
+                    </table>
+
+                </div>
+            </div>
+        </div>
+    </div>
+
+
+    <div dojoType="LayoutContainer" widgetId="editorLContainer" class="editorLContainer" layoutAlign="client" layoutChildPriority="top-bottom">
+
+        <div dojoType="LayoutContainer" widgetId="editorLTop" class="editorLTop" layoutAlign="top">
+
+            <div dojoType="ContentPane"
+                 widgetId="resourceNameLContainer"
+                 class="resourceNameLContainer"
+                 layoutAlign="left">
+                <b>Resource</b><br/>
+                <input name="resourceName" id="resourceName" type="text" size="45" onChange="updateSelectedRow()">
+            </div>
+
+            <div dojoType="ContentPane"
+                 widgetId="editorControls"
+                 class="editorControlsLContainer buttonbox"
+                 layoutAlign="client">
+
+                <button widgetId="deleteButton" dojoType="Button" onclick="deleteEntry()">
+                    Delete
+                </button>
+
+                <button widgetId="revertButton" dojoType="Button" onclick="revertEntry()">
+                    Revert
+                </button>
+
+                <button widgetId="saveButton" dojoType="Button" onclick="saveEntry()">
+                    Save
+                </button>
+                
+                <button widgetId="newButton" dojoType="Button" onclick="newEntry()">
+                    New
+                </button>
+
+            </div>
+        </div>
+
+        <div dojoType="LayoutContainer" widgetId="editorLBottom" class="editorLBottom" layoutAlign="client">
+
+            <div dojoType="ContentPane"
+                 widgetId="actionsContainer"
+                 class="actionsLContainer"
+                 layoutAlign="right">
+                <b>Actions</b><br/>
+                <input type="checkbox" name="actionview" id="actionview" dojoType="Checkbox" /> <label for="actionview">View</label><br />
+                <input type="checkbox" name="actionedit" id="actionedit" dojoType="Checkbox" /> <label for="actionedit">Edit</label><br />
+                <input type="checkbox" name="actionhelp" id="actionhelp" dojoType="Checkbox" /> <label for="actionhelp">Help</label><br />
+            </div>
+
+            <div dojoType="ContentPane"
+                 widgetId="rolesContainer"
+                 class="rolesLContainer"
+                 layoutAlign="client">
+
+                <b>Roles</b><br />
+                #foreach ($role in $roles)
+                <input type="checkbox" name="role_$velocityCount" id="role_$velocityCount" dojoType="Checkbox" /> <label for="role_$velocityCount">$role.Principal.Name</label><br />
+                #end
+
+            </div>
+
+
+        </div>
+
+        <div dojoType="dialog" id="SaveWarningDialog" bgColor="grey" bgOpacity="0.5" toggle="fade" toggleDuration="250">
+            <form onsubmit="return false;">
+                <table>
+                    <tr>
+                        <td>Please Save or Revert changes to the selected permissions record before proceeding.</td><td>&nbsp;</td>
+                    </tr>
+                    <tr>
+                        <td colspan="2" align="right" class="buttonboxright">
+                            <button dojoType="Button" onClick="dojo.widget.byId( 'SaveWarningDialog' ).hide();" >Cancel</button>
+                            <button dojoType="Button" onClick="dojo.widget.byId( 'SaveWarningDialog' ).hide(); revertEntry();">Revert</button>
+                            <button dojoType="Button" onClick="dojo.widget.byId( 'SaveWarningDialog' ).hide(); saveEntry();">Save</button>
+                        </td>
+                    </tr>
+                </table>
+            </form>
+        </div>
+
+    </div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+    rolePrincipals = new Array();
+#foreach ($role in $roles)
+    rolePrincipals.push( "$role.Principal.Name" );
+#end
+    actionNames = new Array();
+    actionNames.push( "view" );
+    actionNames.push( "edit" );
+    actionNames.push( "help" );
+</script>
+<script type="text/javascript">
+
+
+function processTableRowEvent(e, tableName)
+{
+    dojo.widget.byId( tableName ).processTableRowEvent( e );
+}
+
+function clearAndDisableEditor()
+{
+    var resourceTextBox = dojo.byId( "resourceName" );
+    if ( resourceTextBox )
+    {
+        resourceTextBox.value = "";
+        resourceTextBox.disabled = true;
+    }
+    for ( var i = 0 ; i < actionNames.length; i++ )
+    {
+        var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
+        if ( actionCheckbox )
+        {
+            actionCheckbox.checked = false;
+            actionCheckbox.disabled = true;
+            actionCheckbox._setInfo();
+        }
+    }
+    for ( var i = 0 ; i < rolePrincipals.length; i++ )
+    {
+        var roleIndex = i + 1;
+        var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
+        if ( roleCheckbox )
+        {
+            roleCheckbox.checked = false;
+            roleCheckbox.disabled = true;
+            roleCheckbox._setInfo();
+        }
+    }
+
+    var buttonWidget = dojo.widget.byId( "newButton" );
+    if ( buttonWidget )
+        buttonWidget.setDisabled(false);
+
+    buttonWidget = dojo.widget.byId( "saveButton" );
+    if ( buttonWidget )
+        buttonWidget.setDisabled(true);
+
+    buttonWidget = dojo.widget.byId( "revertButton" );
+    if ( buttonWidget )
+        buttonWidget.setDisabled(true);
+
+    buttonWidget = dojo.widget.byId( "deleteButton" );
+    if ( buttonWidget )
+        buttonWidget.setDisabled(true);
+}
+
+function updateEditor( rowData )
+{
+    var resourceTextBox = dojo.byId( "resourceName" );
+    if ( rowData.__isNew )
+    {
+        resourceTextBox.disabled = false;
+    }
+    else
+    {
+        resourceTextBox.disabled = true;
+    }
+    resourceTextBox.value = rowData.name;
+
+    for ( var i = 0 ; i < actionNames.length; i++ )
+    {
+        var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
+        if ( actionCheckbox )
+        {
+            actionCheckbox.disabled = false;
+            actionCheckbox.checked = false;
+            actionCheckbox._setInfo();
+        }
+    }
+
+    var actionsList = rowData.actions.split( new RegExp( " *, *" ) );
+    if ( actionsList )
+    {
+        for ( var i = 0 ; i < actionsList.length ; i++ )
+        {
+            var actionCheckbox = dojo.widget.byId( "action" + actionsList[i] );
+            if ( actionCheckbox )
+            {
+                actionCheckbox.checked = true;
+                actionCheckbox._setInfo();
+            }
+        }
+    }
+
+    for ( var i = 0 ; i < rolePrincipals.length; i++ )
+    {
+        var roleIndex = i + 1;
+        var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
+        roleCheckbox.disabled = false;
+        roleCheckbox.checked = false;
+        roleCheckbox._setInfo();
+    }
+    var rolesList = rowData.roles.split( new RegExp( " *, *" ) );
+    if ( rolesList )
+    {
+        for ( var i = 0 ; i < rolesList.length ; i++ )
+        {
+            var tRole = rolesList[i];
+            for ( var j = 0 ; j < rolePrincipals.length; j++ )
+            {
+                if ( tRole == rolePrincipals[j] )
+                {
+                    var roleIndex = j + 1;
+                    var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
+                    if ( roleCheckbox )
+                    {
+                        roleCheckbox.checked = true;
+                        roleCheckbox._setInfo();
+                    }
+                }
+            }
+        }
+    }
+
+    updateEditorControls();
+}
+function getTableWidget( containedInTab )
+{
+    if ( ! containedInTab )
+        containedInTab = dojo.widget.byId( "permsTabContainer" ).selectedChildWidget;
+    return dojo.widget.byId( containedInTab.widgetId + "Table" );
+}
+function checkForChanges()
+{
+    var tTableWidget = getTableWidget();
+    return tTableWidget.checkForChanges();
+}
+function updateSelectedRow()
+{
+    var tTableWidget = getTableWidget();
+    var selectedRowData = tTableWidget.getSelectedRow() ;
+    if ( selectedRowData != null )
+    {
+        selectedRowData.name = dojo.byId( "resourceName" ).value;
+
+        var updatedActions = "";
+        for ( var i = 0 ; i < actionNames.length; i++ )
+        {
+            var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
+            if ( actionCheckbox && actionCheckbox.checked )
+            {
+                if ( updatedActions.length > 0 )
+                    updatedActions += ", ";
+                updatedActions += actionNames[i];
+            }
+        }
+        selectedRowData.actions = updatedActions;
+
+        var updatedRoles = "";
+        for ( var i = 0 ; i < rolePrincipals.length; i++ )
+        {
+            var roleIndex = i + 1;
+            var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
+            if ( roleCheckbox && roleCheckbox.checked )
+            {
+                if ( updatedRoles.length > 0 )
+                    updatedRoles += ",";
+                updatedRoles += rolePrincipals[i];
+            }
+        }
+        selectedRowData.roles = updatedRoles;
+        
+        tTableWidget.updateClonedData( selectedRowData, tTableWidget.selected[0] );
+
+        tTableWidget.render(true);
+        tTableWidget.showSelections();
+
+        updateEditorControls();
+    }
+}
+
+function updateEditorControls()
+{
+    var hasChanged = checkForChanges();
+    if ( hasChanged )
+    {
+        var buttonWidget = dojo.widget.byId( "saveButton" );
+        if ( buttonWidget )
+            buttonWidget.setDisabled(false);
+
+        buttonWidget = dojo.widget.byId( "revertButton" );
+        if ( buttonWidget )
+        {
+            if ( hasChanged == "modified" )
+            {
+                buttonWidget.setDisabled(false);
+            }
+            else
+            {
+                buttonWidget.setDisabled(true);
+            }
+        }
+
+        buttonWidget = dojo.widget.byId( "newButton" );
+        if ( buttonWidget )
+            buttonWidget.setDisabled(true);
+
+        buttonWidget = dojo.widget.byId( "deleteButton" );
+        if ( buttonWidget )
+        {
+            if ( hasChanged == "modified" )
+            {
+                buttonWidget.setDisabled(true);
+            }
+            else
+            {
+                buttonWidget.setDisabled(false);
+            }
+        }
+    }
+    else
+    {
+        var buttonWidget = dojo.widget.byId( "saveButton" );
+        if ( buttonWidget )
+            buttonWidget.setDisabled(true);
+
+        buttonWidget = dojo.widget.byId( "revertButton" );
+        if ( buttonWidget )
+            buttonWidget.setDisabled(true);
+
+        buttonWidget = dojo.widget.byId( "newButton" );
+        if ( buttonWidget )
+            buttonWidget.setDisabled(false);
+
+        buttonWidget = dojo.widget.byId( "deleteButton" );
+        if ( buttonWidget )
+            buttonWidget.setDisabled(false);
+    }
+}
+
+
+
+// http://localhost:8080/jetspeed/ajaxapi?action=permissions&method=add&type=portlet&resource=demo::*&roles=role1,role2,role3&actions=view,edit
+// http://localhost:8080/jetspeed/ajaxapi?action=permissions&method=update&type=portlet&resource=jsf-demo%3A%3A*&roles=admin%2Cuser%2Csubsite2&actions=view%2C%20edit&oldactions=view%2C%20edit xml-content=<js><status>failure</status><action>unknown</action></js>
+
+
+function saveEntrySubmit( selectedRowData, removeEntry )
+{
+    var tTableWidget = getTableWidget();
+
+    if ( ! selectedRowData ) { dojo.raise( "saveEntrySubmit can't find selectedRowData" ) ; return; }
+
+    var masterData = tTableWidget.getData( tTableWidget.js_masterdata, selectedRowData.Id );
+    if ( ! masterData ) { dojo.raise( "saveEntrySubmit can't find masterdata" ) ; return; } 
+
+    var contextPath = document.location.protocol + "/" + "/" + document.location.host + "$req.ContextPath";
+    var requestUrl = contextPath + "/ajaxapi?action=permissions" ;
+
+    if ( removeEntry )
+    {
+        requestUrl += "&method=remove";
+    }
+    else if ( tTableWidget.entryIsNew( selectedRowData ) )
+    {
+        requestUrl += "&method=add";
+    }
+    else
+    {
+        requestUrl += "&method=update";
+    }
+    requestUrl += "&type=" + tTableWidget.js_type;
+    
+    requestUrl += "&resource=" + encodeURIComponent( selectedRowData.name );
+    requestUrl += "&roles=" + encodeURIComponent( selectedRowData.roles );
+    requestUrl += "&actions=" + encodeURIComponent( selectedRowData.actions );
+    requestUrl += "&oldactions=" + encodeURIComponent( masterData.actions );
+    
+    var mimeType = "text/xml";
+    dojo.io.bind({
+
+        url: requestUrl,
+
+        mimetype: mimeType,
+
+        load: function( type, data, evt )
+        {
+            var success = false;
+            var statusElmt = data.getElementsByTagName( "status" );
+            if ( statusElmt != null )
+            {
+                var successVal = statusElmt[0].firstChild.nodeValue;
+                if ( successVal == "success" )
+                    success = true;
+            }
+            if ( ! success )
+            {
+                var textContent = dojo.dom.innerXML( data );
+                if ( ! textContent )
+                    textContent = ( data != null ? "!= null (IE no XMLSerializer)" : "null" );
+                dojo.raise( "saveEntrySubmit failure url=" + requestUrl + "  xml-content=" + textContent );
+            }
+        },
+
+        error: function( type, error )
+        {
+            dojo.raise( "saveEntrySubmit failure url=" + requestUrl + " type=" + type + " error=" + error ) ;
+        }
+    });     
+};
+
+function newEntry()
+{
+    var tTableWidget = getTableWidget();
+    tTableWidget.newEntry();
+}
+function getNewEntryPrototype()
+{
+    return { name: "", actions: "", roles: "" };
+}
+
+function deleteEntry()
+{
+    var tTableWidget = getTableWidget();
+    tTableWidget.deleteEntry();
+}
+function saveEntry()
+{
+    var tTableWidget = getTableWidget();
+    tTableWidget.saveEntry();
+}
+
+function revertEntry()
+{
+    var tTableWidget = getTableWidget();
+    tTableWidget.revertEntry();
+}
+
+function okToChangeSelectionOrExit(invocation)
+{
+    var tTableWidget = getTableWidget();
+    return tTableWidget.okToChangeSelectionOrExit(invocation);
+}
+
+function dojoDebugCurrentTableData()
+{
+    dojo.debug( debugCurrentTableData() );
+}
+function alertDebugCurrentTableData()
+{
+    alert( debugCurrentTableData() );
+}
+function debugCurrentTableData()
+{
+    var tTableWidget = getTableWidget();
+    return tTableWidget.debugTableData();
+}
+
+function addListeners()
+{
+    var tabContainer = dojo.widget.byId("permsTabContainer");
+    dojo.event.connect("around", tabContainer, "selectChild", function(invocation) {
+        if ( checkForChanges() )
+        {
+            dojo.widget.byId( "SaveWarningDialog" ).show();
+            return;
+        }
+        invocation.proceed();
+        var tab = invocation.args[0];
+        var tTableWidget = getTableWidget( tab );
+        var selectedRowData = tTableWidget.getSelectedRow();
+    
+        if ( ! selectedRowData )
+        {
+            clearAndDisableEditor();
+        }
+        else
+        {
+            tTableWidget.showSelections();
+            updateEditor( selectedRowData );
+        }
+    });
+
+    var portletsTable = dojo.widget.byId("portletsTable");
+    dojo.event.connect( "around", portletsTable, "onUISelect", "okToChangeSelectionOrExit" );
+    dojo.event.connect(portletsTable, "onSelect", function(e) {
+        processTableRowEvent(e, "portletsTable");
+    });
+    dojo.event.connect(portletsTable, "updateEditor", updateEditor );
+    dojo.event.connect(portletsTable, "saveEntrySubmit", saveEntrySubmit );
+    dojo.event.connect(portletsTable, "clearAndDisableEditor", clearAndDisableEditor );
+    portletsTable.getNewEntryPrototype = getNewEntryPrototype;
+    var data = [] ;
+#foreach($p in $portletPermissions)
+    data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
+#end
+    portletsTable.js_masterdata = data;
+    portletsTable.js_type = "portlet";
+    portletsTable.saveWarningDialogWidgetId = "SaveWarningDialog";
+    portletsTable.parseData( portletsTable.js_masterdata );
+    portletsTable.render( true );
+    
+    
+    var foldersTable = dojo.widget.byId("foldersTable");
+    dojo.event.connect( "around", foldersTable, "onUISelect", "okToChangeSelectionOrExit" );
+    dojo.event.connect(foldersTable, "onSelect", function(e) {
+        //dojo.debugShallow( e.currentTarget );
+        processTableRowEvent(e, "foldersTable");
+    });
+    dojo.event.connect(foldersTable, "updateEditor", updateEditor );
+    dojo.event.connect(foldersTable, "saveEntrySubmit", saveEntrySubmit );
+    dojo.event.connect(foldersTable, "clearAndDisableEditor", clearAndDisableEditor );
+    foldersTable.getNewEntryPrototype = getNewEntryPrototype;
+    
+    data = [] ;
+#foreach($p in $folderPermissions)
+    data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
+#end
+    foldersTable.js_masterdata = data;
+    foldersTable.js_type = "folder";
+    foldersTable.saveWarningDialogWidgetId = "SaveWarningDialog";
+    foldersTable.parseData( data );
+    foldersTable.render( true );
+
+    var pagesTable = dojo.widget.byId("pagesTable");
+    dojo.event.connect( "around", pagesTable, "onUISelect", "okToChangeSelectionOrExit" );
+    dojo.event.connect(pagesTable, "onSelect", function(e) {
+        //dojo.debugShallow( e.currentTarget );
+        processTableRowEvent(e, "pagesTable");
+    });
+    dojo.event.connect(pagesTable, "updateEditor", updateEditor );
+    dojo.event.connect(pagesTable, "saveEntrySubmit", saveEntrySubmit );
+    dojo.event.connect(pagesTable, "clearAndDisableEditor", clearAndDisableEditor );
+    pagesTable.getNewEntryPrototype = getNewEntryPrototype;
+    data = [] ;
+#foreach($p in $pagePermissions)
+    data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
+#end
+    pagesTable.js_masterdata = data;
+    pagesTable.js_type = "page";
+    pagesTable.saveWarningDialogWidgetId = "SaveWarningDialog";
+    pagesTable.parseData( data );
+    pagesTable.render( true );
+
+    for ( var i = 0 ; i < actionNames.length; i++ )
+    {
+        var actionCheckbox = dojo.widget.byId( "action" + actionNames[i] );
+        if ( actionCheckbox )
+        {
+            dojo.event.connect(actionCheckbox, "onClick", function() {
+                if(!actionCheckbox.disabled){
+                    updateSelectedRow();
+                }
+            });
+        }
+    }
+    for ( var i = 0 ; i < rolePrincipals.length; i++ )
+    {
+        var roleIndex = i + 1;
+        var roleCheckbox = dojo.widget.byId( "role_" + roleIndex );
+        if ( roleCheckbox )
+        {
+            dojo.event.connect(roleCheckbox, "onClick", function() {
+                if(!roleCheckbox.disabled){
+                    updateSelectedRow();
+                }
+            });
+        }
+    }
+
+    clearAndDisableEditor();
+}
+
+
+dojo.addOnLoad( window.addListeners );
+</script>

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/portlet-selector.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/portlet-selector.vm?rev=592829&r1=592828&r2=592829&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/portlet-selector.vm (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/selectors/portlet-selector.vm Wed Nov  7 09:58:01 2007
@@ -1,278 +1,278 @@
-#*
+#*
 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.
-*#
-
-#**
-
-@author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
-@version $Id: portlet-selector.vm 348264 2005-11-22 22:06:45Z taylor $
-
-*#
-
-<script language="JavaScript" type="text/javascript">
-    <!--
-    function select(value)
-    {
-        var openerForm = opener.document.forms['portletform'];
-        var openerEl = openerForm.elements['portlets'];
-        window.close();
-    }
-	function rowHover(row)
-	{
-		row.oldClassName = row.className;
-	    row.className = 'jetdbLight';
-	    row.onmouseout = function()
-	    {
-	        this.className = this.oldClassName;
-	    }
-	}    
-	function collectChecks(outform) 
-	{
-		var result = "";
-		var noncheckedresult = "";
-		var userform = document.forms['userform'];
-		for(var i = 0; i < userform.length; i++)
-		{
-		   var e = userform.elements[i];
-		   if (e.type == "checkbox")
-		   {
-		       if (e.checked == true)
-		       {
-		       	   result = result + "," + e.name;
-		       } else 
-		       {
-		       	   noncheckedresult = noncheckedresult + "," + e.name;
-		       }
-		   }
-		}
-		// adding the ones NOT on this particular form
-		result = userform.allTheCheckedString.value + result;
-		outform.checkedSet.value = result;
-		outform.unCheckedSet.value = noncheckedresult;
-	}
-	
-	
-	
-	function eliminateDuplicates(instr) 
-	{
-		var dicta = new Object;
-		var anarray = instr.split(",");
-		for(var i=0; i<anarray.length; i++)
-         {
-         	dicta[anarray[i]]= anarray[i];
-         }
-         var uniques = new Array;
-         for (var k in dicta) {
-   			uniques.push(dicta[k]);
-   		 }
-   		return uniques.join(",");
-	}
-	
-	function sendChecks(form)
-	{
-		var result = "";
-		for(var i = 0; i < form.length; i++)
-		{
-		   var e = form.elements[i];
-		   if (e.type == "checkbox")
-		   {
-		       if (e.checked == true)
-		       {
-		       	   result = result + "," + e.name;
-		       }
-		   }
-		}
-		
-		result = form.allTheCheckedString.value + result;
-	    result = eliminateDuplicates(result);
-        var openerForm = opener.document.forms['portletform'];
-        var openerEl = openerForm.elements['portlets'];
-        openerEl.value = result;
-        window.close();
-        openerForm.submit();		
-	}
-    //-->
-</script>
-
-<!-- search area -->
-  	<table><tr>
-		<form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
-		<td>
-		<input type="text" name="searchString" size="40" value="$!searchString" class="portlet-form-field-label">    
-		<table>
-			<tr>
-			    <td nowrap class="portlet-section-alternate" align="right">Keyword search:&nbsp;</td>
-			    <td class="portlet-section-alternate" align="left" >	
-			    		<input type="checkbox"  #if($filtered == "on") checked=1 #end name="filtered">&nbsp;&nbsp;&nbsp;
-				</td>
-				<td>
-			    <input type='hidden' name="checkedSet" value = '' /> 
-			    <input type='hidden' name="unCheckedSet" value = '' /> 
-			    <input type='hidden' name='db.browser.action' value='search'/>                    
-			  	<input type='hidden' name='searchColumn' value='1'/>                      	
-			    <input class="jetdbButton" type="submit" value="Search">
-				</td>
-			</tr>
-		</table>
-	</form>
-    </td>
-		<td>		
-	  	
-          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
-          	<input type='hidden' name='db.browser.action' value='refresh'/>
-            <input type='hidden' name="checkedSet" value = '' />                    
-            <input type='hidden' name="unCheckedSet" value = '' /> 
-			    <input  type="submit" name="eventSubmit_doRefresh" value="Reset Search" />
-            <!-- class="jetdbButton"  too narrow to use -->
-          </form>
-    
-	</td>
-	</tr>
-	</table>
-<hr/>
-<!-- navigation controls -->
-<table width="200" border="0" cellspacing="0" cellpadding="0" align="center">
-  <tr>
-    #if ($prev)
-      <td valign="middle" height="30">
-        <div align="center">
-          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
-          	<input type='hidden' name='db.browser.action' value='first' />                    
-            <input type='hidden' name="checkedSet" value = '' />                    
-            <input type='hidden' name="unCheckedSet" value = '' /> 
-			    <input class="jetdbButton" type="submit" value="<<">
-            <input type="hidden" name="start" value="0">
-          </form>
-        </div>
-      </td>  
-      <td valign="middle" height="30">
-        <div align="center">
-          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
-          	<input type='hidden' name='db.browser.action' value='prev'/>                    
-            <input type='hidden' name="checkedSet" value = '' />                    
-            <input type='hidden' name="unCheckedSet" value = '' /> 
-			    <input class="jetdbButton" type="submit" value="<">
-            <input type="hidden" name="start" value="$prev">
-          </form>
-        </div>
-      </td>
-    #end
-    #if ($tableSize > 0)
-      <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
-      <td valign="middle" height="30">
-        <div align="center">
-          	<input type='hidden' name='db.browser.action' value='change'/>                    
-            <input type='hidden' name="checkedSet" value = '' />                    
-            <input type='hidden' name="unCheckedSet" value = '' /> 
-			<input type="input" name='start' size='5' value="$start" class="portlet-form-field-label">
-        </div>
-      </td>  
-      <td valign="middle" height="30">
-        <div align="center">
-            <input type="input" readonly size='10' value="of $tableSize" class="portlet-form-field-label">            
-        </div>
-      </td>  
-      <td valign="middle" height="30">
-        <div align="center">
-            <input class="jetdbButton" type="submit" value="Go">            
-        </div>
-      </td>  
-
-      </form>
-
-      
-    #end    
-    #if ($next)
-      <td valign="middle">
-        <div align="center">
-          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
-          	<input type='hidden' name='db.browser.action' value='next'/>          
-            <input type='hidden' name="checkedSet" value = '' />                    
-            <input type='hidden' name="unCheckedSet" value = '' /> 
-			    <input class="jetdbButton" type="submit" value=">">
-            <input type="hidden" name="start" value="$next">
-          </form>
-        </div>
-      </td>
-      <td valign="middle" height="30">
-        <div align="center">
-          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
-          	<input type='hidden' name='db.browser.action' value='last'/>
-          	<input type='hidden' name="checkedSet" value = '' />                    
-            <input type='hidden' name="unCheckedSet" value = '' /> 
-			    <input class="jetdbButton" type="submit" value=">>">
-            <input type="hidden" name="start" value="$tableSize">
-          </form>
-        </div>
-      </td>  
-    #end
-  </tr>
-</table>
-
-<hr/>
-
-<!-- the rows of portlets -->
-#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
-<form name='userform' onSubmit='sendChecks(this)'/>
-<input type='hidden' name='allTheCheckedString' value='$!selectedPortletsString' />
-<table cellpadding=0 cellspacing=1 border=0 width='100%' >
-  <tr>
-    #foreach ($column in $title)    
-      <td align='center' class="jetdbHeadNoLink" nowrap>
-        $column
-      </td>
-    #end
-      <th class="jetdbHeadNoLink" width="10"></th>        
-  </tr>
-
-  <!--  onmouseover="rowHover(this)" this mouseover used to be in use.. but it's only for cells not UI decent.  -->
-  #foreach ( $portlet in $table )
-  <tr  >
-    #if ($velocityCount % 2 == 0)
-       #set($rowstyle = "jetdbEven")
-    #else
-       #set($rowstyle = "jetdbOdd")
-    #end   
-      <td class="$rowstyle" width="40%" >
-        <div align="left">$!portlet.DisplayName</div>
-      </td>
-      <td class="$rowstyle" width="55%" >
-        <div align="left">$!portlet.Description</div>
-      </td>      
-	  <td class="$rowstyle" width="10">
-  	    <input type="checkbox" name="box_$portlet.Name" 
-  	    #if( $selectedPortlets.contains($portlet.Name) )
-  	    		CHECKED
-  	    #end
-  	    />
-	  </td>    
-   </tr>
-  #end
-
-<tr>
-	<td colspan="3" align="center" >
-		<input type="submit" name="select.portlets" value="Select Portlets"   />
- 		<!-- class="jetdbButton"  too narrow to use-->
- 		<input type='hidden' name='searchColumn' value='1'/>
- 	</td>
-
- </tr>                      	
-</table>
- 
-</form>
-
-
-
+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.
+*#
+
+#**
+
+@author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
+@version $Id: portlet-selector.vm 348264 2005-11-22 22:06:45Z taylor $
+
+*#
+
+<script language="JavaScript" type="text/javascript">
+    <!--
+    function select(value)
+    {
+        var openerForm = opener.document.forms['portletform'];
+        var openerEl = openerForm.elements['portlets'];
+        window.close();
+    }
+	function rowHover(row)
+	{
+		row.oldClassName = row.className;
+	    row.className = 'jetdbLight';
+	    row.onmouseout = function()
+	    {
+	        this.className = this.oldClassName;
+	    }
+	}    
+	function collectChecks(outform) 
+	{
+		var result = "";
+		var noncheckedresult = "";
+		var userform = document.forms['userform'];
+		for(var i = 0; i < userform.length; i++)
+		{
+		   var e = userform.elements[i];
+		   if (e.type == "checkbox")
+		   {
+		       if (e.checked == true)
+		       {
+		       	   result = result + "," + e.name;
+		       } else 
+		       {
+		       	   noncheckedresult = noncheckedresult + "," + e.name;
+		       }
+		   }
+		}
+		// adding the ones NOT on this particular form
+		result = userform.allTheCheckedString.value + result;
+		outform.checkedSet.value = result;
+		outform.unCheckedSet.value = noncheckedresult;
+	}
+	
+	
+	
+	function eliminateDuplicates(instr) 
+	{
+		var dicta = new Object;
+		var anarray = instr.split(",");
+		for(var i=0; i<anarray.length; i++)
+         {
+         	dicta[anarray[i]]= anarray[i];
+         }
+         var uniques = new Array;
+         for (var k in dicta) {
+   			uniques.push(dicta[k]);
+   		 }
+   		return uniques.join(",");
+	}
+	
+	function sendChecks(form)
+	{
+		var result = "";
+		for(var i = 0; i < form.length; i++)
+		{
+		   var e = form.elements[i];
+		   if (e.type == "checkbox")
+		   {
+		       if (e.checked == true)
+		       {
+		       	   result = result + "," + e.name;
+		       }
+		   }
+		}
+		
+		result = form.allTheCheckedString.value + result;
+	    result = eliminateDuplicates(result);
+        var openerForm = opener.document.forms['portletform'];
+        var openerEl = openerForm.elements['portlets'];
+        openerEl.value = result;
+        window.close();
+        openerForm.submit();		
+	}
+    //-->
+</script>
+
+<!-- search area -->
+  	<table><tr>
+        <td>
+		<form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
+		<input type="text" name="searchString" size="40" value="$!searchString" class="portlet-form-field-label">    
+		<table>
+			<tr>
+			    <td nowrap class="portlet-section-alternate" align="right">Keyword search:&nbsp;</td>
+			    <td class="portlet-section-alternate" align="left" >	
+			    		<input type="checkbox"  #if($filtered == "on") checked=1 #end name="filtered">&nbsp;&nbsp;&nbsp;
+				</td>
+				<td>
+			    <input type='hidden' name="checkedSet" value = '' /> 
+			    <input type='hidden' name="unCheckedSet" value = '' /> 
+			    <input type='hidden' name='db.browser.action' value='search'/>                    
+			  	<input type='hidden' name='searchColumn' value='1'/>                      	
+			    <input class="jetdbButton" type="submit" value="Search">
+				</td>
+			</tr>
+		</table>
+	    </form>
+        </td>
+		<td>		
+	  	
+          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
+          	<input type='hidden' name='db.browser.action' value='refresh'/>
+            <input type='hidden' name="checkedSet" value = '' />                    
+            <input type='hidden' name="unCheckedSet" value = '' /> 
+			    <input  type="submit" name="eventSubmit_doRefresh" value="Reset Search" />
+            <!-- class="jetdbButton"  too narrow to use -->
+          </form>
+    
+	</td>
+	</tr>
+	</table>
+<hr/>
+<!-- navigation controls -->
+<table width="200" border="0" cellspacing="0" cellpadding="0" align="center">
+  <tr>
+    #if ($prev)
+      <td valign="middle" height="30">
+        <div align="center">
+          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
+          	<input type='hidden' name='db.browser.action' value='first' />                    
+            <input type='hidden' name="checkedSet" value = '' />                    
+            <input type='hidden' name="unCheckedSet" value = '' /> 
+			    <input class="jetdbButton" type="submit" value="<<">
+            <input type="hidden" name="start" value="0">
+          </form>
+        </div>
+      </td>  
+      <td valign="middle" height="30">
+        <div align="center">
+          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
+          	<input type='hidden' name='db.browser.action' value='prev'/>                    
+            <input type='hidden' name="checkedSet" value = '' />                    
+            <input type='hidden' name="unCheckedSet" value = '' /> 
+			    <input class="jetdbButton" type="submit" value="<">
+            <input type="hidden" name="start" value="$prev">
+          </form>
+        </div>
+      </td>
+    #end
+    #if ($tableSize > 0)
+      <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
+      <td valign="middle" height="30">
+        <div align="center">
+          	<input type='hidden' name='db.browser.action' value='change'/>                    
+            <input type='hidden' name="checkedSet" value = '' />                    
+            <input type='hidden' name="unCheckedSet" value = '' /> 
+			<input type="input" name='start' size='5' value="$start" class="portlet-form-field-label">
+        </div>
+      </td>  
+      <td valign="middle" height="30">
+        <div align="center">
+            <input type="input" readonly size='10' value="of $tableSize" class="portlet-form-field-label">            
+        </div>
+      </td>  
+      <td valign="middle" height="30">
+        <div align="center">
+            <input class="jetdbButton" type="submit" value="Go">            
+        </div>
+      </td>  
+
+      </form>
+
+      
+    #end    
+    #if ($next)
+      <td valign="middle">
+        <div align="center">
+          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
+          	<input type='hidden' name='db.browser.action' value='next'/>          
+            <input type='hidden' name="checkedSet" value = '' />                    
+            <input type='hidden' name="unCheckedSet" value = '' /> 
+			    <input class="jetdbButton" type="submit" value=">">
+            <input type="hidden" name="start" value="$next">
+          </form>
+        </div>
+      </td>
+      <td valign="middle" height="30">
+        <div align="center">
+          <form action="$renderResponse.createActionURL()" method="post" onSubmit='collectChecks(this);return true;'>
+          	<input type='hidden' name='db.browser.action' value='last'/>
+          	<input type='hidden' name="checkedSet" value = '' />                    
+            <input type='hidden' name="unCheckedSet" value = '' /> 
+			    <input class="jetdbButton" type="submit" value=">>">
+            <input type="hidden" name="start" value="$tableSize">
+          </form>
+        </div>
+      </td>  
+    #end
+  </tr>
+</table>
+
+<hr/>
+
+<!-- the rows of portlets -->
+#set ($MESSAGES = $portletConfig.getResourceBundle($renderRequest.Locale))
+<form name='userform' onSubmit='sendChecks(this)'/>
+<input type='hidden' name='allTheCheckedString' value='$!selectedPortletsString' />
+<table cellpadding=0 cellspacing=1 border=0 width='100%' >
+  <tr>
+    #foreach ($column in $title)    
+      <td align='center' class="jetdbHeadNoLink" nowrap>
+        $column
+      </td>
+    #end
+      <th class="jetdbHeadNoLink" width="10"></th>        
+  </tr>
+
+  <!--  onmouseover="rowHover(this)" this mouseover used to be in use.. but it's only for cells not UI decent.  -->
+  #foreach ( $portlet in $table )
+  <tr  >
+    #if ($velocityCount % 2 == 0)
+       #set($rowstyle = "jetdbEven")
+    #else
+       #set($rowstyle = "jetdbOdd")
+    #end   
+      <td class="$rowstyle" width="40%" >
+        <div align="left">$!portlet.DisplayName</div>
+      </td>
+      <td class="$rowstyle" width="55%" >
+        <div align="left">$!portlet.Description</div>
+      </td>      
+	  <td class="$rowstyle" width="10">
+  	    <input type="checkbox" name="box_$portlet.Name" 
+  	    #if( $selectedPortlets.contains($portlet.Name) )
+  	    		CHECKED
+  	    #end
+  	    />
+	  </td>    
+   </tr>
+  #end
+
+<tr>
+	<td colspan="3" align="center" >
+		<input type="submit" name="select.portlets" value="Select Portlets"   />
+ 		<!-- class="jetdbButton"  too narrow to use-->
+ 		<input type='hidden' name='searchColumn' value='1'/>
+ 	</td>
+
+ </tr>                      	
+</table>
+ 
+</form>
+
+
+

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/site/sitemap.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/site/sitemap.vm?rev=592829&r1=592828&r2=592829&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/site/sitemap.vm (original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/applications/j2-admin/src/webapp/WEB-INF/view/site/sitemap.vm Wed Nov  7 09:58:01 2007
@@ -1,50 +1,52 @@
-#*
-  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.
-*#
-#set($site = $request.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext"))
-#set ($PropertiesValue = $portletConfig.getResourceBundle($renderRequest.Locale))
-#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
-#set($req = $rc.Request)
-#set($preferedLocale = "en")
-#set($navigationsStandardMenu = $site.getMenu("site-navigations"))
-
-<div id="contentsPageTitleContainer">
-<p class="contentsPageIntro"><b>$PropertiesValue.getString('IntroText')</b></p>
-
-<p style="margin-top: 25px"></p>
-</div><!-- Contents Main Container -->
-<div id="contentsMainContainer">
-
-#set($myVar =2)
-#set($childVar =1)
-#if(!$navigationsStandardMenu.empty)
-      <p class="mapaSiteTitle">1.  <a href="${req.ContextPath}/">HomePage</a></p>
-      <p class="contentsPageSep" style="margin: 15px 0 10px 0"></p>
-    #foreach($element in $navigationsStandardMenu.elements.iterator())
-        <p class="mapaSiteTitle">$myVar.  <a href="${req.ContextPath}/portal$element.url">$element.Title</a></p>
-        <p class="contentsPageSep" style="margin: 15px 0 10px 0"></p>
-        #if($element.elementType == "menu")
-            <ul class="mapaSiteListLevel1">
-            #set($childVar =1)
-               #foreach($childElement in $element.elements.iterator())
-                    <li>$myVar.$childVar <a href="${req.ContextPath}/portal$childElement.url">$childElement.Title</a></li>
-                    #set($childVar = $childVar+1)    
-               #end
-            </ul>
-         #end
-        #set($myVar = $myVar+1)
-    #end
-#end
+#*
+  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.
+*#
+#set($site = $request.getAttribute("org.apache.jetspeed.portalsite.PortalSiteRequestContext"))
+#set ($PropertiesValue = $portletConfig.getResourceBundle($renderRequest.Locale))
+#set($rc = $renderRequest.getAttribute("org.apache.jetspeed.request.RequestContext"))
+#set($req = $rc.Request)
+#set($preferedLocale = "en")
+#set($navigationsStandardMenu = $site.getMenu("site-navigations"))
+
+<div id="contentsPageTitleContainer">
+<p class="contentsPageIntro"><b>$PropertiesValue.getString('IntroText')</b></p>
+
+<p style="margin-top: 25px"></p>
+</div><!-- Contents Main Container -->
+<div id="contentsMainContainer"> <!-- B: div id contentsMainContainer -->
+
+#set($myVar =2)
+#set($childVar =1)
+#if(!$navigationsStandardMenu.empty)
+      <p class="mapaSiteTitle">1.  <a href="${req.ContextPath}/">HomePage</a></p>
+      <p class="contentsPageSep" style="margin: 15px 0 10px 0"></p>
+    #foreach($element in $navigationsStandardMenu.elements.iterator())
+        <p class="mapaSiteTitle">$myVar.  <a href="${req.ContextPath}/portal$element.url">$element.Title</a></p>
+        <p class="contentsPageSep" style="margin: 15px 0 10px 0"></p>
+        #if($element.elementType == "menu")
+            <ul class="mapaSiteListLevel1">
+            #set($childVar =1)
+               #foreach($childElement in $element.elements.iterator())
+                    <li>$myVar.$childVar <a href="${req.ContextPath}/portal$childElement.url">$childElement.Title</a></li>
+                    #set($childVar = $childVar+1)    
+               #end
+            </ul>
+         #end
+        #set($myVar = $myVar+1)
+    #end
+#end
+
+</div> <!-- E: div id contentsMainContainer -->
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message