Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 21762 invoked from network); 13 Mar 2010 15:10:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Mar 2010 15:10:56 -0000 Received: (qmail 88684 invoked by uid 500); 13 Mar 2010 15:10:15 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 88648 invoked by uid 500); 13 Mar 2010 15:10:15 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 88641 invoked by uid 99); 13 Mar 2010 15:10:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Mar 2010 15:10:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Mar 2010 15:10:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AC0B92388900; Sat, 13 Mar 2010 15:09:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r922580 - in /felix/trunk/webconsole/src/main: java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java resources/res/ui/config.js resources/templates/config.html Date: Sat, 13 Mar 2010 15:09:51 -0000 To: commits@felix.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100313150951.AC0B92388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fmeschbe Date: Sat Mar 13 15:09:51 2010 New Revision: 922580 URL: http://svn.apache.org/viewvc?rev=922580&view=rev Log: FELIX-569 Apply config-name_column-sorting.patch by Valentin Valchev (thanks) Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java felix/trunk/webconsole/src/main/resources/res/ui/config.js felix/trunk/webconsole/src/main/resources/templates/config.html Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java?rev=922580&r1=922579&r2=922580&view=diff ============================================================================== --- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java (original) +++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManagerBase.java Sat Mar 13 15:09:51 2010 @@ -124,7 +124,20 @@ abstract class ConfigManagerBase extends final String[] idList = idGetter.getIds( mti ); for ( int j = 0; idList != null && j < idList.length; j++ ) { - ObjectClassDefinition ocd = mti.getObjectClassDefinition( idList[j], locale ); + // After getting the list of PIDs, a configuration might be + // removed. So the getObjectClassDefinition will throw + // an exception, and this will prevent ALL configuration from + // being displayed. By catching it, the configurations will be + // visible + ObjectClassDefinition ocd = null; + try + { + ocd = mti.getObjectClassDefinition( idList[j], locale ); + } + catch (IllegalArgumentException ignore) + { + // ignore - just don't show this configuration + } if ( ocd != null ) { objectClasses.add( ocd ); @@ -189,7 +202,15 @@ abstract class ConfigManagerBase extends MetaTypeInformation mti = mts.getMetaTypeInformation( bundle ); if ( mti != null ) { - return mti.getObjectClassDefinition( pid, locale ); + // see #getObjectClasses( final IdGetter idGetter, final String locale ) + try + { + return mti.getObjectClassDefinition( pid, locale ); + } + catch (IllegalArgumentException e) + { + // ignore - return null + } } } } Modified: felix/trunk/webconsole/src/main/resources/res/ui/config.js URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/config.js?rev=922580&r1=922579&r2=922580&view=diff ============================================================================== --- felix/trunk/webconsole/src/main/resources/res/ui/config.js (original) +++ felix/trunk/webconsole/src/main/resources/res/ui/config.js Sat Mar 13 15:09:51 2010 @@ -426,8 +426,8 @@ function confirmUnbind(/* String */ titl function addConfig(conf) { var tr = configRow.clone().appendTo(configBody); - tr.find('td:eq(0)').text(conf.fpid ? conf.fpid : '-'); // fpid - tr.find('td:eq(1)').text(conf.name).click(function() { // name & edit + tr.find('td:eq(1)').text(conf.fpid ? conf.fpid : '-'); // fpid + tr.find('td:eq(0)').text(conf.name).click(function() { // name & edit configure(conf.id); }); tr.find('td:eq(2)').html(conf.bundle ? '' + conf.bundle_name + '' : '-'); // binding @@ -454,8 +454,8 @@ function addConfig(conf) { function addFactoryConfig(conf) { var tr = factoryRow.clone().appendTo(factoryBody); - tr.find('td:eq(0)').text(conf.id); // fpid - tr.find('td:eq(1)').text(conf.name).click(function() { // name & edit + tr.find('td:eq(1)').text(conf.id); // fpid + tr.find('td:eq(0)').text(conf.name).click(function() { // name & edit configure(conf.id, true); }); // buttons @@ -480,7 +480,7 @@ $(document).ready(function() { }); factoryBody = factoryTable.find('tbody'); factoryRow = factoryBody.find('tr').clone(); - + // setup button - cannot inline in dialog option because of i18n var _buttons = {}; _buttons[i18n.abort] = function() { @@ -511,6 +511,11 @@ $(document).ready(function() { for(var i in configData.pids) addConfig(configData.pids[i]); for(var i in configData.fpids) addFactoryConfig(configData.fpids[i]); initStaticWidgets(configContent); + + // initial sorting orger by name + var sorting = [[0,0]]; + configTable.trigger('sorton', [sorting]); + factoryTable.trigger('sorton', [sorting]); } else { configContent.addClass('ui-helper-hidden'); } Modified: felix/trunk/webconsole/src/main/resources/templates/config.html URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/templates/config.html?rev=922580&r1=922579&r2=922580&view=diff ============================================================================== --- felix/trunk/webconsole/src/main/resources/templates/config.html [UTF-8] (original) +++ felix/trunk/webconsole/src/main/resources/templates/config.html [UTF-8] Sat Mar 13 15:09:51 2010 @@ -39,17 +39,17 @@ var i18n = { // i18n - + - +
Factory PID NameFactory PID Bundle Actions
      
  •  
  • @@ -67,15 +67,15 @@ var i18n = { // i18n - + - +
    Factory PID NameFactory PID Actions
        
    •