I have a Copy Data task which is obtaining data from an API
The API is a GET call to a method and requires 2 parameters
_token
Symbols
I have defined these as parameters
What is the syntax that allows me to use the values of my parameters as the values that are in the query string? So in the screenshot above Symbols is hard coded, but I want the value to be the value of the parameters
I need a screen solution rather than code please as I am not comfortable with ADF yet and I dont know how to get to the code/ARM views
Paul
Using a feature called string interpolation where expressions are wrapped in #{ ... }
Click on the Base URL field. Add Parameters. Using Concat expression function,
Example:
#{Concat('https://stackoverflow.com/questions/GetRealTimeRates?',linkedService().Symbols,'=',linkedService()._token)}
Add first parameter:
Add second parameter:
Test connection. If you see any error, it would provide a description as to debug further.
Pimcore newbie here. I'm struggling a bit with the csv import procedure, the docs are a bit shallow and I couldn't find a more comprehensive developer reference.
I'm not getting how Resolver Settings work. What's the meaning of setting a strategy? (ID throws Pimcore\DataObject\Import\Resolver\ImportErrorException: Could not resolve object with id. Filename runs, but then it seems that I don't have control on how objects get labeled)
I have two date columns in my imported csv, so I'd like to fill my object with those. Still, the dates are written like "2016-05-30T14:36:03" so I guess that I need to process a bit to transform the string in a format that could be recognized by pimcore. Do I need to do this in Column Configuration (by converting the specific column as an Operator PHP Code. BTW, do I need to create a class for every column, or I can group them by data format?) or more globally by setting the Resolver Strategy as Code and editing all the row properties at once?
About the resolver
When importing a CSV, Pimcore has for each row basically two options: create a new DataObject or update an existing one. When you want Pimcore to update existing DataObjects then you need some logic to retrieve that specific DataObject based on some info in the CSV. That's where the Resolver comes in place.
Pimcore supports 5 different resolver strategies:
Id: your CSV needs to contain a column with the DataObject id, and that value is used to fetch the corresponding DataObject to update
Filename: same as above, but for the filename (= key) of the DataObject
Fullpath: same as above, but for the full path of the DataObject
GetByAttribute: same as above, but for a given attribute within the DataObject (for example if you have a field ProductCode in it)
Code: a custom PHP class containing logic to retrieve the existing DataObject
The Id operator has one drawback, which you are currently running into:
Resolves the objects via the object ID. The object has to exist, otherwise an error is thrown.
Based on your question, I have the feeling that you are only inserting new DataObjects (at least for now, maybe you might also want to update later on).
When creating DataObjects you need to specify a key/filename (most likely you already noticed that when creating an object manually), so your CSV should already (if it doesn't you should add it) contain a column with either that key/filename or with the full path for the new DataObjects. That same column can/should be used to resolve any (potentially already) existing DataObjects.
So you should use either the Filename or Fullpath Resolver. Both have options what to do if the object already exists (update it? ignore it?) and (more important in your situation) what to do when it doesn't exist yet.
About the dates
Looking at the code, any string that can be parsed by the PHP's method strtotime can be entered in your CSV. Your value 2016-05-30T14:36:03 parses just fine.
I am trying to preserve state of a table using RichFaces. RichFaces has this functionality of tableState which is a json string of all information about the table. The tableState string right now looks like this
{"columnsWidthState":{"j_idt433":"140px","j_idt269":"32px","j_idt379":"80px","j_idt424":"200px","j_idt415":"200px","j_idt406":"110px","j_idt375":"115px","j_idt397":"80px","j_idt388":"120px"},"columnsSortState":{"j_idt433":null,"j_idt269":null,"j_idt379":null,"j_idt424":null,"j_idt415":null,"j_idt406":null,"j_idt375":null,"j_idt397":null,"j_idt388":null},"columnsOrderState":["j_idt269","j_idt375","j_idt379","j_idt388","j_idt397","j_idt406","j_idt415","j_idt424","j_idt433"],"columnsFilterState":{"j_idt433":null,"j_idt269":null,"j_idt379":null,"j_idt424":null,"j_idt415":null,"j_idt406":null,"j_idt375":null,"j_idt397":null,"j_idt388":null}}
I am curios to know how this identifiers are generated i.e. j_idt388 etc. I tried giving id to the column and the richfaces tableState string honored that. The tableState json looks like this now
{"columnsWidthState":{"date":"140px","sessions":"110px","application":"115px","activity":"200px","kvalue":"80px","risk":"80px","account":"120px","riskFactor":"200px","status":"32px"},"columnsSortState":{"date":null,"sessions":null,"application":null,"activity":null,"kvalue":null,"risk":null,"account":null,"riskFactor":null,"status":null},"columnsOrderState":["status","application","account","kvalue","sessions","riskFactor","activity","risk","date"],"columnsFilterState":{"date":null,"sessions":null,"application":null,"activity":null,"kvalue":null,"risk":null,"account":null,"riskFactor":null,"status":null}}
I preserve this json string so that in future if I log in, I should see the state of table same as I left.
Problem is that once I log out and log in into my application. RichFaces fails and throws an exception. It makes me feel its not able to recognize the json string anymore but I wonder why. Here's the exception:
java.lang.NullPointerException: null
at org.richfaces.renderkit.ExtendedDataTableRenderer.encodeHeaderOrFooterCell(ExtendedDataTableRenderer.java:275) ~[richfaces-4.5.13.Final.jar:4.5.13.Final]
at org.richfaces.renderkit.ExtendedDataTableRenderer.encodeHeaderOrFooter(ExtendedDataTableRenderer.java:378) ~[richfaces-4.5.13.Final.jar:4.5.13.Final]
at org.richfaces.renderkit.ExtendedDataTableRenderer.encodeHeader(ExtendedDataTableRenderer.java:466) ~[richfaces-4.5.13.Final.jar:4.5.13.Final]
at org.richfaces.renderkit.ExtendedDataTableRenderer.doEncodeChildren(ExtendedDataTableRenderer.java:725) ~[richfaces-4.5.13.Final.jar:4.5.13.Final]
JSF generates IDs for elements, where the developer hasn't set his own ID in the element's attribute. This results in the IDs beginning with j_id you posted in your first code snippet (for example j_idt433). You can read more about the ID generation in this answer.
ID generation depends on counting the number of elements. Thus, if you persist a table state and later try to restore it, and the number of elements before the table changed, the IDs are not correct anymore. This may result in the exception you posted.
To prevent this, just give every <rich:column /> an ID.
I'm writing an action method that will store a new object in a database. Once this is done, I want to navigate to view that newly created object. To do this, I was planning to include a querystring or some sort of parameter in the return String of the action method, but I can't figure out how. If I append a query string manually, it appears that it's being ignored. Also, manually adding parameters by concatenating strings doesn't seem like a good idea to me. Is it possible to do this in a type-safe manner?
The way I've always handled this is to get a reference to the bean which provides the content for the page you'll be displaying, and just set its properties directly. The navigation string returned from an action method isn't meant for passing parameters, but you don't need it to; all they'd be used for is setting bean properties anyway.
first of all I'm totally new to FAST but I already have a couple of issues I need to solve, so I'm sorry if my questions are very basic =)
Well, the problem is that I have a field in the FAST index which in the source document is something like "ABC 12345" (please note the intentional whitespaces) but when stored in the index is in the form "ABC 123456" (please note that now there is a single space).
If I retrieve all the document values then this specific value is OK (with all the whitespaces), my only problem is with the way the value is stored in the index since I need to retrieve and display it to my user just like it appears in the original document, and I don't want to go to the full document just for this value, I want the value that I already have in the index. I think I need to update one of the FAST XML configuration files but I don't have enough documentation at hand in order to decide where to perform the change, index_profile.xml? in the XMLMapper file?
I've found the answer by myself. I'm using a XMLMapper for my collection, all I had to do was to add the ignore-whitespace attribute to the Mapping element and then set this attribute value to "false". This solved the problem and the raw data now when retrieved from the index contains the expected inner whitespaces.
Thanks.