Can the initial OData load be disabled in a SAPUI5 app? - sapui5

SAPUI5 freestyle app using OData v2 and two-way binding.
How do I disable the OData request on page load ?
For example, by default I want there to be no results shown in a List, then when the user choses a filter (or show all), the OData is retrieved.
In Fiori elements, there's an initialLoad property that can be set to enable/disable the loading of OData on a page load. How can this be achieved in a freestyle app?

And the answer is here...
Basically don't bind the items aggregation in the view, bind it manually in the controller:
https://answers.sap.com/questions/13778637/can-the-initial-odata-load-be-disabled-in-a-sapui5.html

Related

How can I update dropdown in CloudFlare App, based on js object?

I have a form-builder application, and now I want to create app in CloudFlare, where user can select needed form in dropdown, and "inject" in own website
So, I need to make ajax-request to my API server, it's not a problem.
But next, when I will have object {form-id: form-name} I need in some way to add this as option to dropdown in sidebar (in CF App)
I've tried to get content of dropdown by document.getElementsByTagName("dropdownName"), but there is an empty NodeList.
This is part of install.json with this dropdown:
screenshot
I think, there is easy way to do this, because I seen this functionality in other CF Applications.
Answer was found in Hooks page in video: Hooks page
When CF App sent hook request to your server, you can modify incoming object, and respond to CF App with this modified object.

Dynamically Update Google Form 'Choose from list' options from RESTFUL Api

Actually, I am trying to make a Google form in which I have 3 dropdown fields and their options which i need to dynamically populate/update.
1st Dropdown (Select Country)
2nd Dropdown (Select State / Province)
3rd Dropdown (Select City)
I have one restful (GET) API for getCountriesList, so what I need to do is when form load country dropdown will be filled after making getCountriesList API and then on the base of country selection, I have one more API to getCountryStates and that API will fill the state/provice dropdown. same as for city dropdown.
Actually, my main question is how to get triggers
form loaded
option selected from the country dropdown or state dropdown.
so I can call the APIs.
At this time the Google Form doesn't have an API, but Google Apps Script (GAS) has a service to handle forms. Unfortunately GAS doesn't have triggers for that. To learn about what triggers are available on GAS see https://developers.google.com/apps-script/guides/triggers.
You could try to "hack" (in the good way) the resulting form. This is easier by switching to the old Google Forms than with the new, because the old forms use "basic" html form tags and some "basic" JavaScript while the new Google Forms are a more complex and harder to "hack".
Related:
https://webapps.stackexchange.com/q/84633/88163
https://webapps.stackexchange.com/q/101730/88163

Create page forms with Share Point 2013

I want to create a simple web application with Sharepoint 2013. It is a home page that addresses several forms that each user can fill in all the forms and view the data you entered. Another superuser can view all completed forms by other users. Would he have to do with html + javascript + some database manager? Or could it be declaratively or unscheduled, with elements of SharePoint?
You can use InfoPath forms to allow user fill in data (all saved data stored in sharepoint list), and make custom view to present data stored in a list.
For creating custom view you can use Client Side Rendering (CSR), which just re-rending incoming data, or use Javascript Object Model (JSOM), which will connect to your sharepoint list and display it whatever you want.
If you don't know about these technologies you can read a lot:
Infopath: InfoPath-Forms-Part
CSR: SharePoint-Client-Side-Rendering-List-Views, Client-side-rendering-JS
JSOM: How to: Retrieve List Items Using JavaScript

First loading of a page

I have a single page app working over REST services.
My services have the standard HTTP methods.
When first loading a page, it has many elements, such as menus, dropdowns, information about general context (user messages,user alerts, etc).
Am I supposed to have a REST service to load each page element or should I load all the page data at once?
If loading all data at once, a GET non parametrized is to load a list Stocks what should I do to load the all the page context (with context I mean the page objects)
I mean, will I have lots of services just to load a menu, dropdown list, the number of unread messages?
Write a get service which can serve you with all the data you need at page load, this will be acting as a template service to create your stage.
you could have only two ajax calls (two rest services). The first one to load context data and the second one to load stock data.
I recommend you to use promises, so in that way you could give the control to the user once all data is loaded correctly.
See this article: https://github.com/kriskowal/q
I hope it helps.

