28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

11.3.7 Defining the Page Layout<br />

Now that your source data is prepared and connected, you can form your UI using the search.html template.<br />

You may want to start by arranging the available widgets on your site. To place the column, the panes, and the<br />

facets within them, copy, move, or remove the corresponding HTML blocks.<br />

First, place the facet pane and its column(s) as well as the content pane. The panes and the columns inside are<br />

displayed from left to right on the UI in the same order as in the HTML. Only one content pane is allowed.<br />

Typically, a maximum of three facet columns are used. The facet repository is always last in the HTML.<br />

The search box and the facets inside the facet columns are next. The search box can span the entire pane across<br />

multiple columns. Place as many placeholder work area items as you want to have slots in a column. Inside the<br />

content pane, only one placeholder is allowed. Make sure that the data-target-position count is<br />

continuously set across the facet columns and the content pane.<br />

The facet repository holds the actual facets, meaning the chart switch boxes and the result list. The datasource-position<br />

parameter defines their position inside the facet repository as well as inside the columns<br />

and the content pane at page load.<br />

If the source position equals the target position, the respective facet replaces the placeholder in the columns and<br />

pane. If there are two or more facets with the same source position number, only the first one in the HTML<br />

replaces the placeholder. In the facet repository, all defined facets are available in the order of the source position<br />

or their appearance in the HTML. At runtime, the user can drag and drop the facets.<br />

At least one facet pane and content pane are required for the facet repository and free drag-and-drop. However,<br />

you could also build a minimal static UI with a workarea containing just a search box and a result list, for example.<br />

You can even integrate single widgets into other sites.<br />

Related Links<br />

workareaitem [page 316]<br />

11.3.8 Configuring the Widgets<br />

The widgets are based on jQuery UI. In the HTML, you can customize the single widgets to a certain degree using<br />

parameters. The common parameter data-sap-widget defines the type of the widget.<br />

Each widget type has its own set of parameters. The widgets and their parameters are listed in the order of<br />

appearance in the demo HTML file.<br />

header<br />

Parameter Name Default Value Description<br />

data-title none Title text in the header bar of the UI.<br />

data-helphref none Reference to the documentation for the users of your application.<br />

workarea<br />

Parameter Name Default<br />

Value<br />

Description<br />

data-title none This title is not displayed on the UI.<br />

data-packagename none Name of the database package in which the attribute view was created.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Enabling Search<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 315

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!