cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomek...@apache.org
Subject svn commit: r1078316 - in /cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client: event/ service/browser/ ui/browser/
Date Sat, 05 Mar 2011 17:33:14 GMT
Author: tomekopo
Date: Sat Mar  5 17:33:13 2011
New Revision: 1078316

URL: http://svn.apache.org/viewvc?rev=1078316&view=rev
Log:
Added building URL with filtering options (after selecting endpoint in "filter" section)

Added:
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
Modified:
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java
    cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java

Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java?rev=1078316&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
(added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEvent.java
Sat Mar  5 17:33:13 2011
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.management.web.browser.client.event;
+
+import javax.annotation.Nonnull;
+
+import com.google.gwt.event.shared.GwtEvent;
+import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions;
+
+public class ChangedFilterOptionsEvent extends GwtEvent<ChangedFilterOptionsEventHandler>
{
+    public static final Type<ChangedFilterOptionsEventHandler> TYPE =
+        new Type<ChangedFilterOptionsEventHandler>();
+
+    @Nonnull private FilterOptions filterOptions;
+
+    public ChangedFilterOptionsEvent(@Nonnull FilterOptions filterOptions) {
+        this.filterOptions = filterOptions;
+    }
+
+    @Nonnull
+    public FilterOptions getFilterOptions() {
+        return filterOptions;
+    }
+
+    @Override @Nonnull
+    public Type<ChangedFilterOptionsEventHandler> getAssociatedType() {
+        return TYPE;
+    }
+
+    @Override
+    protected void dispatch(@Nonnull final ChangedFilterOptionsEventHandler handler) {
+        handler.onChangedFilterOptions(this);
+    }
+}

Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java?rev=1078316&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
(added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/event/ChangedFilterOptionsEventHandler.java
Sat Mar  5 17:33:13 2011
@@ -0,0 +1,26 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.management.web.browser.client.event;
+
+import com.google.gwt.event.shared.EventHandler;
+
+public interface ChangedFilterOptionsEventHandler extends EventHandler {
+    void onChangedFilterOptions(ChangedFilterOptionsEvent event);
+}
\ No newline at end of file

Added: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java?rev=1078316&view=auto
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
(added)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/service/browser/FilterOptions.java
Sat Mar  5 17:33:13 2011
@@ -0,0 +1,64 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.management.web.browser.client.service.browser;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+public class FilterOptions {
+    public enum Level {
+        DEBUG, INFO, WARN, ERROR
+    }
+
+    public static final FilterOptions EMPTY = new FilterOptions();
+
+    @Nullable private Date from;
+    @Nullable private Date to;
+    @Nonnull private List<Level> levels;
+
+    private FilterOptions() {
+        this.levels = new ArrayList<Level>();
+    }
+
+    public FilterOptions(@Nullable Date from, @Nullable Date to, @Nonnull List<Level>
levels) {
+        this.from = from;
+        this.to = to;
+        this.levels = levels;
+    }
+
+    @Nullable
+    public Date getFrom() {
+        return from;
+    }
+
+    @Nullable
+    public Date getTo() {
+        return to;
+    }
+
+    @Nonnull
+    public List<Level> getLevels() {
+        return levels;
+    }
+}

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaPresenter.java
Sat Mar  5 17:33:13 2011
@@ -19,13 +19,19 @@
 
 package org.apache.cxf.management.web.browser.client.ui.browser;
 
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
 import javax.annotation.Nonnull;
 
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
 import com.google.inject.name.Named;
-
 import org.apache.cxf.management.web.browser.client.EventBus;
+import org.apache.cxf.management.web.browser.client.event.ChangedFilterOptionsEvent;
+import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions;
+import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions.Level;
 import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
 import org.apache.cxf.management.web.browser.client.ui.BindStrategy;
 
@@ -44,4 +50,33 @@ public class EditCriteriaPresenter exten
         this.view = view;
         this.view.setPresenter(this);
     }
+
+    public void onSaveButtonClicked() {
+        Date from = view.getFromValue().getValue();
+        Date to = view.getToValue().getValue();
+
+        List<Level> acceptedLevels = new ArrayList<FilterOptions.Level>();
+
+        if (view.getDebugValue().getValue()) {
+            acceptedLevels.add(Level.DEBUG);
+        }
+        if (view.getInfoValue().getValue()) {
+            acceptedLevels.add(Level.INFO);
+        }
+        if (view.getWarnValue().getValue()) {
+            acceptedLevels.add(Level.WARN);
+        }
+        if (view.getErrorValue().getValue()) {
+            acceptedLevels.add(Level.ERROR);
+        }
+
+        FilterOptions filterOptions;
+        if (from == null && to == null && acceptedLevels.isEmpty()) {
+            filterOptions = FilterOptions.EMPTY;
+        } else {
+            filterOptions = new FilterOptions(from, to, acceptedLevels);
+        }
+
+        eventBus.fireEvent(new ChangedFilterOptionsEvent(filterOptions));
+    }
 }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.java
Sat Mar  5 17:33:13 2011
@@ -19,13 +19,28 @@
 
 package org.apache.cxf.management.web.browser.client.ui.browser;
 
+import java.util.Date;
+
+import com.google.gwt.user.client.ui.HasValue;
 import org.apache.cxf.management.web.browser.client.ui.View;
 
 public interface EditCriteriaView extends View {
     
     public interface Presenter {
-
+        void onSaveButtonClicked();
     }
 
+    HasValue<Date> getFromValue();
+
+    HasValue<Date> getToValue();
+
+    HasValue<Boolean> getDebugValue();
+
+    HasValue<Boolean> getInfoValue();
+
+    HasValue<Boolean> getWarnValue();
+
+    HasValue<Boolean> getErrorValue();
+
     void setPresenter(Presenter presenter);
 }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaView.ui.xml
Sat Mar  5 17:33:13 2011
@@ -32,7 +32,7 @@
 					<g:Label>From:</g:Label>
 				</td>
                 <td>
-					<dp:DateBox></dp:DateBox>
+					<dp:DateBox ui:field="fromDateBox"/>
 				</td>
          </tr>
          <tr>
@@ -40,7 +40,7 @@
 					<g:Label>To:</g:Label>
 				</td>
                 <td>
-					<dp:DateBox></dp:DateBox>
+					<dp:DateBox ui:field="toDateBox"/>
 				</td>
 			</tr>
             <tr>
@@ -49,10 +49,10 @@
                 </td>
                 <td>
                     <g:VerticalPanel>
-                        <g:CheckBox>Debug</g:CheckBox>
-                        <g:CheckBox>Warning</g:CheckBox>
-                        <g:CheckBox>Information</g:CheckBox>
-                        <g:CheckBox>Error</g:CheckBox>
+                        <g:CheckBox ui:field="debugCheckBox">Debug</g:CheckBox>
+                        <g:CheckBox ui:field="warnCheckBox">Warning</g:CheckBox>
+                        <g:CheckBox ui:field="infoCheckBox">Information</g:CheckBox>
+                        <g:CheckBox ui:field="errorCheckBox">Error</g:CheckBox>
                     </g:VerticalPanel>
                 </td>
             </tr>

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/EditCriteriaViewImpl.java
Sat Mar  5 17:33:13 2011
@@ -19,50 +19,93 @@
 
 package org.apache.cxf.management.web.browser.client.ui.browser;
 
+import java.util.Date;
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
 import com.google.gwt.uibinder.client.UiTemplate;
-import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.HasValue;
 import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.datepicker.client.DateBox;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
