I've been diving into UI5 XML views and sharing the love recently - see Mobile Dev Course W3U3 Rewrite - XML Views - An Intro (as part of Mobile Dev Course W3U3 Rewrite - Intro), and the XML view based templates and snippets in my SublimeUI5 Package for the "developer's choice" Sublime Text editor.
Recently john.patterson5 supplied a JSBin example of an OData sourced table with a filter on dates, in answer to Using Table filter when a formatter function is used.
This was a very nice example but I thought it would be an interesting exercise to convert it to XML, for a number of reasons:
So I did, and have made it available in the sapui5bin repo on Github here:
sapui5bin/SinglePageExamples/ODataDateTableFilter.html at master · qmacro/sapui5bin · GitHub
Open up this link in a separate window to view it and read the rest of the post.
I'll cover the "single page MVC" concept in another post; for now, here are a few notes to help you navigate:
The one thing I'm not entirely convinced about is having to set the filterType property on the BirthDate column "procedurally" (in JavaScript); perhaps I'll get round to looking into how to do this particular bit a different way at some stage.
Anyway, I thought this might be more useful insight into XML views and single page MVC examples.
Share & enjoy!
dj
Note 1: This "single page MVC" idea is something I've wanted to put together and share for a while; it's easy to write a single page demo UI5 app but not so easy to do that and involve the MVC concept as well - in a single file ... until now.
Note 2: The SAP Fiori Wave 1 apps have views that are written declaratively in HTML; the SAP Fiori Wave 2 and 3 apps have views written in XML, using the sap.m controls, with a smattering of sap.ui.layout controls too
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |