1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
<ui:composition xmlns="http://www.w3.org/1999/xhtml" |
18 |
xmlns:h="http://java.sun.com/jsf/html" |
19 |
xmlns:f="http://java.sun.com/jsf/core" |
20 |
xmlns:ui="http://java.sun.com/jsf/facelets" |
21 |
xmlns:mobi="http://www.icesoft.com/icefaces/mobile/component"> |
22 |
|
23 |
<mobi:fieldsetGroup> |
24 |
<mobi:fieldsetRow> |
25 |
The View Manager component can automatically adapt the layout for a device. |
26 |
</mobi:fieldsetRow> |
27 |
</mobi:fieldsetGroup> |
28 |
|
29 |
<h:form> |
30 |
<mobi:fieldsetGroup> |
31 |
<script> |
32 |
//<![CDATA[ |
33 |
/* View style properties need to be cleared for demo when changing transitionTypes */ |
34 |
var transitionType = '#{viewManagerBean.transitionType}'; |
35 |
function clearViewStyles(){ |
36 |
var views = document.getElementsByClassName('mobi-vm-view'); |
37 |
for( var i = 0 ; i < views.length ; i++ ){ |
38 |
views[i].style.webkitTransform = ''; |
39 |
views[i].style.opacity = ''; |
40 |
} |
41 |
} |
42 |
clearViewStyles(); |
43 |
//]]> |
44 |
</script> |
45 |
<mobi:fieldsetRow> |
46 |
<h:outputLabel value="Transition Type:" for="transitionType" styleClass="ui-input-text"/> |
47 |
<h:selectOneMenu id="transitionType" value="#{viewManagerBean.transitionType}"> |
48 |
<f:ajax execute="@this" render="@all"/> |
49 |
<f:selectItem itemLabel="Horizontal" itemValue="horizontal"/> |
50 |
<f:selectItem itemLabel="Vertical" itemValue="vertical"/> |
51 |
<f:selectItem itemLabel="Flip" itemValue="flip"/> |
52 |
<f:selectItem itemLabel="Fade" itemValue="fade"/> |
53 |
|
54 |
</h:selectOneMenu> |
55 |
</mobi:fieldsetRow> |
56 |
<mobi:fieldsetRow rendered="#{not mobiClient.chromeBrowser}"> |
57 |
<h:outputLabel value="Bar Style:" for="barStyle" styleClass="ui-input-text"/> |
58 |
<mobi:inputText id="barStyle" value="#{viewManagerBean.barStyle}" |
59 |
singleSubmit="true"/> |
60 |
</mobi:fieldsetRow> |
61 |
<mobi:fieldsetRow rendered="#{mobiClient.chromeBrowser}"> |
62 |
<label>Header Color:</label> |
63 |
<input type="color" onchange="var sheet = ice.mobi.getStyleSheet('vm-example'); if( !sheet){ sheet = ice.mobi.addStyleSheet('vm-example', 'body'); } sheet.insertRule('.mobi-vm-bar{ background-color: ' + this.value + '}',0);"/> |
64 |
</mobi:fieldsetRow> |
65 |
|
66 |
<mobi:fieldsetRow> |
67 |
<h:outputLabel value="Client Side:" for="clientside" styleClass="ui-input-text"/> |
68 |
<mobi:flipswitch id="clientside" value="#{viewManagerBean.clientSide}"> |
69 |
<mobi:ajax render="@all" execute="@this"/> |
70 |
</mobi:flipswitch> |
71 |
</mobi:fieldsetRow> |
72 |
</mobi:fieldsetGroup> |
73 |
|
74 |
</h:form> |
75 |
</ui:composition> |