commit | 3dbc8889e3512d1dda41c8e127312053b11e8576 | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Fri Jan 15 17:07:18 2016 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Sat Jan 16 01:46:28 2016 +0000 |
tree | e01ff93ab36d171098cc51da10e9082421b22f55 | |
parent | 9fa6b8b23c86886fb053683a149e54626d1388b2 [diff] |
[ONOS-3722] Add noRowsMessage method to sample UiTableMessageHandler This commit fixes the archetype building failure which is caused by lacking of noRowsMessage method in AppUiTableMessageHandler. Change-Id: I11fcff169aaf01830d6eaf847e5dadaa8a58f832
diff --git a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/java/AppUiTableMessageHandler.java b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/java/AppUiTableMessageHandler.java index 6bda2aa..7c605f4 100644 --- a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/java/AppUiTableMessageHandler.java +++ b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/java/AppUiTableMessageHandler.java
@@ -45,6 +45,8 @@ private static final String SAMPLE_TABLE_DETAIL_RESP = "sampleTableDetailsResponse"; private static final String DETAILS = "details"; + private static final String NO_ROWS_MESSAGE = "No items found"; + private static final String ID = "id"; private static final String LABEL = "label"; private static final String CODE = "code"; @@ -81,6 +83,11 @@ // if required, override createTableModel() to set column formatters / comparators @Override + protected String noRowsMessage(ObjectNode payload) { + return NO_ROWS_MESSAGE; + } + + @Override protected void populateTable(TableModel tm, ObjectNode payload) { // === NOTE: the table model supplied here will have been created // via a call to createTableModel(). To assign non-default
diff --git a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/resources/app/view/sampleTable/sampleTable.html b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/resources/app/view/sampleTable/sampleTable.html index e20a94d..b7f7706 100644 --- a/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/resources/app/view/sampleTable/sampleTable.html +++ b/tools/package/archetypes/uitab/src/main/resources/archetype-resources/src/main/resources/app/view/sampleTable/sampleTable.html
@@ -26,7 +26,7 @@ <table> <tr ng-if="!tableData.length" class="no-data"> <td colspan="3"> - No Items found + {{annots.no_rows_msg}} </td> </tr>