modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
| 7 +++-
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
| 15 +++++++---
2 files changed, 16 insertions(+), 6 deletions(-)
New commits:
commit e3ca14ca6588adbc11c58c1fffca0c93841fa88d
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Mar 30 17:46:34 2011 -0400
Fix an issue when performing direct navigation to bookmarkable subtab views.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
index 04d6410..cac30b2 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/common/detail/AbstractTwoLevelTabSetView.java
@@ -247,12 +247,19 @@ public abstract class AbstractTwoLevelTabSetView<T, U extends
Layout> extends Lo
// select the subTab (this does not fire an event, just sets the subtab)
tab.getLayout().selectSubTab(subtab);
- // now that the tab/subtab is determined, if currently selected tab is not
the desired tab, then
- // select it now (firing a new event).
+ // the target tab/subtab is now determined. if the currently selected tab is
not the target tab then
+ // select it now.
if (!tab.equals(this.tabSet.getSelectedTab())) {
- this.tabSet.setIgnoreSelectEvents(false);
+
+ // Fire a tab selection event only if we're at the end of the path.
If not then it is assumed that
+ // the subtab view is a BookmarkableView and the navigation will continue
in that way, below.
+ if (viewPath.isEnd()) {
+ this.tabSet.setIgnoreSelectEvents(false);
+ this.tabSet.selectTab(tab);
+ return;
+ }
+
this.tabSet.selectTab(tab);
- return;
}
// if the desired tab/subtab are already selected, now we can render the
subtab canvas
commit 7e2125b7c5e89bb921be4b0aa2ccb203401ec62e
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Mar 30 17:45:27 2011 -0400
Fix a null protection issue.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
index e321819..2746c41 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/alert/AlertHistoryView.java
@@ -24,6 +24,7 @@ import java.util.Arrays;
import java.util.LinkedHashMap;
import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.smartgwt.client.data.ResultSet;
import com.smartgwt.client.data.SortSpecifier;
import com.smartgwt.client.types.MultipleAppearance;
import com.smartgwt.client.types.SortDirection;
@@ -169,7 +170,8 @@ public class AlertHistoryView extends
TableSection<AlertDataSource> {
new TableAction() {
public boolean isEnabled(ListGridRecord[] selection) {
ListGrid grid = getListGrid();
- return (hasWriteAccess && grid != null &&
!grid.getResultSet().isEmpty());
+ ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
+ return (hasWriteAccess && grid != null && resultSet
!= null && !resultSet.isEmpty());
}
public void executeAction(ListGridRecord[] selection, Object actionValue)
{
@@ -180,7 +182,8 @@ public class AlertHistoryView extends
TableSection<AlertDataSource> {
new TableAction() {
public boolean isEnabled(ListGridRecord[] selection) {
ListGrid grid = getListGrid();
- return (hasWriteAccess && grid != null &&
!grid.getResultSet().isEmpty());
+ ResultSet resultSet = (null != grid) ? grid.getResultSet() : null;
+ return (hasWriteAccess && grid != null && resultSet
!= null && !resultSet.isEmpty());
}
public void executeAction(ListGridRecord[] selection, Object actionValue)
{
Show replies by date