PlaceDetailsClass
This class provides the UI for the place detail component containing rich content of a place e.g. reviews, guides, nearby places and owner content.
Example
var detailComponent = new nokia.mh5.components.PlaceDetails({
parameters: {
appId: "demo_wwzrmoloHAFVvyW",
appCode: "Vgl_08RQWnjJo92Lw1F_uQ"
},
place: {
id: "276u33d8-e2482cc709e64ec68b55e3c233405f0a"
},
customContent: [{
name: "myContent",
before: "summary"
}, {
name: "myAnotherContent",
after: "summary",
innerHTML: "My static content"
}],
actions: {
share: null,
route: null
},
listeners: {
update: function(e) {
this.myContent.innerHTML = e.data.content;
}
}
});
document.body.appendChild(detailComponent.root);
Inheritance hierarchy
nokia.mh5.Classnokia.mh5.ui.Control
nokia.mh5.ui.Container
nokia.mh5.components.PlaceDetails
Constructor Detail
Constructor of place details component.
new nokia.mh5.components.PlaceDetails(props, parentContainer);
Constructor Parameters
| Type | Name | Description |
|---|---|---|
| Object | props | properties of the component. The only two properties of this component that cannot be overwritten are summary and recommendations. |
| nokia.mh5.ui.Container | parentContainer | parent container of the search component |
| Object | Array | customContent | one or more user defined components to add to place details |
| String | innerHTML | HTML markup for custom content |
| String | before | name of place details' child to insert custom content before |
| String | after | name of place details' child to instert custom content after |
| String | name | name of custom content, "customContent" by default |
| Object | actions | action buttons component, pass null to disable |
| Object | dial | phone call button, pass null to disable |
| Object | share | share button, pass null to disable |
| Object | route | route button, pass null to disable |
| Object | website | website button, pass null to disable |
| Object | addFavourite | favourites button, pass null to disable |
| Object | ownerContent | place's description provided by the owner, pass null to disable |
| Object | guides | information provided by travel guides, pass null to disable |
| Object | reviews | reviews of the place, pass null to disable |
| Object | error | error screen, pass null to disable |
| Object | legalNote | legal notes is mandatory |
| Object | images | image gallery, pass null to disable |
| Object | listeners | listeners for predefined events |
| Object | nearby | this listener is called when an item from the recommendation list selected. The default behaviour is to show the details of the selected item. You can prevent it by calling preventDefault function on the received event. |
| Object | update | this listener is called when the content of the detail component has to be updated. As parameter you get an object with the property "data" containing the current details. |
Methods Hide Inherited
![]() |
visibleDidChange | Missing Description |
![]() |
build | |
![]() ![]() |
add | Adds a control with the specified name to the container and adds the "parent" property set to the container to it. |
![]() ![]() |
insertBefore | Inserts a control with a specified name to the container before the control with the specified name and adds the "parent" property set to the container to it. |
![]() ![]() |
getContentRoot | Returns the real DOM node of the control without scroll wrapper (if present). |
![]() ![]() |
getRootOwnerByClass | Retrieves the instance that owns the root node of the specified Class. Used to retrieve creator of the component inside bound events. |
![]() ![]() |
prepareBindings | Calls prepareBindings on children controls (if available) and itself. |
![]() ![]() |
prepareDidChangeNotifications | Calls prepareDidChangeNotifications on children controls (if available) and itself. |
![]() |
remove | |
![]() |
resize | Missing Description |
![]() |
unitSystemDidChange | unitSystem binding |
![]() |
update | Updates the page. If no place data set, the page will be just cleaned. |
Properties Hide Inherited
![]() |
Object | spinner | Missing Description |
![]() |
Object | control | base nokia.mh5.ui container |
![]() |
nokia.mh5.adapters.Search | adapter | if no search adapter is specified in the construction of the application, the default one is used. For details on how to create your own search adapter, please see the Getting Started Guide under "Customising Components > Search" |
![]() |
nokia.mh5.ui.Container | actions | the button bar |
![]() |
Array | children | Array with strings, which call the children of the container |
![]() |
Object | ad | Placeholder for advertisement |
![]() |
String | cssClass | |
![]() ![]() |
Boolean | dontBind | makes sure, that the bindings in the container are initialized after the build function of all children is called. |
![]() |
nokia.mh5.ui.Control | ownerContent | the section containing content provided by the owner of the place |
![]() |
Object | layout | nokia.mh5.ui.RowLayout |
![]() |
nokia.mh5.ui.Container | legalNote | UI element containing copyright statements for Nokia and image credit attributions mandatory ie - not settable, not removable |
![]() |
Object | images | an instance of nokia.mh5.ui.Carousel along with configuration properties |
![]() |
nokia.mh5.ui.Control | guides | the section containing content provided by travel guides |
![]() |
Object | parameters | Parameters are passed to nokia.mh5.components.PlaceDetails.adapter.fetch function. The properties can be either primitives or functions. In the last case the functions will be called in the context of the place component. |
![]() |
Object | place | holding object for the "place" being shown. Initially null. |
![]() |
nokia.mh5.ui.Container | recommendations | the ui element relating to the places nearby populated by data from the Nokia recommendations. mandatory ie - not settable, not removable |
![]() |
nokia.mh5.ui.Control | reviews | the section containing reviews of the place |
![]() |
nokia.mh5.components.PlaceSummary | summary | summary of the place |
Events
nokia.mh5.components.PlaceDetails has no events.
Callbacks
nokia.mh5.components.PlaceDetails has no callbacks.
Classes
nokia.mh5.components.PlaceDetails has no classes.
Constants
nokia.mh5.components.PlaceDetails has no constants.
Interfaces
nokia.mh5.components.PlaceDetails has no interfaces.