-
 import org.apache.cxf.management.web.browser.client.ui.AbstractDialog;
 import org.apache.cxf.management.web.browser.client.ui.resources.LogBrowserConstans;
 
 @Singleton
 public class EditCriteriaViewImpl extends AbstractDialog implements EditCriteriaView {
+    @UiTemplate("EditCriteriaView.ui.xml")
+    interface EditCriteriaViewUiBinder extends UiBinder<Widget, EditCriteriaViewImpl>
{ }
 
-    @Nonnull
-    private Form form;
+    private static final EditCriteriaViewUiBinder UI_BINDER = GWT.create(EditCriteriaViewUiBinder.class);
+
+    @UiField @Nonnull DateBox fromDateBox;
+    @UiField @Nonnull DateBox toDateBox;
+    @UiField @Nonnull CheckBox debugCheckBox;
+    @UiField @Nonnull CheckBox warnCheckBox;
+    @UiField @Nonnull CheckBox infoCheckBox;
+    @UiField @Nonnull CheckBox errorCheckBox;
+
+    @Nonnull private Presenter presenter;
 
     @Inject
     public EditCriteriaViewImpl(@Nonnull final LogBrowserConstans constans) {
-        this.form = new Form();
+        init(constans.editCriteriaDialogTitle(), UI_BINDER.createAndBindUi(this));
+    }
 
-        init(constans.editCriteriaDialogTitle(), form);
+    @UiHandler("cancelButton")
+    void onCancelButtonClicked(@Nonnull final ClickEvent event) {
+        hide();
     }
 
-    public Widget asWidget() {
-        return null;
+    @UiHandler("saveButton")
+    void onSaveButtonClicked(@Nonnull final ClickEvent event) {
+        presenter.onSaveButtonClicked();
+        hide();
     }
 
-    public void setPresenter(Presenter presenter) {
-        //TODO implement
+    @Nonnull
+    public HasValue<Date> getFromValue() {
+        return fromDateBox;
+    }
+
+    @Nonnull
+    public HasValue<Date> getToValue() {
+        return toDateBox;
+    }
+
+    @Nonnull
+    public HasValue<Boolean> getDebugValue() {
+        return debugCheckBox;
     }
 
-    //TODO remove this internal class - information about how to render view should in BindStrategy

-    protected static class Form extends Composite {
+    @Nonnull
+    public HasValue<Boolean> getInfoValue() {
+        return infoCheckBox;
+    }
 
-        @UiTemplate("EditCriteriaView.ui.xml")
-        interface FormViewUiBinder extends UiBinder<Widget, Form> { }
+    @Nonnull
+    public HasValue<Boolean> getWarnValue() {
+        return warnCheckBox;
+    }
 
-        private static final FormViewUiBinder UI_BINDER = GWT.create(FormViewUiBinder.class);
+    @Nonnull
+    public HasValue<Boolean> getErrorValue() {
+        return errorCheckBox;
+    }
+
+    @Nullable
+    public Widget asWidget() {
+        return null;
+    }
 
-        public Form() {
-            initWidget(UI_BINDER.createAndBindUi(this));
-        }
+    public void setPresenter(Presenter presenter) {
+        this.presenter = presenter;
     }
 }
\ No newline at end of file

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarPresenter.java
Sat Mar  5 17:33:13 2011
@@ -21,17 +21,21 @@ package org.apache.cxf.management.web.br
 
 import java.util.List;
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
 import com.google.inject.name.Named;
-
 import org.apache.cxf.management.web.browser.client.EventBus;
+import org.apache.cxf.management.web.browser.client.event.ChangedFilterOptionsEvent;
+import org.apache.cxf.management.web.browser.client.event.ChangedFilterOptionsEventHandler;
 import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEvent;
 import org.apache.cxf.management.web.browser.client.event.ChangedSubscriptionsEventHandler;
 import org.apache.cxf.management.web.browser.client.event.GoToEditCriteriaEvent;
 import org.apache.cxf.management.web.browser.client.event.GoToSettingsEvent;
 import org.apache.cxf.management.web.browser.client.event.SelectedSubscriptionEvent;
+import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions;
+import org.apache.cxf.management.web.browser.client.service.browser.FilterOptions.Level;
 import org.apache.cxf.management.web.browser.client.service.settings.SettingsFacade;
 import org.apache.cxf.management.web.browser.client.service.settings.Subscription;
 import org.apache.cxf.management.web.browser.client.ui.BasePresenter;
@@ -39,14 +43,13 @@ import org.apache.cxf.management.web.bro
 
 @Singleton
 public class NavigationSidebarPresenter extends BasePresenter implements NavigationSidebarView.Presenter
{
+    @Nonnull private final NavigationSidebarView view;
+    @Nonnull private final SettingsFacade settingsManager;
 
-    @Nonnull
-    private final NavigationSidebarView view;
-
-    @Nonnull
-    private final SettingsFacade settingsManager;
+    @Nonnull private FilterOptions filterOptions = FilterOptions.EMPTY;
 
-    private List<Subscription> subscriptions;
+    @Nullable private Subscription selectedSubscription;
+    @Nonnull private List<Subscription> subscriptions;
 
     @Inject
     public NavigationSidebarPresenter(@Nonnull final EventBus eventBus,
@@ -65,12 +68,50 @@ public class NavigationSidebarPresenter 
         updateSubscriptions();
     }
 
-    public void onSubcriptionItemClicked(final int row) {
+    public void onExploreSubcriptionItemClicked(int row) {
         assert row >= 0 && row < subscriptions.size();
-        Subscription selectedSubscription = subscriptions.get(row);
+        selectedSubscription = subscriptions.get(row);
         eventBus.fireEvent(new SelectedSubscriptionEvent(selectedSubscription.getUrl()));
     }
 
+    public void onFilterSubcriptionItemClicked(int row) {
+        assert row >= 0 && row < subscriptions.size();
+        selectedSubscription = subscriptions.get(row);
+        selectSubscriptionWithFilterOptions();
+    }
+
+    private void selectSubscriptionWithFilterOptions() {
+        assert selectedSubscription != null;
+
+        StringBuilder url = new StringBuilder(selectedSubscription.getUrl());
+
+        if (filterOptions != FilterOptions.EMPTY) {
+            url.append("?_s=");
+
+            if (filterOptions.getFrom() != null) {
+                url.append("date=ge=");
+                url.append(filterOptions.getFrom().getTime());
+                url.append(";");
+            }
+
+            if (filterOptions.getTo() != null) {
+                url.append("date=lt=");
+                url.append(filterOptions.getTo().getTime());
+                url.append(";");
+            }
+
+            if (!filterOptions.getLevels().isEmpty()) {
+                for (Level level : filterOptions.getLevels()) {
+                    url.append("level==");
+                    url.append(level);
+                    url.append(";");
+                }
+            }
+        }
+
+        eventBus.fireEvent(new SelectedSubscriptionEvent(url.toString()));
+    }
+
     public void onManageSubscriptionsButtonClicked() {
         eventBus.fireEvent(new GoToSettingsEvent());
     }
@@ -92,5 +133,12 @@ public class NavigationSidebarPresenter 
             }
         });
 
+        eventBus.addHandler(ChangedFilterOptionsEvent.TYPE, new ChangedFilterOptionsEventHandler()
{
+
+            public void onChangedFilterOptions(ChangedFilterOptionsEvent event) {
+                filterOptions = event.getFilterOptions();
+                selectSubscriptionWithFilterOptions();
+            }
+        });
     }
 }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarView.java
