karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ldywi...@apache.org
Subject svn commit: r1426499 [2/2] - in /karaf/webconsole/trunk: ./ assembly/src/main/resources/ camel/src/main/java/org/apache/karaf/webconsole/camel/internal/context/ core/ core/src/main/java/org/apache/karaf/webconsole/core/behavior/ core/src/main/java/org/...
Date Fri, 28 Dec 2012 13:15:07 GMT
Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/ImportServiceTable.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/ImportServiceTable.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/ImportServiceTable.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/ImportServiceTable.java
Fri Dec 28 13:15:06 2012
@@ -18,22 +18,22 @@ package org.apache.karaf.webconsole.osgi
 
 import java.util.Arrays;
 
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataTable;
 import org.apache.karaf.webconsole.osgi.core.service.column.ObjectClassColumn;
 import org.apache.karaf.webconsole.osgi.core.service.column.ServicePropertyColumn;
 import org.apache.karaf.webconsole.osgi.core.service.column.ServiceProviderColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
 import org.apache.wicket.model.Model;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.osgi.framework.ServiceReference;
 
-public class ImportServiceTable extends DefaultDataTable<ServiceReference> {
+public class ImportServiceTable extends BaseDataTable<ServiceReference> {
 
     private static final long serialVersionUID = 1L;
 
     @SuppressWarnings("unchecked")
-    private static IColumn<ServiceReference>[] columns = new IColumn[] {
+    private static IColumn<ServiceReference, String>[] columns = new IColumn[] {
         new ServicePropertyColumn("Service Id", Constants.SERVICE_ID),
         new ObjectClassColumn(Model.of("Object classes")),
         new ServiceProviderColumn(Model.of("Provider")),

Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ObjectClassColumn.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ObjectClassColumn.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ObjectClassColumn.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ObjectClassColumn.java
Fri Dec 28 13:15:06 2012
@@ -22,7 +22,7 @@ import org.apache.wicket.markup.repeater
 import org.apache.wicket.model.IModel;
 import org.osgi.framework.ServiceReference;
 
-public class ObjectClassColumn extends AbstractColumn<ServiceReference> {
+public class ObjectClassColumn extends AbstractColumn<ServiceReference, String> {
 
     private static final long serialVersionUID = 1L;
 

Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ServiceProviderColumn.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ServiceProviderColumn.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ServiceProviderColumn.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/column/ServiceProviderColumn.java
Fri Dec 28 13:15:06 2012
@@ -22,7 +22,7 @@ import org.apache.wicket.markup.repeater
 import org.apache.wicket.model.IModel;
 import org.osgi.framework.ServiceReference;
 
-public class ServiceProviderColumn extends AbstractColumn<ServiceReference> {
+public class ServiceProviderColumn extends AbstractColumn<ServiceReference, String>
{
 
     private static final long serialVersionUID = 1L;
 

Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/list/ServicePage.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/list/ServicePage.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/list/ServicePage.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/service/list/ServicePage.java
Fri Dec 28 13:15:06 2012
@@ -19,13 +19,13 @@ package org.apache.karaf.webconsole.osgi
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataTable;
 import org.apache.karaf.webconsole.osgi.core.service.column.ObjectClassColumn;
 import org.apache.karaf.webconsole.osgi.core.service.column.ServiceConsumerColumn;
 import org.apache.karaf.webconsole.osgi.core.service.column.ServicePropertyColumn;
 import org.apache.karaf.webconsole.osgi.core.service.column.ServiceProviderColumn;
 import org.apache.karaf.webconsole.osgi.core.shared.OsgiPage;
 import org.apache.karaf.webconsole.osgi.core.shared.ServiceDataProvider;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
 import org.apache.wicket.model.Model;
 import org.ops4j.pax.wicket.api.PaxWicketMountPoint;
@@ -41,13 +41,13 @@ public class ServicePage extends OsgiPag
     private static final long serialVersionUID = 1L;
 
     public ServicePage() {
-        List<IColumn<ServiceReference>> columns = new ArrayList<IColumn<ServiceReference>>();
+        List<IColumn<ServiceReference, String>> columns = new ArrayList<IColumn<ServiceReference,
String>>();
         columns.add(new ServicePropertyColumn("Service Id", Constants.SERVICE_ID));
         columns.add(new ObjectClassColumn(Model.of("Object classes")));
         columns.add(new ServiceProviderColumn(Model.of("Provider")));
         columns.add(new ServiceConsumerColumn("Consumers"));
 
-        add(new DefaultDataTable<ServiceReference>("services", columns, new ServiceDataProvider(context,
(String) null), Integer.MAX_VALUE));
+        add(new BaseDataTable<ServiceReference>("services", columns, new ServiceDataProvider(context,
(String) null), Integer.MAX_VALUE));
     }
 
 }

Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/BundleDataProvider.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/BundleDataProvider.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/BundleDataProvider.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/BundleDataProvider.java
Fri Dec 28 13:15:06 2012
@@ -20,7 +20,7 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataProvider;
 import org.apache.wicket.model.IModel;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -28,7 +28,7 @@ import org.osgi.framework.BundleContext;
 /**
  * Data provider to which lists all installed bundles.
  */
-public class BundleDataProvider extends SortableDataProvider<Bundle> {
+public class BundleDataProvider extends BaseDataProvider<Bundle> {
 
     private static final long serialVersionUID = 1L;
     private BundleContext context;
@@ -37,17 +37,17 @@ public class BundleDataProvider extends 
         this.context = context;
     }
 
-    public Iterator<? extends Bundle> iterator(int first, int count) {
+    public Iterator<? extends Bundle> iterator(long first, long count) {
         List<Bundle> bundles = Arrays.asList(context.getBundles());
 
-        return bundles.subList(first, first + count).iterator();
+        return bundles.subList((int) first, (int) first + (int) count).iterator();
     }
 
     public IModel<Bundle> model(Bundle object) {
         return new BundleModel(context, object);
     }
 
-    public int size() {
+    public long size() {
         return context.getBundles().length;
     }
 

Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceDataProvider.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceDataProvider.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceDataProvider.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceDataProvider.java
Fri Dec 28 13:15:06 2012
@@ -21,7 +21,7 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataProvider;
 import org.apache.wicket.model.IModel;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
@@ -32,7 +32,7 @@ import org.osgi.framework.ServiceReferen
  * given criteria.
  * <strong>The service list might be outdated before model is used!</strong>
  */
-public class ServiceDataProvider extends SortableDataProvider<ServiceReference> {
+public class ServiceDataProvider extends BaseDataProvider<ServiceReference> {
 
     private static final long serialVersionUID = 1L;
 
@@ -81,16 +81,16 @@ public class ServiceDataProvider extends
         this(context, clazz.getName());
     }
 
-    // provide methods
-    public Iterator<? extends ServiceReference> iterator(int first, int count) {
-        return services.subList(first, count).iterator();
+    // provider methods
+    public Iterator<? extends ServiceReference> iterator(long first, long count) {
+        return services.subList((int) first, (int) count).iterator();
     }
 
     public IModel<ServiceReference> model(ServiceReference object) {
         return new ServiceReferenceModel(object);
     }
 
-    public int size() {
+    public long size() {
         return services.size();
     }
 

Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceReferenceModel.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceReferenceModel.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceReferenceModel.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/ServiceReferenceModel.java
Fri Dec 28 13:15:06 2012
@@ -36,6 +36,7 @@ public class ServiceReferenceModel exten
     }
 
     public ServiceReferenceModel(ServiceReference object, Bundle bundle) {
+        super(object);
         this.bundle = bundle;
         serviceId = (Long) object.getProperty(Constants.SERVICE_ID);
     }

Modified: karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/spi/IColumnProvider.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/spi/IColumnProvider.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/spi/IColumnProvider.java
(original)
+++ karaf/webconsole/trunk/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/spi/IColumnProvider.java
Fri Dec 28 13:15:06 2012
@@ -21,6 +21,6 @@ import org.osgi.framework.Bundle;
 
 public interface IColumnProvider {
 
-    IColumn<Bundle> getColumn();
+    IColumn<Bundle, String> getColumn();
 
 }

Copied: karaf/webconsole/trunk/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/wicket-package.properties
(from r1426495, karaf/webconsole/trunk/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/package.properties)
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/wicket-package.properties?p2=karaf/webconsole/trunk/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/wicket-package.properties&p1=karaf/webconsole/trunk/osgi/core/src/main/resources/org/apache/karaf/webconsole/osgi/core/package.properties&r1=1426495&r2=1426499&rev=1426499&view=diff
==============================================================================
    (empty)

Modified: karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/EventsPage.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/EventsPage.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/EventsPage.java
(original)
+++ karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/EventsPage.java
Fri Dec 28 13:15:06 2012
@@ -21,10 +21,10 @@ import java.util.List;
 
 import org.apache.karaf.webconsole.core.table.OrdinalColumn;
 import org.apache.karaf.webconsole.core.table.PropertyColumnExt;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataTable;
 import org.apache.karaf.webconsole.osgi.core.shared.OsgiPage;
 import org.apache.karaf.webconsole.osgi.event.model.EventTopicInfo;
 import org.apache.karaf.webconsole.osgi.event.model.EventTopicsProvider;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
 import org.ops4j.pax.wicket.api.PaxWicketMountPoint;
 
@@ -37,12 +37,12 @@ public class EventsPage extends OsgiPage
     private static final long serialVersionUID = 1L;
 
     public EventsPage() {
-        List<IColumn<EventTopicInfo>> columns = new ArrayList<IColumn<EventTopicInfo>>();
+        List<IColumn<EventTopicInfo, String>> columns = new ArrayList<IColumn<EventTopicInfo,
String>>();
         columns.add(new OrdinalColumn<EventTopicInfo>());
         columns.add(new PropertyColumnExt<EventTopicInfo>("Topic", "topic"));
         columns.add(new PropertyColumnExt<EventTopicInfo>("Number of consumers", "consumers"));
 
-        add(new DefaultDataTable<EventTopicInfo>("topics", columns, new EventTopicsProvider(context),
100));
+        add(new BaseDataTable<EventTopicInfo>("topics", columns, new EventTopicsProvider(context),
100));
     }
 
 }

Modified: karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/model/EventTopicsProvider.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/model/EventTopicsProvider.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/model/EventTopicsProvider.java
(original)
+++ karaf/webconsole/trunk/osgi/event/src/main/java/org/apache/karaf/webconsole/osgi/event/model/EventTopicsProvider.java
Fri Dec 28 13:15:06 2012
@@ -20,7 +20,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataProvider;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.osgi.framework.BundleContext;
@@ -32,7 +32,7 @@ import org.osgi.service.event.EventHandl
 /**
  * Simple data provider which collects topic names from a registered listeners.
  */
-public class EventTopicsProvider  extends SortableDataProvider<EventTopicInfo> {
+public class EventTopicsProvider  extends BaseDataProvider<EventTopicInfo> {
 
     private static final long serialVersionUID = 1L;
 
@@ -69,11 +69,11 @@ public class EventTopicsProvider  extend
         topics.get(topic).addConsumer();
     }
 
-    public Iterator<? extends EventTopicInfo> iterator(int first, int count) {
+    public Iterator<? extends EventTopicInfo> iterator(long first, long count) {
         return topics.values().iterator();
     }
 
-    public int size() {
+    public long size() {
         return topics.size();
     }
 

Modified: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java
(original)
+++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogEntriesDataProvider.java
Fri Dec 28 13:15:06 2012
@@ -21,8 +21,8 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataProvider;
 import org.apache.karaf.webconsole.osgi.log.search.Matcher;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
 import org.apache.wicket.model.IModel;
 import org.osgi.service.log.LogEntry;
 import org.osgi.service.log.LogReaderService;
@@ -30,7 +30,7 @@ import org.osgi.service.log.LogReaderSer
 /**
  * Data provider for log table.
  */
-final class LogEntriesDataProvider extends SortableDataProvider<LogEntry> {
+final class LogEntriesDataProvider extends BaseDataProvider<LogEntry> {
 
     private static final long serialVersionUID = 1L;
 
@@ -48,8 +48,8 @@ final class LogEntriesDataProvider exten
         this.matchers = matchers;
     }
 
-    public Iterator<? extends LogEntry> iterator(int first, int count) {
-        return getEntries().subList(first, first + count).iterator();
+    public Iterator<? extends LogEntry> iterator(long first, long count) {
+        return getEntries().subList((int) first, (int) first + (int) count).iterator();
     }
 
     private List<LogEntry> getEntries() {
@@ -78,7 +78,7 @@ final class LogEntriesDataProvider exten
         return new LogEntryModel(this.logReader, object);
     }
 
-    public int size() {
+    public long size() {
         return getEntries().size();
     }
 

Modified: karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java
(original)
+++ karaf/webconsole/trunk/osgi/log/src/main/java/org/apache/karaf/webconsole/osgi/log/LogsPage.java
Fri Dec 28 13:15:06 2012
@@ -22,11 +22,11 @@ import java.util.Date;
 import java.util.List;
 
 import org.apache.karaf.webconsole.core.table.PropertyColumnExt;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataTable;
 import org.apache.karaf.webconsole.osgi.core.shared.OsgiPage;
 import org.apache.karaf.webconsole.osgi.log.search.Matcher;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.repeater.Item;
@@ -61,15 +61,15 @@ public class LogsPage extends OsgiPage {
         setDefaultModel(model);
 
         @SuppressWarnings("unchecked")
-        IColumn<LogEntry>[] columns = new IColumn[] {
-            new AbstractColumn<LogEntry>(Model.of("time")) {
+        IColumn<LogEntry, String>[] columns = new IColumn[] {
+            new AbstractColumn<LogEntry, String>(Model.of("time")) {
                 public void populateItem(Item<ICellPopulator<LogEntry>> cellItem,
String componentId, IModel<LogEntry> rowModel) {
                     long time = rowModel.getObject().getTime();
                     DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT,
DateFormat.FULL);
                     cellItem.add(new Label(componentId, format.format(new Date(time))));
                 }
             },
-            new AbstractColumn<LogEntry>(Model.of("level")) {
+            new AbstractColumn<LogEntry, String>(Model.of("level")) {
                 public void populateItem(Item<ICellPopulator<LogEntry>> cellItem,
String componentId, IModel<LogEntry> rowModel) {
                     cellItem.add(new Label(componentId, Priority.valueOf(rowModel.getObject()).name()));
                 }
@@ -80,12 +80,9 @@ public class LogsPage extends OsgiPage {
             new PropertyColumnExt<LogEntry>("Exception", "exception"),
         };
 
-        OptionsForm form = new OptionsForm("filters", model);
+        add(new OptionsForm("filters", model));
 
         LogEntriesDataProvider provider = new LogEntriesDataProvider(logReader, options,
matchers);
-        DefaultDataTable<LogEntry> table = new DefaultDataTable<LogEntry>("logs",
Arrays.asList(columns), provider, 20);
-
-        add(table);
-        add(form);
+        add(new BaseDataTable<LogEntry>("logs", Arrays.asList(columns), provider, 20));
     }
 }

Modified: karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumn.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumn.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumn.java
(original)
+++ karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumn.java
Fri Dec 28 13:15:06 2012
@@ -30,7 +30,7 @@ import org.osgi.framework.Bundle;
 /**
  * A dedicated column to display scr component states.
  */
-public class ScrColumn extends AbstractColumn<Bundle> {
+public class ScrColumn extends AbstractColumn<Bundle, String> {
 
     private static final long serialVersionUID = 1L;
 

Modified: karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumnProvider.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumnProvider.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumnProvider.java
(original)
+++ karaf/webconsole/trunk/osgi/scr/src/main/java/org/apache/karaf/webconsole/osgi/scr/ScrColumnProvider.java
Fri Dec 28 13:15:06 2012
@@ -25,7 +25,7 @@ import org.osgi.framework.Bundle;
  */
 public class ScrColumnProvider implements IColumnProvider {
 
-    public IColumn<Bundle> getColumn() {
+    public IColumn<Bundle, String> getColumn() {
         return new ScrColumn("SCR");
     }
 

Modified: karaf/webconsole/trunk/pom.xml
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/pom.xml?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/pom.xml (original)
+++ karaf/webconsole/trunk/pom.xml Fri Dec 28 13:15:06 2012
@@ -63,11 +63,13 @@
         <pax-exam-karaf.version>0.5.0</pax-exam-karaf.version>
         <pax-exam-junit.version>2.3.0</pax-exam-junit.version>
         <pax-logging.version>1.6.4</pax-logging.version>
-        <pax-wicket.version>1.1.0</pax-wicket.version>
+        <pax-wicket.version>2.0.1</pax-wicket.version>
         <scala.version>2.9.1</scala.version>
         <scala-plugin.version>2.15.2</scala-plugin.version>
         <servicemix-nmr.version>1.4.0</servicemix-nmr.version>
         <slf4j.version>1.6.1</slf4j.version>
+        <!-- should be in sync with pax-wicket dependencies -->
+        <wicket.version>6.2.0</wicket.version>
     </properties>
 
     <modules>

Modified: karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/EndpointsPage.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/EndpointsPage.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/EndpointsPage.java
(original)
+++ karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/EndpointsPage.java
Fri Dec 28 13:15:06 2012
@@ -24,12 +24,12 @@ import java.util.Map;
 
 import org.apache.karaf.webconsole.core.table.OrdinalColumn;
 import org.apache.karaf.webconsole.core.table.PropertyColumnExt;
+import org.apache.karaf.webconsole.core.table.advanced.AdvancedDataProvider;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataProvider;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataTable;
 import org.apache.servicemix.nmr.api.Endpoint;
 import org.apache.servicemix.nmr.api.EndpointRegistry;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 
@@ -42,7 +42,7 @@ public class EndpointsPage extends Servi
 
     @SuppressWarnings({"unchecked", "serial"})
     public EndpointsPage() {
-        IColumn<Map<String, Object>>[] columns = new IColumn[] {
+        IColumn<Map<String, Object>, String>[] columns = new IColumn[] {
             new OrdinalColumn<Map<String, Object>>(),
             new PropertyColumnExt<Map<String, Object>>("Name", Endpoint.NAME),
             new PropertyColumnExt<Map<String, Object>>("Version", Endpoint.VERSION),
@@ -54,9 +54,9 @@ public class EndpointsPage extends Servi
             new PropertyColumnExt<Map<String, Object>>("Wsdl url", Endpoint.WSDL_URL)
         };
 
-        ISortableDataProvider<Map<String, Object>> provider = new SortableDataProvider<Map<String,
Object>>() {
+        AdvancedDataProvider<Map<String, Object>> provider = new BaseDataProvider<Map<String,
Object>>() {
 
-            public Iterator<? extends Map<String, Object>> iterator(int first,
int count) {
+            public Iterator<? extends Map<String, Object>> iterator(long first,
long count) {
                 List<Map<String, Object>> props = new ArrayList<Map<String,Object>>();
 
                 EndpointRegistry endpointRegistry = nmr.getEndpointRegistry();
@@ -64,10 +64,10 @@ public class EndpointsPage extends Servi
                     props.add((Map<String, Object>) endpointRegistry.getProperties(endpoint));
                 }
 
-                return props.subList(first, count).iterator();
+                return props.subList((int) first, (int) count).iterator();
             }
 
-            public int size() {
+            public long size() {
                 return nmr.getEndpointRegistry().getServices().size();
             }
 
@@ -76,7 +76,7 @@ public class EndpointsPage extends Servi
             }
         };
 
-        add(new DefaultDataTable<Map<String, Object>>("endpoints", Arrays.asList(columns),
provider, 20));
+        add(new BaseDataTable<Map<String, Object>>("endpoints", Arrays.asList(columns),
provider, 20));
     }
 
 }

Modified: karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/TrackNmrPage.java
URL: http://svn.apache.org/viewvc/karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/TrackNmrPage.java?rev=1426499&r1=1426498&r2=1426499&view=diff
==============================================================================
--- karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/TrackNmrPage.java
(original)
+++ karaf/webconsole/trunk/servicemix/src/main/java/org/apache/karaf/webconsole/servicemix/internal/TrackNmrPage.java
Fri Dec 28 13:15:06 2012
@@ -21,13 +21,13 @@ import java.util.Arrays;
 import java.util.Iterator;
 
 import org.apache.karaf.webconsole.core.table.PropertyColumnExt;
+import org.apache.karaf.webconsole.core.table.advanced.AdvancedDataProvider;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataProvider;
+import org.apache.karaf.webconsole.core.table.advanced.BaseDataTable;
 import org.apache.servicemix.nmr.api.Exchange;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.DefaultDataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
-import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
 import org.apache.wicket.markup.repeater.Item;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
@@ -45,26 +45,26 @@ public class TrackNmrPage extends Servic
 
     @SuppressWarnings({"unchecked", "serial", "rawtypes"})
     public TrackNmrPage() {
-        IColumn<Exchange>[] columns = new IColumn[] {
+        IColumn<Exchange, String>[] columns = new IColumn[] {
             new PropertyColumnExt<Exchange>("Id", "id"),
             new PropertyColumnExt<Exchange>("Role", "role"),
             new PropertyColumnExt<Exchange>("Status", "status"),
             new PropertyColumnExt<Exchange>("Pattern", "pattern"),
             new PropertyColumnExt<Exchange>("Operation", "operation"),
-            new AbstractColumn<Exchange>(Model.of("Operations")) {
+            new AbstractColumn<Exchange, String>(Model.of("Operations")) {
                 public void populateItem(Item<ICellPopulator<Exchange>> cellItem,
String componentId, IModel<Exchange> rowModel) {
                     cellItem.add(new ExchangeActionsPanel(componentId, rowModel));
                 }
             }
         };
 
-        ISortableDataProvider<Exchange> dataProvider = new SortableDataProvider<Exchange>()
{
+        AdvancedDataProvider<Exchange> dataProvider = new BaseDataProvider<Exchange>()
{
 
-            public Iterator<? extends Exchange> iterator(int first, int count) {
-                return new ArrayList(listener.getExchanges()).subList(first, first + count).iterator();
+            public Iterator<? extends Exchange> iterator(long first, long count) {
+                return new ArrayList(listener.getExchanges()).subList((int) first, (int)
first + (int) count).iterator();
             }
 
-            public int size() {
+            public long size() {
                 return listener.getExchanges().size();
             }
 
@@ -74,7 +74,7 @@ public class TrackNmrPage extends Servic
 
         };
 
-        add(new DefaultDataTable<Exchange>("exchanges", Arrays.asList(columns), dataProvider,
20));
+        add(new BaseDataTable<Exchange>("exchanges", Arrays.asList(columns), dataProvider,
20));
 
     }
 



Mime
View raw message