Committed by
Gerrit Code Review
[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
Showing
2 changed files
with
8 additions
and
1 deletions
| ... | @@ -45,6 +45,8 @@ public class AppUiTableMessageHandler extends UiMessageHandler { | ... | @@ -45,6 +45,8 @@ public class AppUiTableMessageHandler extends UiMessageHandler { |
| 45 | private static final String SAMPLE_TABLE_DETAIL_RESP = "sampleTableDetailsResponse"; | 45 | private static final String SAMPLE_TABLE_DETAIL_RESP = "sampleTableDetailsResponse"; |
| 46 | private static final String DETAILS = "details"; | 46 | private static final String DETAILS = "details"; |
| 47 | 47 | ||
| 48 | + private static final String NO_ROWS_MESSAGE = "No items found"; | ||
| 49 | + | ||
| 48 | private static final String ID = "id"; | 50 | private static final String ID = "id"; |
| 49 | private static final String LABEL = "label"; | 51 | private static final String LABEL = "label"; |
| 50 | private static final String CODE = "code"; | 52 | private static final String CODE = "code"; |
| ... | @@ -81,6 +83,11 @@ public class AppUiTableMessageHandler extends UiMessageHandler { | ... | @@ -81,6 +83,11 @@ public class AppUiTableMessageHandler extends UiMessageHandler { |
| 81 | // if required, override createTableModel() to set column formatters / comparators | 83 | // if required, override createTableModel() to set column formatters / comparators |
| 82 | 84 | ||
| 83 | @Override | 85 | @Override |
| 86 | + protected String noRowsMessage(ObjectNode payload) { | ||
| 87 | + return NO_ROWS_MESSAGE; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + @Override | ||
| 84 | protected void populateTable(TableModel tm, ObjectNode payload) { | 91 | protected void populateTable(TableModel tm, ObjectNode payload) { |
| 85 | // === NOTE: the table model supplied here will have been created | 92 | // === NOTE: the table model supplied here will have been created |
| 86 | // via a call to createTableModel(). To assign non-default | 93 | // via a call to createTableModel(). To assign non-default | ... | ... |
| ... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
| 26 | <table> | 26 | <table> |
| 27 | <tr ng-if="!tableData.length" class="no-data"> | 27 | <tr ng-if="!tableData.length" class="no-data"> |
| 28 | <td colspan="3"> | 28 | <td colspan="3"> |
| 29 | - No Items found | 29 | + {{annots.no_rows_msg}} |
| 30 | </td> | 30 | </td> |
| 31 | </tr> | 31 | </tr> |
| 32 | 32 | ... | ... |
-
Please register or login to post a comment