Daniel Erez has posted comments on this change. Change subject: webadmin: Added the ability to define a 'no items' message. ......................................................................
Patch Set 4: (3 inline comments) Suggested a different approach using each ListModel's getTitle() - see comment at ApplicationConstants.java .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java Line 626: this.table.setEmptyTableWidget(getEmptyTableMessageWidget(type)); Line 627: } Line 628: Line 629: /** Line 630: * Create the empty message widget with retrieves the message to display from a protected method. s/with/which Line 631: * @return The Widget to display Line 632: */ Line 633: private Widget getEmptyTableMessageWidget(String message) { Line 634: Label emptyMessageLabel = new Label(message); .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java Line 2434: String detachGlusterHostsHostAddress(); Line 2435: Line 2436: @DefaultStringValue("Detach the hosts forcefully") Line 2437: String detachGlusterHostsForcefully(); Line 2438: Can't we simply use each ListModel's title to generate the message? E.g. DataCenterListModel: the ctr already sets the title to dataCentersTitle("Data Centers"). So, we can add to ApplicationMessages something like: @DefaultMessage("No {0} to display") String noTabItemsToDisplay(String tabTitle); (Tabs' ListModels -> getTitle() could probably be used from AbstractMainTabTableView). Line 2439: //No items to display messages. Line 2440: @DefaultStringValue("No Data Centers to display") Line 2441: String noDataCentersToDisplay(); Line 2442: .................................................... File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/AbstractMainTabTableView.java Line 62: } Line 63: Line 64: protected String getTableTypeString() { Line 65: //Sub classes can override this to get a specific message. Line 66: return null; Again, could probably be replaced with 'return getMainModel().getTitle()'. Line 67: } -- To view, visit http://gerrit.ovirt.org/9830 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If808e7c1bc92877d3f59b766985900a2c8ffd216 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches