Page 1 of 1

Retain mapping when updating REST service

Posted: Tue Nov 12, 2013 11:17 am
by AlexHill

When I want to add an element to a page that has elements populated by a REST service, I also update the REST response (I create my own responses). The problem is that the mapping disappears when the service is updated. Perhaps if the REST response names are unchanged their mapping should also remain? That way we can add additional elements to the REST response, and only have to map the new elements.


Retain mapping when updating REST service

Posted: Tue Nov 12, 2013 12:11 pm
by Kateryna Grynko

Hi Alex,

Element created by service have another names because they should be unique for a page. You can work with them using other selectors, for example:
code.Screen_component/code
where 'Screen' is a page name,
'component' is a component name.


Retain mapping when updating REST service

Posted: Wed Nov 13, 2013 3:20 am
by AlexHill

Sorry, the element isnt created by the service, let me try and explain with an example.

Current Mapping:
REST -- Element on page
[Name] -- [Label_Name]
[PhoneNumber] -- [Label_PhoneNumber]

Now as the app develops I decide I want to add in a user's mail address too, so I add another label, and update the REST response to include their email address:

REST -- Element on Page
[Name] -- [Label_Name]
[PhoneNumber] -- [Label_PhoneNumber]
[EmailAddress] -- [Label_EmailAddress]

However when I update the service response to include the email address, the current mapping of name and phone number disappear and I need to re-map them. It isnt a huge issue, but it does take a bit of time to re-map things.


Retain mapping when updating REST service

Posted: Wed Nov 13, 2013 3:54 am
by Illya Stepanov

Hi Alex, can you share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a? We'll test it.
:: http://docs.appery.io/documentation/s...