Author: adubovsky
Date: 2008-07-15 08:25:53 -0400 (Tue, 15 Jul 2008)
New Revision: 9603
Modified:
trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml
Log:
Add new attributes to hotKey
Modified: trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml 2008-07-15
12:25:04 UTC (rev 9602)
+++ trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml 2008-07-15
12:25:53 UTC (rev 9603)
@@ -1,16 +1,11 @@
-
-<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:rich="http://richfaces.org/rich" id="hotKeySubviewID">
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich"
id="hotKeySubviewID">
+
<rich:calendar id="hotKeyCalendarID" popup="false" />
- <h:commandButton id="commandButtonID" onclick="return false;"
- value="test select"></h:commandButton>
+ <h:commandButton id="commandButtonID" onclick="return false;"
value="test select"></h:commandButton>
<rich:hotKey id="hotKeyID" binding="#{hotKey.binding}"
disableInInput="#{hotKey.disableInInput}"
handler="#{hotKey.handler}"
key="#{hotKey.key}" rendered="#{hotKey.rendered}"
- selector="#{hotKey.selector}" timing="#{hotKey.timing}"/>
+ selector="#{hotKey.selector}" timing="#{hotKey.timing}"
type="#{hotKey.type}" />
<h:panelGrid columns="2">
<h:outputText value="type"></h:outputText>
@@ -38,7 +33,6 @@
<a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
</h:selectOneMenu>
-
<h:outputText value="handler"></h:outputText>
<h:selectOneMenu value="#{hotKey.handler}"
onchange="submit();">
<f:selectItem
@@ -52,60 +46,35 @@
<a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
</h:selectBooleanCheckbox>
- <h:outputText value="checkParent"></h:outputText>
- <h:selectBooleanCheckbox value="#{hotKey.checkParent}">
- <a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
- </h:selectBooleanCheckbox>
-
<h:outputText value="rendered"></h:outputText>
<h:selectBooleanCheckbox value="#{hotKey.rendered}">
<a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
</h:selectBooleanCheckbox>
- <h:outputText value="test binding:"></h:outputText>
+ <h:outputText value="test binding: "></h:outputText>
<h:outputText value="#{hotKey.bindingInfo}"></h:outputText>
- <h:commandButton
- onclick="#{rich:component('hotKeyID')}.enable(); return false;"
- value="enable"></h:commandButton>
- <h:commandButton
- onclick="#{rich:component('hotKeyID')}.disable(); return false;"
- value="disable"></h:commandButton>
+ <h:commandButton
onclick="$('formID:hotKeySubviewID:hotKeyID').component.enable(); return
false;" value="enable"></h:commandButton>
+ <h:commandButton
onclick="$('formID:hotKeySubviewID:hotKeyID').component.disable(); return
false;" value="disable"></h:commandButton>
</h:panelGrid>
-
+ <f:verbatim><hr /></f:verbatim>
+
<rich:hotKey id="jsID" timing="onregistercall" />
<h:panelGrid columns="2">
<h:commandButton id="jsAddCCID" value="add hotkey:
alt+z"></h:commandButton>
<h:commandButton id="jsRemoveCCID" value="remove hotkey:
alt+z"></h:commandButton>
- <h:commandLink id="jsAddJSID"
- onclick="document.getElementById('formID:hotKeySubviewID:jsID').component.add({selector:'#formID\\:hotKeySubviewID\\:commandButtonID',
key:'alt+x',handler:function(){alert('alt+x');}}); return false;"
- value="add js: alt+x"></h:commandLink>
- <h:commandLink id="jsRemoveJSID"
- onclick="document.getElementById('formID:hotKeySubviewID:jsID').component.remove();
return false;"
- value="remove js: alt+x"></h:commandLink>
-
- <h:commandButton
- onclick="#{rich:component('jsID')}.enable(); return false;"
- value="enable"></h:commandButton>
- <h:commandButton
- onclick="#{rich:component('jsID')}.disable(); return false;"
- value="disable"></h:commandButton>
-
- <rich:componentControl disableDefault="true"
attachTo="jsAddCCID"
- for="jsID" event="onclick" operation="add">
- <f:param name="selector"
- value="#formID\:hotKeySubviewID\:commandButtonID" />
+ <rich:componentControl disableDefault="true"
attachTo="jsAddCCID" for="jsID" event="onclick"
operation="add">
<f:param name="key" value="alt+z" />
<f:param name="handler" value="alert('alt+z')" />
</rich:componentControl>
- <rich:componentControl disableDefault="true"
attachTo="jsRemoveCCID"
- for="jsID" event="onclick" operation="remove">
+ <rich:componentControl disableDefault="true"
attachTo="jsRemoveCCID" for="jsID" event="onclick"
operation="remove">
+ <f:param name="key" value="alt+z" />
</rich:componentControl>
</h:panelGrid>
- <br />
+ <f:verbatim><hr /></f:verbatim>
<h:commandButton action="#{hotKey.add}" value="add test" />
<br />
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>