on 07-28-2015 1:02 PM
Hi folks,
I am new to Fiori development and have did my research before asking this question here.
I have also completed the openSAP course on building a fiori App which was quite straight forward, but my question is based on manipulating the data on the front end and so not covered by the course.
I am looking for examples of manipulating the data on the screen based on the values returned by the back end system. For example changing the colour fond of a PO which is above a certain value. I am using the master/detail template and making using the webide with mock data.
I have been updating the Detail.controller.js, but I am not even able to update a field to a value like this
this._myfield = this.byId("text7");
but this could be because I haven't referenced the View, just tried to grab the field directly by ID.
If anyone knows of any sample snippets of code that shows front end field manipulation to change colour, value etc, I would be most greatful.
Note: these changes are not to go back to the back end, just view.
Thanks in Advance
Message was edited by: Michael Appleby
Hi Caolan,
Hope this helps - http://jsbin.com/doboyi/3/edit?html,css,js,output
It is based on JSON Model but the same can be applied to oData Model also
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has anyone got any guidance on this, what I thought was a simple subject?
TIA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
may have more information on this topic. Take a look and let me know if I should move your Discussion there.
You may also wish to use Google Custom Search to better identify content of interest.
If it is a simple subject, it is likely already answered and you simply did not find the answer when using the SAP Search. is also worth reading.
Regards, Mike (Moderator)
SAP Technology RIG
As requested, the title is changed. Also Discussion successfully moved from SAP Fiori to SAPUI5 Developer Center.
Cheers, Mike (Moderator)
SAP Technology RIG
Discussion successfully moved from SAP for Mobile to SAP Fiori as the more appropriate community for this topic.
Regards, Mike (Moderator)
SAP Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Michael ... sorry I put in the wrong group.
Continuing on with my problem...
As mentioned I am new to UI5/Fiori and currently can only read text elements on the details screen which I put there using
var oView = this.getView();
var var_string = oView.byId("text7").getText();
but trying to read something like (value) isn't working even if I use .getValue.
I know I am probably missing something missing, so can anyone help?
TIA
If its a text field on the screen definied as
<Text text="SampleText" maxLines="0" id="text7"/>
oView.byId("text7").getText();
works
but if this a value field
<Text id="text1" text="{Quantity}" maxLines="0">
</Text>
Then
oView.byId("text1").getValue();
throws an exception
I am simply just trying to read the value of that field
Thanks
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.