Reputation: 71
After not much luck with annotations for navigation in Smarttable, I am doing something like this, using typical routing.
Master page - Responsive Smarttable - On selecting a row and say Go to Detail-> Detail page - Responsive Smartable bound to an entityset.
But here, I am using onBeforeRebindTable to pass custom filters. I see it works as expected, filters are passed as from the UI to the backend, values retrived, but the problem is when the table is rendered.
I see that the last record is getting duplicated as many number of times as the records. So, basically its just the last record displayed. I tried to include all fields to the property initiallyVisibleFields, but even if otherwise, the result is duplicated. But strangely, the response d_results holds only the unique records,
I have no clues why the table shows only the last row, so many times,
PS: I use the method rebindTable on the smarttable when the route is matched to trigger onBeforeRebindTable, as this event is not triggered from the second time during navigation. I also see an error in console - Cannot read property 'getColumns' of undefined. Should this has to do anything with the issue ?
My first question :-) Any help is appreciated,
PS: I also tried to display the 2nd smarttable with smartfilters, but still the behavior is same.
thanks, Sathish
Upvotes: 3
Views: 3575
Reputation: 71
It's solved,
Reason : Though the results are coming as expected, I have marked only the first 2 fields as key in my entityset, due to which the results are just grouped by the keys and rendered :-)
Marking the additional fields as key in the entity solved the issue,
thanks, Sathish
Upvotes: 3