Latest WebCenter Portal release (11.1.1.8) includes some useful features that control how the pages are displayed in different devices. Also, if you are interested in modifying some Portal behavior in your code, deviceManagement EL expressions are available.
The following piece of code will return the device type accessing Portal:
<af:outputText value="#{DeviceAgent.currentScopeDeviceGroup.name}" id="a1"/>
This group of expressions has several applications, for instance conditional rendering:
<af:commandLink rendered="#{DeviceAgent.currentScopeDeviceGroup.name eq 'desktopBrowsers' or DeviceAgent.currentScopeDeviceGroup.name eq 'iOSTablets'}"
text="Register"
id="gl1" styleClass="linkBlue">
<af:clientListener method="open" type="click"/>
</af:commandLink>
That piece of code will show a Registration link only if the user is accessing Portal via desktop computer or iPads.
Possible values: desktopBrowsers, iOSTablets, iOSPhones, androidTablets, ...
No comments:
Post a Comment