I have used Liferay search container for displying data for custom entity and it is working.
I have another portlet where data coming from REST API so is there any way that I can use search container? OR I need to use datatable for that.
My REST API is with pagination and without pagination.
You can use SearchContainer with any data. Its uses with DB is more natural of course but where the data comes from is irrelevant as long as SearchContainer can access it. So you can build your own service that talks to remote API and provides data to the SearchContainer. In case you haven't done that for your other service, see here for example how it can be build server side.
Related
I need to get navigation properties data.
Does anybody know how to use navigation properties using SAP Cloud SDK?
I created a VDM by SAP Cloud SDK VDM Generator.
The source OData is V2 and on S/4 HANA, which is generated by CDS View.
What I want to execute is like following.
HTTP Method: GET
Path: <host, domain, port and path>/(parameter='test')/Set?&fileter=filed eq 'hoge'
You can either fetch the data directly by expanding the navigation properties in the OData call OR fetch them at a later point in time.
To follow the first approach leverage the select functionality of your service class. Pass in the navigation property that you want to retrieve e.g. MyEntityClass.TO_MY_NAVIGATION_PROPERTY. Check out the Cloud SDK documentation for the details and an example.
You then obtain the data by invoking its dedicated Getter on the result entity of your query e.g. myEntityObject.getMyNavigationPropertyIfPresent(). Or you omit expanding in your original request and use myEntityObject.getMyNavigationPropertyOrFetch(). This will again query the server specifically for the data of the navigation property.
Internal Incidents
Stackoverflow
Thank you for replying.
Let me explain in detail.
I created an OData from CDS View on S/4HANA 1709.
The CDS View is with parameters.
The OData should be called like this.
/(parameter='value')/Set?$filter=field eq 'value'
When I tried to call without navigation property, it occurs an error.
/(parameter='value')
Besides, I need "filter" parameter for navigated entity,
since it gets too many records without filtering.
So I don't want to use the both expansion and 2-step fetch.
As workaround, I developed a function module which retrieves data from CDS view.
I'm relatively new to webdevelopment and have been using ArangoDB for most of that limited experience. I have a basic understanding of Node.js and creating express based CRUD apps with ArangoDB as the database.
I'm getting to a point though where I'd like to have the ability to query the database from inside the client. Say I would like to have a datalist-type element where the user types words into a searchbar. I'd like the ability to query the database from there rather than having to query the database for all of its files prior to creating the datalist. I have not found a single mention though of using database queries from the client side. I can't imagine that this is not possible. Surely when I search wikipedia through the search bar and it provides me with options I didn't just receive the entire wikipedia documents list upon loading the page? Please steer me in the right direction, I don't know how to tackle this problem.
Have a look at how to build dynamic forms, this will allow you to perform AJAX style calls from the browser window to a back end REST API service. This will allow your back end web service to gather the data for the response (from ArangoDB if required), and respond with that data, most likely in a JSON format.
Your UI can then take that response and dynamically update components in your DOM so that the user can see the data injected into the page without a page reload action taking place.
https://www.pluralsight.com/search?q=ajax is a great place to start.
Alternatively you can have a look at free content like https://www.youtube.com/watch?v=tNKD0kfel6o
What is the best way to consume an external api's data?
Do I need to create a new web api project and set up routing?
In the past I use a web service data source and attached a repeater. This won't work because I have an API instead of a web service.
Thanks much
you can try this, this is how i've converted my JSON / XML apis (or anything really) into a Transformable object, just clone this tool and adjust to your needs
https://devnet.kentico.com/marketplace/utilities/universal-api-viewer-(with-hierarchy-support)
A custom Data Source is what you would still want to do, as all a data source does really is return a Data Table, my tool there takes it another step by assigning it hierarchy structure and psuedo page types so the Repeater can treat them like items on the content tree.
After reading you can now connect externally do the database, you can use Kentico's ConnnectionHelper to connect to the external database via the Connection String, then query it.
If you have access to the external database, then you can use Kentico's ConnectionHelper class to pass in the external database connection string and run queries against it if you wish.
GeneralConnection ConnectionObj = ConnectionHelper.GetConnection("GetConnectionStringFromWeb.ConfigHere");
ConnectionObj.Open();
DataSet Results = ConnectionObj.ExecuteQuery(new QueryParameters("select * from SomeTable", null, QueryTypeEnum.SQLQuery));
I hope I use the propper terminology. Please correct me if not.
How to access an .nsf file with PHP ? I need to get some field values of tables for clients login purposes around the globe. Let`s say I need to validate if a client is registered and that value is stored in an xyz.nsf file. How to connect and how access it ?
Access your data with http/https request per URL.
You have several choices:
use out-of-the-box Domino URL commands like URL commands for opening documents by key
use IBM Domino Access Services (DAS)
create your own REST service based on ExtLib REST Service
create an XAgent which delivers the data as JSON (see example)
create your own Domino REST service using DAS
Choice #1 returns HTML. All others return JSON data which is probably best to handle with PHP. I'd go for choice #3 ExtLib REST Service.
In my Angular app, I want to display a table which contains the following
a) URL
b) Social share counts divided by different social networks
Using Sails.js, I already have the api created for the URL when the results show up, I can display the URL now I'm confused how to get the appropriate social counts showing right besides
Here's the API I'm using: https://docs.sharedcount.com/
by itself, I can see the JSON it produces
But here are my questions:
Should I create a new api (model/controller) for social count data or include it in my model where I have the 'url' action defined?
If I create a new api or include the social_counts as an action in the current, what would my JSON query look like? to retrieve the URL's, I'm using default API blueprint that Sails provides, so:
http://www.example.com/url/find?where={"title":{"contains":"mark"}}
Struggling a bit in terms of the thought process, would be great to get input on this
It depends on your app. is your app will store that data or just consume it? If it need to store, of course you need the API. In purpose for modification or aggregating the data for example.
No, you can't do that. That shortcut method only works if you have the data in your database and let the Sails Waterline ORM and Blueprint API served it.
Perhaps, if you only need to consume the data from that Sharedcount API, you didn't need to use Sails as a backend, in this context. Just use Angular as a client of that API. Except if you need to modify the data first and store it in your own database, so Sails will helps with it's Waterline ORM and Blueprint API.