Author: adubovsky
Date: 2008-12-09 09:27:43 -0500 (Tue, 09 Dec 2008)
New Revision: 11663
Modified:
trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml
Log:
changes in hotKey
Modified: trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml 2008-12-09
14:27:23 UTC (rev 11662)
+++ trunk/test-applications/facelets/src/main/webapp/HotKey/HotKey.xhtml 2008-12-09
14:27:43 UTC (rev 11663)
@@ -1,19 +1,26 @@
-<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" />
- <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}"
type="#{hotKey.type}" />
+ selector="#{hotKey.selector}" timing="#{hotKey.timing}"
+ type="#{hotKey.type}" />
<h:panelGrid columns="2">
<h:outputText value="type"></h:outputText>
- <h:selectOneMenu value="#{hotKey.type}">
+ <h:selectOneMenu value="#{hotKey.type}"
onchange="submit();">
<f:selectItem itemLabel="onkeydown" itemValue="onkeydown"
/>
<f:selectItem itemLabel="onkeypress" itemValue="onkeypress"
/>
<f:selectItem itemLabel="onkeyup" itemValue="onkeyup" />
- <a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
</h:selectOneMenu>
<h:outputText value="key"></h:outputText>
@@ -27,10 +34,9 @@
</h:selectOneMenu>
<h:outputText value="selector"></h:outputText>
- <h:selectOneMenu value="#{hotKey.selector}">
+ <h:selectOneMenu value="#{hotKey.selector}"
onchange="submit();">
<f:selectItem itemLabel="" itemValue="" />
<f:selectItem itemLabel="Button" itemValue="#commandButtonID"
/>
- <a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
</h:selectOneMenu>
<h:outputText value="handler"></h:outputText>
@@ -42,40 +48,53 @@
</h:selectOneMenu>
<h:outputText value="disableInInput"></h:outputText>
- <h:selectBooleanCheckbox value="#{hotKey.disableInInput}">
- <a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
- </h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{hotKey.disableInInput}"
onchange="submit();" />
<h:outputText value="rendered"></h:outputText>
- <h:selectBooleanCheckbox value="#{hotKey.rendered}">
- <a4j:support reRender="hotKeyID"
event="onchange"></a4j:support>
- </h:selectBooleanCheckbox>
+ <h:selectBooleanCheckbox value="#{hotKey.rendered}"
onchange="submit();"/>
<h:outputText value="test binding: "></h:outputText>
<h:outputText value="#{hotKey.bindingInfo}"></h:outputText>
- <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: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>
+ <f:verbatim>
+ <hr />
+ </f:verbatim>
+
<rich:hotKey id="jsID" timing="onregistercall" />
<h:panelGrid columns="2">
- <h:commandButton id="jsAddCCID" value="add hotkey: alt+z"
onclick="return false;"></h:commandButton>
- <h:commandButton id="jsRemoveCCID" value="remove hotkey: alt+z"
onclick="return false;"></h:commandButton>
+ <h:commandButton id="jsAddCCID" value="add hotkey: shift+d"
+ onclick="return false;"></h:commandButton>
+ <h:commandButton id="jsRemoveCCID" value="remove hotkey:
shift+d"
+ onclick="return false;"></h:commandButton>
- <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 disableDefault="true"
attachTo="jsAddCCID"
+ for="jsID" event="onclick" operation="add">
+ <f:param name="key" value="shift+d" />
+ <f:param name="handler" value="alert('shift+d')" />
</rich:componentControl>
- <rich:componentControl disableDefault="true"
attachTo="jsRemoveCCID" for="jsID" event="onclick"
operation="remove">
- <f:param name="key" value="alt+z" />
+ <rich:componentControl disableDefault="true"
attachTo="jsRemoveCCID"
+ for="jsID" event="onclick" operation="remove">
+ <f:param name="key" value="shift+d" />
</rich:componentControl>
</h:panelGrid>
- <f:verbatim><hr /></f:verbatim>
+
+ <f:verbatim>
+ <hr />
+ </f:verbatim>
+
<h:commandButton action="#{hotKey.add}" value="add test" />
+
+ <!--
<br />
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
@@ -83,7 +102,8 @@
<a4j:commandLink value="getRendererType"
reRender="findID"></a4j:commandLink>
</rich:column>
<rich:column id="findID">
- <!--<h:outputText
value="#{rich:findComponent('hotKeyID').rendererType}" />-->
+ <h:outputText
value="#{rich:findComponent('hotKeyID').rendererType}" />
</rich:column>
</h:panelGrid>
+ -->
</f:subview>
\ No newline at end of file