Resource Query Language (RQL) in declaration of navigation elements makes the UI structure more flexible.
In this document:
RQL statements operate properties of variables declared in navigation elements.
The following attributes of navigation elements can use RQL to calculate their values.
visible
in an item, view,
or view-plugin element accepts a boolean value. This hides
the respective visual component or makes it visible on the screen. In the following example,
the showNetworkTab property of the vpsmanagement variable defines if the control panel will
show the item.
<item id="network" label="Network" visible="vpsmanagement.showNetworkTab=eq=true()">
filter
in a var element defines resources to be added
to the declared variable. The following declaration of the vps variable adds a linked offer to the variable:
<view id="server-edit" label="Edit">
<var name="vps" type-id="http://aps-standard.org/samples/basic/vps/2.0"
filter="select(offer)"/>
<controls>
<cancel/>
<finish/>
</controls>
</view>
This allows the server-edit view to process not only the selected VPS but also the offer linked with it.
A label
or step-label of a navigation item,
wizard host, or view
can get its value dynamically. In the following example, the offer-edit view will display
the name of the offer opened for editing:
<view id="offer-edit" label="Edit Offer {offer.name}">
<var name="offer" type-id="http://aps-standard.org/samples/offer-mgmt/offer/1.0"/>
<controls>
<cancel/>
<submit/>
</controls>
</view>
The mentioned above RQL operations are performed before a visual element is processed. The navigation mechanism can read only navigation data and is not able to change any data.
implementing()
, limit()
, or sort()
.filter
property is processed by the APS controller. That is why, a filter must operate objects
and their properties that the APS controller can find in its database. For example, it should not use a variable name
defined in navigation metadata.