|Related to : How to use custom sorter in XML views|
|Palindrome substring sorter in C|
Your "supposed to be like" list doesn't seem to include ama despite
the fact it appears to meet the criteria. You should probably clarify
that with the educator.
Once clarified, the next step you need to take is to remove the
duplicates from your output. Your output actually seems correct but
for the fact that it still has duplicated values so I'd start with
what you have so far.
Given that it's
|How to set sorter of a List in Controller in SAPUI5?|
onInit should be fine.
Use List's method bindItems to bind the items and apply the sorter.
oList.bindItems('/list', ListItemTemplate, foo.bar.CustomSorter);
|Use custom control in XML views|
Try the following
|Laravel, custom functions in for views|
I would pop some client side code into your views and access a route
to a controller action (which returns JSON by default) and
conditionally add that particular snippet into your view (via a
variable passed to the view that determines if the person is logged
in). Then you can apply an auth filter to your route to protect it.
Note: with this approach you can pass url parameters to your action.
|grails: How to derive custom views while keeping generated ones for reference|
There's no particular reason why you need to create your own
controllers, why not just add additional actions into the scaffolded
controllers and have them render views with different names to the
scaffolded views. Then your custom actions/views can happily co-exist
with those created by scaffolding.