SAPUI5 Right List items Path with using keyword - sapui5

When i try to list that path i am getting an error. What is the right syntax for path in my scenario? How can use like ('USER') keys?
items="{path:'/personel('USER')/issues'}"
also i triend this. (>)
items="{path:'/personel('USER')>/issues'}"

Related

Flutter build runner ElementVisitor get path

I am working with Code-Generation and trying to get the path of the Annotated-File.
I would need it inside the visitFieldElement:
#override
dynamic visitFieldElement(FieldElement element) {
// Get path here
}
I tried couple of different things: element.source, elenment.librarySource, element.location.
But non of them is giving me the exact path relativ from lib/.
I know I can simply extract it from e.g the element.location but I thought there must be a cleaner way to get this done.
It should be possible since the builder itself is printing out the path:
Any idea? Let me know if you need any more info!
If you have an element to use via visiting children,
then I believe you do have the "buildStep" variable,
it contains the "path" variable and I think that is what you are looking for.

How to construct URL for Google API with query parameters

I'm trying to construct a URL to request with GET method:
https://dataform.googleapis.com/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile
https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories.workspaces/readFile#query-parameters
what I have but not working:
https://dataform.googleapis.com/v1beta1/{workspace=projects/my-project/locations/europe-west4/repositories/my-repo/workspaces/my-workspace}:readFile
Now I don't know how to put in the query parameter path.
I've tried to add ;path=my_file%2Ejson or ?path=my_file%2Ejson at the end of above URL and path is my_file at root of my-repo
My question is:
Is this even the right way to do this and how to do this correctly?
This is the correct query syntax for setting the path in your case:
https://dataform.googleapis.com/v1beta1/projects/MY_GCP_PROJECT/locations/europe-west4/repositories/REPOSITORY_NAME/workspaces/MY_WORKSPACE:readFile?path=my_file.json
So it works without the curly brackets and "workspace=".

Search string formatting in Elouqa API

I'm using the Elouqa Rest API in an integration with another product and I want to implement a file browser. As part of this I want to get a list of the folders inside another folder. Theapi documents here say that a search string can be appended but don't give any clues as to the format of the search string. I've tried various things but so far I'm just getting empty results. An example is here:
/API/rest/1.0/assets/email/folders?search=folderId+%3D+250
I've tried with and without +'s and with and without url encoding the = sign, also various combinations of quote marks but so far nothing.
I believe what you want is a slightly different endpoint e.g.:
/API/rest/1.0/assets/email/folder/250/contents
Which would provide a list of folders contained with folder 250
If you wanted to search for a given folder name then you would use
/API/rest/1.0/assets/email/folders?search=foldername
Hope that helps!

How to map urls?

I would like to map pages such domain/content/myProject/home.html to domain/home.html. /content/myProject/ is not needed. I have the following code:
String newpath = getResourceResolver().map(page.getPath());
this does not change anything. newpath is stay page.getPath()
how to solve this issue?
Answering as this question as it remains unanswered. Here is an example of how the etc mappings should look like:
Trick is you add 2 entries to sling:internalRedirect as / and /content/example/
AEM first tries to resolve resources with first entry '/'. So non page URLs like /etc/designs, /content/dam etc will be addressed by the first entry. If it is unable to resolve using the first one, it uses the second entry to resolve the page.
This is also the adobe recommended way for URL shortening compared to other techniques like apache redirect.
You need to create map in etc.Then Resource Resolver will take care of trimming the path .
CREATING MAPPING DEFINITIONS IN AEM
In a standard installation of AEM you can find the folder:
/etc/map/http
This is the structure used when defining mappings for the HTTP protocol. Other folders (sling:Folder) can be created under /etc/map for any other protocols that you want to map.
Configuring an Internal Redirect to /content
To create the mapping that prefixes any request to http://localhost:4503/ with /content:
Using CRXDE navigate to /etc/map/http.
Create a new node:
Type sling:Mapping
This node type is intended for such mappings, though its use is not mandatory.
Name localhost_any
Click Save All.
Add the following properties to this node:
Name sling:match
Type String
Value localhost.4503/
Name sling:internalRedirect
Type String
Value /content/
Click Save All.
This will handle a request such as:
localhost:4503/geometrixx/en/products.html
as if:
localhost:4503/content/geometrixx/en/products.html
had been requested.
You can refer here for further documentation http://docs.adobe.com/docs/en/cq/5-6-1/deploying/resource_mapping.html

How to add an extra plist property using CMake?

I'm trying to add the item
<key>UIStatusBarHidden</key><true/>
to my plist that's auto-generated by CMake. For certain keys, it appears there are pre-defined ways to add an item; for example:
set(MACOSX_BUNDLE_ICON_FILE ${ICON})
But I can't find a way to add an arbitrary property.
I tried using the MACOSX_BUNDLE_INFO_PLIST target property as follows: I'd like the resulting plist to be identical to the old one, except with the new property I want, so I just copied the auto-generated plist and set that as my template. But the plist uses some Xcode variables, which also look like ${foo}, and CMake grumbles about this:
Syntax error in cmake code when
parsing string
<string>com.bedaire.${PRODUCT_NAME:identifier}</string>
syntax error, unexpected cal_SYMBOL,
expecting } (47)
Policy CMP0010 is not set: Bad
variable reference syntax is an error.
Run "cmake --help-policy CMP0010"
for policy details. Use the
cmake_policy command to set the
policy and suppress this warning. This
warning is for project developers.
Use -Wno-dev to suppress it.
In any case, I'm not even sure that this is the right thing to do. I can't find a good example or any good documentation about this. Ideally, I'd just let CMake generate everything as before, and just add a single extra line. What can I do?
Have you looked into copying the relevant *.plist.in file in /opt/local/share/cmake-2.8/Modules (such as MacOSXBundleInfo.plist.in), editing it to put <key>UIStatusBarHidden</key><true/> (or #VAR_TO_REPLACE_BY_CMAKE#), and adding the directory of the edited version in the CMAKE_MODULE_PATH?
If you have CMake installed as an app bundle, then the location of that file is /Applications/CMake.app/Contents/share/cmake-N.N/Modules
You can add your values using # and pass #ONLY to configure_file.
Unfortunately there is no simple way to add custom line to generated file.