How to integrate DTM (Dynamic Tag Management) with AEM 6?

I am a newbie to Adobe DTM (Dynamic Tag Management) and have not done any kind of training related to it. However, I have been given a requirement to integrate DTM with AEM 6. I Have some requirements related to Omniture where certain events on the website are tracked and that information needs to be sent to DTM. I have followed steps described on this blog (http://blogs.adobe.com/aemtutorials/2013/07/24/customize-the-client-context/) to customize the client context by creating a new session store and storing some sample data inside it. Now, next part is to retrieve this data into DTM which I am completely unaware on how to do. What is need to achieve in particular is to create a new data element as shown in the screenshot below and write some custom java script to access the data stored inside the client context (which is present in the session store) as explained in the blog mentioned.
I have no idea on how to integrate DTM with AEM instance and how to get hold of that data needed using the script. There is no info available on the internet regarding this, hence request you to help me in case anybody have worked on such a requirement earlier. Any help is highly appreciated
Step 1 - Set up DTM cloud services configuration in AEM. You may find cloud services config at /etc/cloudservices/dynamictagmanagement.html
Step 2 - Apply the above cloud config to the root of your website using the page property. This will insert the required JS scripts and JS object into the DOM. You could also do step (1) & (2) together by manually inserting header and footer code (from DTM) into the template.
Step 3 - Supply data to DTM JS object. This you could populate the data from server side or at client side using JS. You could leverage client context as well. JS APIs available to query client context.
PS: Am also a learner on this.
Helpful links:
http://blogs.adobe.com/experiencedelivers/experience-management/integrating-dtm-custom-aem6-page-template/
http://docs.adobe.com/docs/en/aem/6-0/administer/integration/marketing-cloud/dtm.html
You can use data elements with custom script like this:
e.g. dataElement authorizableId is custom script with content
return CQ_Analytics.ClientContext.get("/profile/authorizableId");
or
dataElement pageTitle
return CQ_Analytics.PageDataMgr.getProperty("title”);
This is how I implemented it. Please note that this implementation is for integrating with flat HTML files. Where we need to add the scripts in Head tag.
Pre-requisites:
1. We need to have login credentials for DTM website.
We need to have admin rights.
We need sc3.omniture site credentials. This is usually provided by Adobe team.
From Omniture console we need to generate the AppMeasurement.js file.
From AppMeasurement.js file we need to get important details like:
a. Tracking Server Name
b. s_account name
c. Visitor namespace
Connecting HTML files to DTM:
Login to https://dtm.adobe.com with admin credentials.
Click on Project dashboard
Click on Embed tab on top navigation.
Enable Host on Akamai.
Expand Header Code widget and copy the code.
Paste that code in the tag of your HTML.
Go back to DTM again. Expand Footer Code widget and copy the code.
Paste that code to the tag of your HTML.
Configuring DTM for Direct Call Rules:
1. Go to Rules tab from top navigation.
2. Click on Direct Call Rules from left navigation now.
Click on create rule.
Give it a name in the Name section.
Expand Conditions widget.
Pay close attention to the Conditions textbox. Direct Call Rules are fired using the _satelitte.track() method, and the text you enter in the Conditions textbox will be the argument you pass in this method. We entered “change-offer-submit”, so to fire this Direct Call Rule, we will use _satelitte.track(“change-offer-submit”) as you will see in the code below.
Now use the Adobe Analytics section to set up a custom link.
Below is the code that sets up our form and its validation. Notice the way the DTM _satelitte.track() is used. Each of the arguments passed in the _satelitte.track() method matches the Condition textbox in separate DTM rules.
HTML
<div class="outer-btn">
<input class="input-btn analyticsEvent" type="button" value="Submit" data-eventName="change-offer-submit">
</div>
JavaScript
<script>
jQuery('.analyticsEvent').on('click',function() {
window.console.log('Logged Event: ' + jQuery(this).attr('data-eventName'));
_satellite.track(jQuery(this).attr('data-eventName'));
location.href='./landingPage.html';
});
</script>
This has been superseded by a tool added to DTM in the June 2016 release, ContextHub was added in 6.1 as beta, in 6.2 it reached feature parity with ClientContext. It saves a lot of time building data layers as a lot of it will be there already .