Sat Mar  5 17:33:13 2011
@@ -27,8 +27,10 @@ import org.apache.cxf.management.web.bro
 public interface NavigationSidebarView extends View {
 
     public interface Presenter {
-        void onSubcriptionItemClicked(int row);
-        
+        void onExploreSubcriptionItemClicked(int row);
+
+        void onFilterSubcriptionItemClicked(int row);
+
         void onManageSubscriptionsButtonClicked();
 
         void onEditCriteriaHyperinkClicked();

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/NavigationSidebarViewImpl.java
Sat Mar  5 17:33:13 2011
@@ -63,7 +63,7 @@ public class NavigationSidebarViewImpl e
 
                 // Remove selection from subscription list in filter section
                 filterSubscriptionTable.deselect();
-                presenter.onSubcriptionItemClicked(row);
+                presenter.onExploreSubcriptionItemClicked(row);
             }
         });
 
@@ -74,7 +74,7 @@ public class NavigationSidebarViewImpl e
 
                 // Remove selection from subscription list in explore section
                 exploreSubscriptionTable.deselect();
-                presenter.onSubcriptionItemClicked(row);
+                presenter.onFilterSubcriptionItemClicked(row);
             }
         });
     }

Modified: cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java?rev=1078316&r1=1078315&r2=1078316&view=diff
==============================================================================
--- cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
(original)
+++ cxf/trunk/rt/management-web/src/main/java/org/apache/cxf/management/web/browser/client/ui/browser/ViewerPresenter.java
Sat Mar  5 17:33:13 2011
@@ -133,6 +133,7 @@ public class ViewerPresenter extends Bas
             resources.css().browserTabLoadingMessage());
     }
 
+    //TODO Rename this method. Name should emphasize that it gets and sets feed
     private void getFeed(@Nonnull final String url) {
         setLoadingMessage();
         proxy.getFeed(url, new FeedProxyImpl.Callback() {



Mime
View raw message