varamfer / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

REST API - Label attribute of the current eitemap page #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When request JSON data for a given sitemap page, it doesn't have 
the label of this page in the returned data. It would be nice to 
include the label of the current page and also the label and the path 
of the parent page (this data could be used for a back button).

Original issue reported on code.google.com by mishoboss on 15 Dec 2011 at 9:36

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 15 Dec 2011 at 9:38

GoogleCodeExporter commented 8 years ago
Implemented in commit 
http://code.google.com/p/openhab/source/detail?r=4f00c2bf5816e5169a7777edff34930
c18a12b4a

A page now also has the attributes "title" and "icon".
If a parent page can be determined, it is provided as "parent" incl. its link, 
id, title and icon.

Please note that a unique parent page might not exist - if the page is 
dynamically created for a group (e.g. 
http://localhost:8080/rest/sitemaps/demo/FF_Bath), this page might have been 
linked from different places in the sitemap, therefore no "parent" will be 
returned for it.
A UI should therefore remember the previous page itself in order to provide a 
valid back button.

Original comment by kai.openhab on 18 Dec 2011 at 9:37