JBoss Rich Faces SVN: r9323 - trunk/test-applications/jsp/src/main/webapp/Gmap.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-01 11:36:17 -0400 (Tue, 01 Jul 2008)
New Revision: 9323
Modified:
trunk/test-applications/jsp/src/main/webapp/Gmap/GmapProperty.jsp
Log:
+findComponent
Modified: trunk/test-applications/jsp/src/main/webapp/Gmap/GmapProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Gmap/GmapProperty.jsp 2008-07-01 14:31:44 UTC (rev 9322)
+++ trunk/test-applications/jsp/src/main/webapp/Gmap/GmapProperty.jsp 2008-07-01 15:36:17 UTC (rev 9323)
@@ -4,71 +4,86 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="GmapPropertySubviewID">
- <h:panelGrid columns="2">
- <h:outputText value="mapType"></h:outputText>
- <h:selectOneMenu value="#{gmap.mapType}" onchange="submit();">
- <f:selectItem itemLabel="G_NORMAL_MAP" itemValue="G_NORMAL_MAP"/>
- <f:selectItem itemLabel="G_SATELLITE_MAP" itemValue="G_SATELLITE_MAP"/>
- <f:selectItem itemLabel="G_HYBRID_MAP" itemValue="G_HYBRID_MAP"/>
- </h:selectOneMenu>
+ <h:panelGrid columns="2">
+ <h:outputText value="mapType"></h:outputText>
+ <h:selectOneMenu value="#{gmap.mapType}" onchange="submit();">
+ <f:selectItem itemLabel="G_NORMAL_MAP" itemValue="G_NORMAL_MAP" />
+ <f:selectItem itemLabel="G_SATELLITE_MAP" itemValue="G_SATELLITE_MAP" />
+ <f:selectItem itemLabel="G_HYBRID_MAP" itemValue="G_HYBRID_MAP" />
+ </h:selectOneMenu>
- <h:outputText value="enableInfoWindow:"></h:outputText>
- <h:selectOneRadio value="#{gmap.enableInfoWindow}" onchange="submit();">
- <f:selectItem itemLabel="on" itemValue="true"/>
- <f:selectItem itemLabel="off" itemValue="false"/>
- </h:selectOneRadio>
-
- <h:outputText value="showGLargeMapControl:"></h:outputText>
- <h:selectOneRadio value="#{gmap.showGLargeMapControl}" onchange="submit();">
- <f:selectItem itemLabel="on" itemValue="true"/>
- <f:selectItem itemLabel="off" itemValue="false"/>
- </h:selectOneRadio>
+ <h:outputText value="enableInfoWindow:"></h:outputText>
+ <h:selectOneRadio value="#{gmap.enableInfoWindow}"
+ onchange="submit();">
+ <f:selectItem itemLabel="on" itemValue="true" />
+ <f:selectItem itemLabel="off" itemValue="false" />
+ </h:selectOneRadio>
+ <h:outputText value="showGLargeMapControl:"></h:outputText>
+ <h:selectOneRadio value="#{gmap.showGLargeMapControl}"
+ onchange="submit();">
+ <f:selectItem itemLabel="on" itemValue="true" />
+ <f:selectItem itemLabel="off" itemValue="false" />
+ </h:selectOneRadio>
- <h:outputText value="showGMapTypeControl:"></h:outputText>
- <h:selectOneRadio value="#{gmap.showGMapTypeControl}" onchange="submit();">
- <f:selectItem itemLabel="on" itemValue="true"/>
- <f:selectItem itemLabel="off" itemValue="false"/>
- </h:selectOneRadio>
+ <h:outputText value="showGMapTypeControl:"></h:outputText>
+ <h:selectOneRadio value="#{gmap.showGMapTypeControl}"
+ onchange="submit();">
+ <f:selectItem itemLabel="on" itemValue="true" />
+ <f:selectItem itemLabel="off" itemValue="false" />
+ </h:selectOneRadio>
- <h:outputText value="showGScaleControl:"></h:outputText>
- <h:selectOneRadio value="#{gmap.showGScaleControl}" onchange="submit();">
- <f:selectItem itemLabel="on" itemValue="true"/>
- <f:selectItem itemLabel="off" itemValue="false"/>
- </h:selectOneRadio>
-
- <h:outputText value="warningMessage:"></h:outputText>
- <h:inputText value="#{gmap.warningMessage}" onchange="submit()" ></h:inputText>
-
- <h:outputText value="lng:"></h:outputText>
- <h:inputText value="#{gmap.lng}" onchange="submit()" ></h:inputText>
-
- <h:outputText value="lat:"></h:outputText>
- <h:inputText value="#{gmap.lat}" onchange="submit()" ></h:inputText>
- <h:outputText value="locale:"></h:outputText>
- <h:inputText value="#{gmap.locale}" onchange="submit()" ></h:inputText>
-
- <h:outputText value="Dragging:" />
- <h:selectOneRadio value="#{gmap.dragging}" onchange="submit();">
- <f:selectItem itemLabel="on" itemValue="true"/>
- <f:selectItem itemLabel="off" itemValue="false"/>
- </h:selectOneRadio>
+ <h:outputText value="showGScaleControl:"></h:outputText>
+ <h:selectOneRadio value="#{gmap.showGScaleControl}"
+ onchange="submit();">
+ <f:selectItem itemLabel="on" itemValue="true" />
+ <f:selectItem itemLabel="off" itemValue="false" />
+ </h:selectOneRadio>
- <h:outputText value="Continuous Zoom:" />
- <h:selectOneRadio value="#{gmap.continuousZoom}" onchange="submit();">
- <f:selectItem itemLabel="on" itemValue="true"/>
- <f:selectItem itemLabel="off" itemValue="false"/>
- </h:selectOneRadio>
+ <h:outputText value="warningMessage:"></h:outputText>
+ <h:inputText value="#{gmap.warningMessage}" onchange="submit()"></h:inputText>
- <h:outputText value="Double Click Zoom:" />
- <h:selectOneRadio value="#{gmap.doubleClickZoom}" onchange="submit();">
- <f:selectItem itemLabel="on" itemValue="true"/>
- <f:selectItem itemLabel="off" itemValue="false"/>
- </h:selectOneRadio>
-
- <h:outputText value="rendered:"></h:outputText>
- <h:selectBooleanCheckbox value="#{gmap.rendered}" onchange="submit();"></h:selectBooleanCheckbox>
- </h:panelGrid>
+ <h:outputText value="lng:"></h:outputText>
+ <h:inputText value="#{gmap.lng}" onchange="submit()"></h:inputText>
+
+ <h:outputText value="lat:"></h:outputText>
+ <h:inputText value="#{gmap.lat}" onchange="submit()"></h:inputText>
+
+ <h:outputText value="locale:"></h:outputText>
+ <h:inputText value="#{gmap.locale}" onchange="submit()"></h:inputText>
+
+ <h:outputText value="Dragging:" />
+ <h:selectOneRadio value="#{gmap.dragging}" onchange="submit();">
+ <f:selectItem itemLabel="on" itemValue="true" />
+ <f:selectItem itemLabel="off" itemValue="false" />
+ </h:selectOneRadio>
+
+ <h:outputText value="Continuous Zoom:" />
+ <h:selectOneRadio value="#{gmap.continuousZoom}" onchange="submit();">
+ <f:selectItem itemLabel="on" itemValue="true" />
+ <f:selectItem itemLabel="off" itemValue="false" />
+ </h:selectOneRadio>
+
+ <h:outputText value="Double Click Zoom:" />
+ <h:selectOneRadio value="#{gmap.doubleClickZoom}" onchange="submit();">
+ <f:selectItem itemLabel="on" itemValue="true" />
+ <f:selectItem itemLabel="off" itemValue="false" />
+ </h:selectOneRadio>
+
+ <h:outputText value="rendered:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{gmap.rendered}" onchange="submit();"></h:selectBooleanCheckbox>
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getRendererType" reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText value="#{rich:findComponent('gMapID').rendererType}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 6 months
JBoss Rich Faces SVN: r9322 - trunk/test-applications/jsp/src/main/webapp/FileUpload.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-01 10:31:44 -0400 (Tue, 01 Jul 2008)
New Revision: 9322
Modified:
trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp
Log:
+findComponent
Modified: trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp 2008-07-01 14:09:47 UTC (rev 9321)
+++ trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp 2008-07-01 14:31:44 UTC (rev 9322)
@@ -2,18 +2,16 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-<style>
-.addButton{
-color:white;
-background-color:red;
-}
+<style>
+.addButton {
+ color: white;
+ background-color: red;
+}
</style>
<f:subview id="FileUploadSubviewID">
<rich:fileUpload id="fileUploadID" status="a4jStatusID"
- onadd="#{event.onadd}"
- immediate="#{fileUpload.immediate}"
- ajaxSingle="#{fileUpload.ajaxSingle}"
- uploadData="#{fileUpload.data}"
+ onadd="#{event.onadd}" immediate="#{fileUpload.immediate}"
+ ajaxSingle="#{fileUpload.ajaxSingle}" uploadData="#{fileUpload.data}"
acceptedTypes="#{fileUpload.acceptedTypes}"
disabled="#{fileUpload.disabled}" autoclear="#{fileUpload.autoclear}"
required="#{fileUpload.required}" requiredMessage="#{item.fileName}"
@@ -24,19 +22,19 @@
fileUploadListener="#{fileUpload.fileUploadListener}"
onuploadcanceled="#{event.onuploadcanceled}"
onclear="#{event.onclear}" onblur="#{event.onblur}"
- onchange="#{event.onchange}" onclick="#{event.onclick}"
+ onchange="#{event.onchange}" onclick="alert('onclick!!')"
ondblclick="#{event.ondblclick}" onerror="#{event.onerror}"
onfocus="#{event.onfocus}" onkeydown="#{event.onkeydown}"
onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}"
- onmouseout="#{event.onmousemout}" onmouseover="#{event.onmouseover}"
- onmouseup="#{event.onmouseup}" onselect="#{event.onselect}"
- onsizerejected="#{event.onsizerejected}"
+ onmouseout="#{event.onmousemout}"
+ onmouseover="alert('onmouseover work')" onmouseup="#{event.onmouseup}"
+ onselect="#{event.onselect}" onsizerejected="#{event.onsizerejected}"
ontyperejected="#{event.ontyperejected}" onupload="#{event.onupload}"
onuploadcomplete="#{event.onuploadcomplete}" accesskey="y"
alt="alternative" binding="#{fileUpload.myFileUpload}"
addButtonClass="#{fileUpload.addButtonClass}"
- addButtonClassDisabled="#{fileUpload.addButtonClassDisabled}"
+ addButtonClassDisabled="#{fileUpload.addButtonClassDisabled}"
cleanButtonClass="#{fileUpload.cleanButtonClass}"
cleanButtonClassDisabled="#{fileUpload.cleanButtonClassDisabled}"
fileEntryClass="#{fileUpload.fileEntryClass}"
@@ -56,13 +54,13 @@
stopControlLabel="stopControl"
stopEntryControlLabel="stopEntryControl"
transferErrorLabel="transferError" uploadControlLabel="uploadControl"
- allowFlash="#{fileUpload.allowFlash}">
+ allowFlash="#{fileUpload.allowFlash}">
<f:facet name="label">
<h:outputText value="{_KB}KB from {KB}KB uploaded :[ {mm}:{ss} ]"></h:outputText>
</f:facet>
<f:facet name="header">
<h:outputText value="some text"></h:outputText>
- </f:facet>
+ </f:facet>
</rich:fileUpload>
<h:panelGrid columns="2">
@@ -135,21 +133,21 @@
<h:selectBooleanCheckbox value="#{fileUpload.ajaxSingle}">
<a4j:support event="onchange" reRender="fileUploadID"></a4j:support>
</h:selectBooleanCheckbox>
-
+
<h:outputText value="immediate"></h:outputText>
<h:selectBooleanCheckbox value="#{fileUpload.immediate}">
<a4j:support event="onchange" reRender="fileUploadID"></a4j:support>
</h:selectBooleanCheckbox>
-
+
<h:outputText value="Uploaded data:"></h:outputText>
<h:outputText value="#{fileUpload.changedLabel}"></h:outputText>
-
+
<h:outputText value="allowFlash" />
<h:selectOneRadio value="#{fileUpload.allowFlash}">
- <f:selectItem itemValue="true" itemLabel="true"/>
- <f:selectItem itemValue="false" itemLabel="false"/>
- <f:selectItem itemValue="auto" itemLabel="auto"/>
- <a4j:support event="onchange" reRender="fileUploadID"></a4j:support>
+ <f:selectItem itemValue="true" itemLabel="true" />
+ <f:selectItem itemValue="false" itemLabel="false" />
+ <f:selectItem itemValue="auto" itemLabel="auto" />
+ <a4j:support event="onchange" reRender="fileUploadID"></a4j:support>
</h:selectOneRadio>
<a4j:commandLink
@@ -167,20 +165,34 @@
</h:panelGrid>
<br />
<f:verbatim>
- <h:outputText value="Component controll" style="FONT-WEIGHT: bold;"></h:outputText>
+ <h:outputText value="Component controll" style="FONT-WEIGHT: bold;"></h:outputText>
+ <br />
+ <a href="#" id="enableID">enable()</a>
+ <br />
+ <a href="#" id="disableID">disable()</a>
+ <br />
+ <a href="#" id="stopID">stop()</a>
+ <br />
+ <a href="#" id="clearID">clear()</a>
+ </f:verbatim>
+
+ <rich:componentControl attachTo="enableID" event="onclick"
+ for="fileUploadID" operation="enable"></rich:componentControl>
+ <rich:componentControl attachTo="disableID" event="onclick"
+ for="fileUploadID" operation="disable"></rich:componentControl>
+ <rich:componentControl attachTo="stopID" event="onclick"
+ for="fileUploadID" operation="stop"></rich:componentControl>
+ <rich:componentControl attachTo="clearID" event="onclick"
+ for="fileUploadID" operation="clear"></rich:componentControl>
<br />
- <a href="#" id="enableID">enable()</a>
<br />
- <a href="#" id="disableID">disable()</a>
- <br />
- <a href="#" id="stopID">stop()</a>
- <br />
- <a href="#" id="clearID">clear()</a>
- </f:verbatim>
-
- <rich:componentControl attachTo="enableID" event="onclick" for="fileUploadID" operation="enable"></rich:componentControl>
- <rich:componentControl attachTo="disableID" event="onclick" for="fileUploadID" operation="disable"></rich:componentControl>
- <rich:componentControl attachTo="stopID" event="onclick" for="fileUploadID" operation="stop"></rich:componentControl>
- <rich:componentControl attachTo="clearID" event="onclick" for="fileUploadID" operation="clear"></rich:componentControl>
-
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getFileName" reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText value="#{rich:findComponent('fileUploadID').uploadData[0].fileName}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 6 months
JBoss Rich Faces SVN: r9321 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-07-01 10:09:47 -0400 (Tue, 01 Jul 2008)
New Revision: 9321
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
RF-3837
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-07-01 13:56:27 UTC (rev 9320)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-07-01 14:09:47 UTC (rev 9321)
@@ -1168,7 +1168,11 @@
for (var i = 0; i < l; i++) {
var input = inputs[i];
if (input.id != (this.id + ':file')) {
- params = params + '&' + input.name + '=' + input.value;
+ if (input.name == 'javax.faces.ViewState') {
+ params = params + '&' + input.name + '=' + input.value.replace(/\+/g,"%2B");
+ } else {
+ params = params + '&' + input.name + '=' + input.value;
+ }
}
}
16 years, 6 months
JBoss Rich Faces SVN: r9320 - trunk/test-applications/jsp/src/main/webapp/Effect.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-01 09:56:27 -0400 (Tue, 01 Jul 2008)
New Revision: 9320
Modified:
trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp
Log:
+findComponent
Modified: trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp 2008-07-01 13:52:45 UTC (rev 9319)
+++ trunk/test-applications/jsp/src/main/webapp/Effect/Effect.jsp 2008-07-01 13:56:27 UTC (rev 9320)
@@ -4,16 +4,17 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="effectSubviewID">
-
+
<rich:panel id="indexID">
- <a4j:commandLink value="Hide all" onclick="hideFrm1(),hideFrm2(),hideFrm3(),hideFrm4(),hideFrm5()"></a4j:commandLink>
-
+ <a4j:commandLink value="Hide all"
+ onclick="hideFrm1(),hideFrm2(),hideFrm3(),hideFrm4(),hideFrm5()"></a4j:commandLink>
+
<f:verbatim>
<br />
</f:verbatim>
-
+
<h:outputText value="Menu:" />
- <h:panelGrid columns="2" >
+ <h:panelGrid columns="2">
<h:outputText value="1." />
<f:verbatim>
<span onclick="showFrm1(),hideIndexID()"><font color="blue">JSF
@@ -54,8 +55,8 @@
<h:inputText value="#{effect.time}" />
<f:verbatim>
- <span onclick="hidePanel1(), hideImage1()"><font color="blue">Hide Panel</font>
- </span>
+ <span onclick="hidePanel1(), hideImage1()"><font color="blue">Hide
+ Panel</font> </span>
</f:verbatim>
<h:graphicImage value="/pics/fatal.gif"
onclick="hidePanel1(), hideImage1()" />
@@ -100,7 +101,7 @@
</h:panelGrid>
<rich:effect for="panel_1_ID" name="hidePanel1" type="Fade"
- params="duration:#{effect.time}" />
+ params="duration:#{effect.time}" id="effectID"/>
<rich:effect for="panel_1_ID" name="showPanel1" type="Appear" />
<rich:effect for="asusID" name="hideImage1" type="Fold"
@@ -183,14 +184,14 @@
</f:verbatim>
<h:outputText value="3. (Pulsate 3, Show 1)" />
<h:graphicImage id="img_3_ID" value="/pics/toshiba.jpg" width="200px"
- height="150px" >
- <rich:effect event="onclick" type="Pulsate"/>
+ height="150px">
+ <rich:effect event="onclick" type="Pulsate" />
</h:graphicImage>
<rich:effect event="onclick" for="img_1_ID" targetId="img_2_ID"
type="BlindDown" />
<rich:effect event="onclick" for="img_2_ID" targetId="img_1_ID"
- type="Puff" />
+ type="Puff" />
<rich:effect event="onclick" for="img_3_ID" targetId="img_1_ID"
type="Grow" params="duration:0.8" />
@@ -215,14 +216,14 @@
<h:graphicImage value="/pics/warn.gif" onclick="showRichPanel()" />
<f:verbatim>
- <span onclick="hideRichTabPanel()"><font color="blue">Hide Tab
- Panel</font> </span>
+ <span onclick="hideRichTabPanel()"><font color="blue">Hide
+ Tab Panel</font> </span>
</f:verbatim>
<h:graphicImage value="/pics/fatal.gif" onclick="hideRichTabPanel()" />
<f:verbatim>
- <span onclick="showRichTabPanel()"><font color="blue">Show Tab
- Panel</font> </span>
+ <span onclick="showRichTabPanel()"><font color="blue">Show
+ Tab Panel</font> </span>
</f:verbatim>
<h:graphicImage value="/pics/warn.gif" onclick="showRichTabPanel()" />
</h:panelGrid>
@@ -263,11 +264,15 @@
params="duration:0.4,from:0.4,to:1.0" />
</rich:tabPanel>
- <rich:effect for="richPanelID" event="" name="hideRichPanel" type="Fade" />
- <rich:effect for="richPanelID" event="" name="showRichPanel" type="Appear" />
+ <rich:effect for="richPanelID" event="" name="hideRichPanel"
+ type="Fade" />
+ <rich:effect for="richPanelID" event="" name="showRichPanel"
+ type="Appear" />
- <rich:effect for="tabPanelID" event="" name="hideRichTabPanel" type="Fade" />
- <rich:effect for="tabPanelID" event="" name="showRichTabPanel" type="Appear" />
+ <rich:effect for="tabPanelID" event="" name="hideRichTabPanel"
+ type="Fade" />
+ <rich:effect for="tabPanelID" event="" name="showRichTabPanel"
+ type="Appear" />
<f:verbatim>
<br />
@@ -294,5 +299,16 @@
<rich:effect for="frm5" name="hideFrm5" type="Fade" />
<rich:effect for="frm5" name="showFrm5" type="Appear" />
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getParams" reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText value="#{rich:findComponent('effectID').params}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
16 years, 6 months
JBoss Rich Faces SVN: r9319 - trunk/test-applications/jsp/src/main/webapp/DropDownMenu.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-01 09:52:45 -0400 (Tue, 01 Jul 2008)
New Revision: 9319
Modified:
trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DropDownMenuProperty.jsp
Log:
+findComponent
Modified: trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DropDownMenuProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DropDownMenuProperty.jsp 2008-07-01 13:46:42 UTC (rev 9318)
+++ trunk/test-applications/jsp/src/main/webapp/DropDownMenu/DropDownMenuProperty.jsp 2008-07-01 13:52:45 UTC (rev 9319)
@@ -4,90 +4,101 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="dropDownMenuPropertySubviewID">
- <h:panelGrid columns="2">
- <h:outputText value="HideDelay (ms):" />
- <h:inputText value="#{dDMenu.hideDelay}">
- <a4j:support event="onchange" reRender="ddmId" />
- </h:inputText>
+ <h:panelGrid columns="2">
+ <h:outputText value="HideDelay (ms):" />
+ <h:inputText value="#{dDMenu.hideDelay}">
+ <a4j:support event="onchange" reRender="ddmId" />
+ </h:inputText>
- <h:outputText value="ShowDelay (ms):" />
- <h:inputText value="#{dDMenu.showDelay}">
- <a4j:support event="onchange" reRender="ddmId" />
- </h:inputText>
+ <h:outputText value="ShowDelay (ms):" />
+ <h:inputText value="#{dDMenu.showDelay}">
+ <a4j:support event="onchange" reRender="ddmId" />
+ </h:inputText>
- <h:outputText value="PopupWidth (px):" />
- <h:inputText value="#{dDMenu.popupWidth}">
- <a4j:support event="onchange" reRender="ddmId" />
- </h:inputText>
+ <h:outputText value="PopupWidth (px):" />
+ <h:inputText value="#{dDMenu.popupWidth}">
+ <a4j:support event="onchange" reRender="ddmId" />
+ </h:inputText>
- <h:outputText value="horizontalOffset (px):" />
- <h:inputText value="#{dDMenu.horizontalOffset}">
- <a4j:support event="onchange" reRender="ddmId" />
- </h:inputText>
+ <h:outputText value="horizontalOffset (px):" />
+ <h:inputText value="#{dDMenu.horizontalOffset}">
+ <a4j:support event="onchange" reRender="ddmId" />
+ </h:inputText>
- <h:outputText value="verticalOffset (px):" />
- <h:inputText value="#{dDMenu.verticalOffset}">
- <a4j:support event="onchange" reRender="ddmId" />
- </h:inputText>
+ <h:outputText value="verticalOffset (px):" />
+ <h:inputText value="#{dDMenu.verticalOffset}">
+ <a4j:support event="onchange" reRender="ddmId" />
+ </h:inputText>
- <h:outputText value="Mode:" />
- <h:selectOneRadio value="#{dDMenu.mode}">
- <f:selectItem itemLabel="none" itemValue="none" />
- <f:selectItem itemLabel="ajax" itemValue="ajax" />
- <f:selectItem itemLabel="server" itemValue="server" />
- <a4j:support event="onclick" reRender="ddmId" />
- </h:selectOneRadio>
+ <h:outputText value="Mode:" />
+ <h:selectOneRadio value="#{dDMenu.mode}">
+ <f:selectItem itemLabel="none" itemValue="none" />
+ <f:selectItem itemLabel="ajax" itemValue="ajax" />
+ <f:selectItem itemLabel="server" itemValue="server" />
+ <a4j:support event="onclick" reRender="ddmId" />
+ </h:selectOneRadio>
- <h:outputText value="Direction:" />
- <h:selectOneRadio value="#{dDMenu.direction}">
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
- <f:selectItem itemLabel="auto" itemValue="auto" />
- <a4j:support event="onclick" reRender="ddmId" />
- </h:selectOneRadio>
+ <h:outputText value="Direction:" />
+ <h:selectOneRadio value="#{dDMenu.direction}">
+ <f:selectItem itemLabel="top-right" itemValue="top-right" />
+ <f:selectItem itemLabel="top-left" itemValue="top-left" />
+ <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ <a4j:support event="onclick" reRender="ddmId" />
+ </h:selectOneRadio>
- <h:outputText value="GroupDirection:" />
- <h:selectOneRadio value="#{dDMenu.groupDirection}">
- <f:selectItem itemLabel="top-up" itemValue="top-up" />
- <f:selectItem itemLabel="top-down" itemValue="top-down" />
- <f:selectItem itemLabel="bottom-up" itemValue="bottom-up" />
- <f:selectItem itemLabel="bottom-down" itemValue="bottom-down" />
- <f:selectItem itemLabel="auto" itemValue="auto" />
- <a4j:support event="onclick" reRender="ddmId" />
- </h:selectOneRadio>
+ <h:outputText value="GroupDirection:" />
+ <h:selectOneRadio value="#{dDMenu.groupDirection}">
+ <f:selectItem itemLabel="top-up" itemValue="top-up" />
+ <f:selectItem itemLabel="top-down" itemValue="top-down" />
+ <f:selectItem itemLabel="bottom-up" itemValue="bottom-up" />
+ <f:selectItem itemLabel="bottom-down" itemValue="bottom-down" />
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ <a4j:support event="onclick" reRender="ddmId" />
+ </h:selectOneRadio>
- <h:outputText value="JointPoint:" />
- <h:selectOneRadio value="#{dDMenu.jointPoint}">
- <f:selectItem itemLabel="top-right" itemValue="tr" />
- <f:selectItem itemLabel="top-left" itemValue="tl" />
- <f:selectItem itemLabel="bottom-right" itemValue="br" />
- <f:selectItem itemLabel="bottom-left" itemValue="bl" />
- <f:selectItem itemLabel="auto" itemValue="auto" />
- <a4j:support event="onclick" reRender="ddmId" />
- </h:selectOneRadio>
+ <h:outputText value="JointPoint:" />
+ <h:selectOneRadio value="#{dDMenu.jointPoint}">
+ <f:selectItem itemLabel="top-right" itemValue="tr" />
+ <f:selectItem itemLabel="top-left" itemValue="tl" />
+ <f:selectItem itemLabel="bottom-right" itemValue="br" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bl" />
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ <a4j:support event="onclick" reRender="ddmId" />
+ </h:selectOneRadio>
- <h:outputText value="Menu appearance event:" />
- <h:selectOneRadio value="#{dDMenu.event}" onclick="submit()">
- <f:selectItem itemLabel="onclick" itemValue="onclick" />
- <f:selectItem itemLabel="onmouseover" itemValue="onmouseover" />
- <a4j:support event="onclick" reRender="ddmId" />
- </h:selectOneRadio>
+ <h:outputText value="Menu appearance event:" />
+ <h:selectOneRadio value="#{dDMenu.event}" onclick="submit()">
+ <f:selectItem itemLabel="onclick" itemValue="onclick" />
+ <f:selectItem itemLabel="onmouseover" itemValue="onmouseover" />
+ <a4j:support event="onclick" reRender="ddmId" />
+ </h:selectOneRadio>
- <h:outputText value="Rendered:" />
- <h:selectBooleanCheckbox value="#{dDMenu.rendered}" onclick="submit()">
- </h:selectBooleanCheckbox>
-
- <h:outputText value="Disable some ddmenu:"></h:outputText>
- <h:selectBooleanCheckbox value="#{dDMenu.disabledDDM}">
- <a4j:support reRender="ddmId" event="onclick" />
- </h:selectBooleanCheckbox>
-
- <h:outputText value="Disable some items:" />
- <h:selectBooleanCheckbox value="#{dDMenu.disabled}">
- <a4j:support reRender="ddmId" event="onclick" />
- </h:selectBooleanCheckbox>
- <h:commandButton action="#{dDMenu.changeIcons}" value="ChangeIcons" />
- </h:panelGrid>
+ <h:outputText value="Rendered:" />
+ <h:selectBooleanCheckbox value="#{dDMenu.rendered}" onclick="submit()">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="Disable some ddmenu:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{dDMenu.disabledDDM}">
+ <a4j:support reRender="ddmId" event="onclick" />
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="Disable some items:" />
+ <h:selectBooleanCheckbox value="#{dDMenu.disabled}">
+ <a4j:support reRender="ddmId" event="onclick" />
+ </h:selectBooleanCheckbox>
+ <h:commandButton action="#{dDMenu.changeIcons}" value="ChangeIcons" />
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getSubmitMode" reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText value="#{rich:findComponent('ddmId').submitMode}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 6 months
JBoss Rich Faces SVN: r9318 - trunk/test-applications/jsp/src/main/webapp/DragAndDrop.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-01 09:46:42 -0400 (Tue, 01 Jul 2008)
New Revision: 9318
Modified:
trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
Log:
findComponent was added
Modified: trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-07-01 13:04:33 UTC (rev 9317)
+++ trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-07-01 13:46:42 UTC (rev 9318)
@@ -3,176 +3,252 @@
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-<f:subview id="dataDefinitionListSubviewID">
-
+<f:subview id="dataDefinitionListSubviewID">
+
<a4j:outputPanel ajaxRendered="true">
<h:messages />
</a4j:outputPanel>
-
+
<script>
DnD.CLIENT_VALIDATION_OFF = false;
</script>
-
- <h:panelGroup id="dragValueText">
- <h:outputText value="#{dndBean.dragValue}" />
- </h:panelGroup>
- <h:panelGrid columns="2">
- <h:dataTable var="type" value="#{dndBean.types}">
- <h:column>
- <h:panelGrid styleClass="dropzoneDecoration" id="drag1">
- <h:outputText value="#{type} - drag" />
- <rich:dragSupport dragType="#{type}" dragValue="#{type} - value" actionListener="#{dndBean.actListenerDrag}" action="#{dndBean.dragAction}" dragListener="#{dndBean.processDrag}"
- oncomplete="#{event.oncomplete}" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" onbeforedomupdate="#{event.onbeforedomupdate}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}">
- </rich:dragSupport>
- </h:panelGrid>
- </h:column>
- </h:dataTable>
+ <h:panelGroup id="dragValueText">
+ <h:outputText value="#{dndBean.dragValue}" />
+ </h:panelGroup>
- <h:dataTable var="type" value="#{dndBean.types}">
- <h:column>
- <h:panelGrid styleClass="dropzoneDecoration" id="drop2">
- <h:outputText value="#{type} - drop" />
- <rich:dropSupport reRender="dragValueText" actionListener="#{dndBean.actListenerDrop}"
- action="#{dndBean.dropAction}" acceptedTypes="#{type}" dropListener="#{dndBean.processDrop}" dropValue="#{type} - value"
- ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}" ondrop="#{event.ondrop}" ondropend="#{event.ondropend}" oncomplete="#{event.oncomplete}" onbeforedomupdate="#{event.onbeforedomupdate}">
- </rich:dropSupport>
- </h:panelGrid>
- </h:column>
- </h:dataTable>
- <h:panelGrid id="dndActionID" columns="1">
- <a4j:commandButton value="Show action" reRender="dndActionID" style=" width : 95px;"></a4j:commandButton>
- <h:outputText value="#{dndBean.actionDrag}" />
- <h:outputText value="#{dndBean.actionDrop}" />
- <h:outputText value="#{dndBean.actionListenerDrag}" />
- <h:outputText value="#{dndBean.actionListenerDrop}" />
- </h:panelGrid>
+ <h:panelGrid columns="2">
+ <h:dataTable var="type" value="#{dndBean.types}">
+ <h:column>
+ <h:panelGrid styleClass="dropzoneDecoration" id="drag1">
+ <h:outputText value="#{type} - drag" />
+ <rich:dragSupport dragType="dragType" dragValue="#{type} - value"
+ actionListener="#{dndBean.actListenerDrag}"
+ action="#{dndBean.dragAction}"
+ dragListener="#{dndBean.processDrag}"
+ oncomplete="#{event.oncomplete}" ondragend="#{event.ondragend}"
+ ondragstart="#{event.ondragstart}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ ondropout="#{event.ondropout}" ondropover="#{event.ondropover}" id="dragSupportID">
+ </rich:dragSupport>
+ </h:panelGrid>
+ </h:column>
+ </h:dataTable>
+
+ <h:dataTable var="type" value="#{dndBean.types}">
+ <h:column>
+ <h:panelGrid styleClass="dropzoneDecoration" id="drop2">
+ <h:outputText value="#{type} - drop" />
+ <rich:dropSupport reRender="dragValueText" id="dropSupportID"
+ actionListener="#{dndBean.actListenerDrop}"
+ action="#{dndBean.dropAction}" acceptedTypes="#{type}"
+ dropListener="#{dndBean.processDrop}" dropValue="#{type} - value"
+ ondragenter="#{event.ondragenter}"
+ ondragexit="#{event.ondragexit}" ondrop="#{event.ondrop}"
+ ondropend="#{event.ondropend}" oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ </rich:dropSupport>
+ </h:panelGrid>
+ </h:column>
+ </h:dataTable>
+ <h:panelGrid id="dndActionID" columns="1">
+ <a4j:commandButton value="Show action" reRender="dndActionID"
+ style=" width : 95px;"></a4j:commandButton>
+ <h:outputText value="#{dndBean.actionDrag}" />
+ <h:outputText value="#{dndBean.actionDrop}" />
+ <h:outputText value="#{dndBean.actionListenerDrag}" />
+ <h:outputText value="#{dndBean.actionListenerDrop}" />
</h:panelGrid>
- <rich:dragIndicator id="indicator" acceptClass="accept" rejectClass="reject" style="#{style.style}" styleClass="#{style.styleClass}">
- <f:facet name="single">
- <f:verbatim>{marker} <b>{testDrag}</b> {label}</f:verbatim>
- </f:facet>
- <rich:dndParam name="accept" value="ACCEPT:" />
- <rich:dndParam name="reject">
- <f:verbatim>
- <i style="text-decoration: line-through;">REJECT:</i>
- </f:verbatim>
- </rich:dndParam>
- </rich:dragIndicator>
+ </h:panelGrid>
+ <rich:dragIndicator id="indicator" acceptClass="accept"
+ rejectClass="reject" style="#{style.style}"
+ styleClass="#{style.styleClass}">
+ <f:facet name="single">
+ <f:verbatim>{marker} <b>{testDrag}</b> {label}</f:verbatim>
+ </f:facet>
+ <rich:dndParam name="accept" value="ACCEPT:" />
+ <rich:dndParam name="reject">
+ <f:verbatim>
+ <i style="text-decoration: line-through;">REJECT:</i>
+ </f:verbatim>
+ </rich:dndParam>
+ </rich:dragIndicator>
- <rich:dragIndicator id="dIndicator" acceptClass="defaultIndicator" rejectClass="reject">
- <f:facet name="single">
- <f:verbatim>{marker} <b>{testDrag}</b> {label}</f:verbatim>
- </f:facet>
- <rich:dndParam name="accept" value="ACCEPT:" />
- <rich:dndParam name="reject">
- <f:verbatim>
- <i style="text-decoration: line-through;">REJECT:</i>
- </f:verbatim>
- </rich:dndParam>
- </rich:dragIndicator>
+ <rich:dragIndicator id="dIndicator" acceptClass="defaultIndicator"
+ rejectClass="reject">
+ <f:facet name="single">
+ <f:verbatim>{marker} <b>{testDrag}</b> {label}</f:verbatim>
+ </f:facet>
+ <rich:dndParam name="accept" value="ACCEPT:" />
+ <rich:dndParam name="reject">
+ <f:verbatim>
+ <i style="text-decoration: line-through;">REJECT:</i>
+ </f:verbatim>
+ </rich:dndParam>
+ </rich:dragIndicator>
- <h:panelGrid columns="1" style="position: relative; left: 140px;">
- <h:panelGrid columns="1" style="position: absolute; top: 30px; left: 300px;">
- <rich:dragIndicator id="defaultIndicator">
- </rich:dragIndicator>
- </h:panelGrid>
+ <h:panelGrid columns="1" style="position: relative; left: 140px;">
+ <h:panelGrid columns="1"
+ style="position: absolute; top: 30px; left: 300px;">
+ <rich:dragIndicator id="defaultIndicator">
+ </rich:dragIndicator>
</h:panelGrid>
+ </h:panelGrid>
- <h:panelGrid columns="4" cellspacing="20">
- <h:panelGrid styleClass="dropzoneDecoration" id="grid1">
- <f:verbatim>Accepts file and folder... Customizes</f:verbatim>
- <rich:dropSupport id="zone1"
- oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}" ondrop="#{event.ondrop}" onbeforedomupdate="#{event.onbeforedomupdate}"
- acceptedTypes="file, folder" typeMapping="{file: testDrop}">
- <rich:dndParam name="testDrop">
- <h:graphicImage height="16" width="16"
- value="#{icon.iconFileManager}" />
- </rich:dndParam>
- </rich:dropSupport>
- </h:panelGrid>
+ <h:panelGrid columns="4" cellspacing="20">
+ <h:panelGrid styleClass="dropzoneDecoration" id="grid1">
+ <f:verbatim>Accepts file and folder... Customizes</f:verbatim>
+ <rich:dropSupport id="zone1" oncomplete="#{event.oncomplete}"
+ ondragenter="#{event.ondragenter}"
+ ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}"
+ ondrop="#{event.ondrop}"
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ acceptedTypes="file, folder" typeMapping="{file: testDrop}">
+ <rich:dndParam name="testDrop">
+ <h:graphicImage height="16" width="16"
+ value="#{icon.iconFileManager}" />
+ </rich:dndParam>
+ </rich:dropSupport>
+ </h:panelGrid>
- <h:panelGrid styleClass="dropzoneDecoration" id="grid2">
- <f:verbatim>Accepts none</f:verbatim>
- <rich:dropSupport>
- </rich:dropSupport>
- </h:panelGrid>
+ <h:panelGrid styleClass="dropzoneDecoration" id="grid2">
+ <f:verbatim>Accepts none</f:verbatim>
+ <rich:dropSupport>
+ </rich:dropSupport>
+ </h:panelGrid>
- <h:panelGrid styleClass="dropzoneDecoration" id="grid3">
- <f:verbatim>Accepts none... Customizes</f:verbatim>
- <rich:dropSupport typeMapping="{file: testDrop}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}" ondrop="#{event.ondrop}" onbeforedomupdate="#{event.onbeforedomupdate}">
- <rich:dndParam name="testDrop">
- <h:graphicImage height="16" width="16" value="#{icon.iconFileManagerReject}" />
- </rich:dndParam>
- </rich:dropSupport>
- </h:panelGrid>
+ <h:panelGrid styleClass="dropzoneDecoration" id="grid3">
+ <f:verbatim>Accepts none... Customizes</f:verbatim>
+ <rich:dropSupport typeMapping="{file: testDrop}"
+ oncomplete="#{event.oncomplete}"
+ ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}"
+ ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="testDrop">
+ <h:graphicImage height="16" width="16"
+ value="#{icon.iconFileManagerReject}" />
+ </rich:dndParam>
+ </rich:dropSupport>
+ </h:panelGrid>
- <h:panelGrid styleClass="dropzoneDecoration" id="grid4">
- <f:verbatim>Accepts file and folder</f:verbatim>
- <rich:dropSupport acceptedTypes="file, folder" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}" ondrop="#{event.ondrop}" onbeforedomupdate="#{event.onbeforedomupdate}">
- <rich:dndParam name="testDrop" value="testDropValue" />
- </rich:dropSupport>
- </h:panelGrid>
+ <h:panelGrid styleClass="dropzoneDecoration" id="grid4">
+ <f:verbatim>Accepts file and folder</f:verbatim>
+ <rich:dropSupport acceptedTypes="file, folder"
+ oncomplete="#{event.oncomplete}"
+ ondragenter="#{event.ondragenter}" ondragexit="#{event.ondragexit}"
+ ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="testDrop" value="testDropValue" />
+ </rich:dropSupport>
+ </h:panelGrid>
- <h:panelGrid id="grid5">
- <rich:dragSupport dragType="file" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}">
- <rich:dndParam name="label" value="Label" />
- <rich:dndParam name="testDrag" value="testDragValue" />
- </rich:dragSupport>
- <f:verbatim>File Draggable - no indicator</f:verbatim>
- </h:panelGrid>
+ <h:panelGrid id="grid5">
+ <rich:dragSupport dragType="file" ondragend="#{event.ondragend}"
+ ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}"
+ ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="label" value="Label" />
+ <rich:dndParam name="testDrag" value="testDragValue" />
+ </rich:dragSupport>
+ <f:verbatim>File Draggable - no indicator</f:verbatim>
+ </h:panelGrid>
- <h:panelGrid id="grid6">
- <rich:dragSupport dragType="file" dragIndicator="indicator" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}">
- <rich:dndParam name="label" value="Label" />
- <rich:dndParam name="testDrag" value="testDragValue" />
- </rich:dragSupport>
- <f:verbatim>File Draggable with indicator</f:verbatim>
- </h:panelGrid>
+ <h:panelGrid id="grid6">
+ <rich:dragSupport dragType="file" dragIndicator="indicator"
+ ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
+ ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
+ oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="label" value="Label" />
+ <rich:dndParam name="testDrag" value="testDragValue" />
+ </rich:dragSupport>
+ <f:verbatim>File Draggable with indicator</f:verbatim>
+ </h:panelGrid>
- <h:panelGrid id="grid7">
- <rich:dragSupport dragType="folder" dragIndicator="indicator" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}">
- <rich:dndParam name="label" value="Label" />
- <rich:dndParam name="testDrag" value="testDragValue for Folder" />
- </rich:dragSupport>
- <f:verbatim>Folder Draggable with indicator</f:verbatim>
- </h:panelGrid>
+ <h:panelGrid id="grid7">
+ <rich:dragSupport dragType="folder" dragIndicator="indicator"
+ ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
+ ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
+ oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="label" value="Label" />
+ <rich:dndParam name="testDrag" value="testDragValue for Folder" />
+ </rich:dragSupport>
+ <f:verbatim>Folder Draggable with indicator</f:verbatim>
+ </h:panelGrid>
- <h:outputText />
+ <h:outputText />
- <h:panelGrid id="grid8">
- <rich:dragSupport dragType="folder" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}">
- <rich:dndParam name="label" value="Label" />
- <rich:dndParam name="testDrag" value="testDragValue for Folder" />
- </rich:dragSupport>
- <f:verbatim>Folder Draggable - no indicator</f:verbatim>
- </h:panelGrid>
-
- <h:panelGrid id="grid9">
- <rich:dragSupport dragType="file" dragIndicator="defaultIndicator" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}">
- <rich:dndParam name="testDrag" value="testDragValue" />
- <rich:dndParam name="marker" value="testMarkerValue" />
- <rich:dndParam name="label" value="testDragValue" />
- </rich:dragSupport>
- <f:verbatim>File Draggable with defaultIndicator</f:verbatim>
- </h:panelGrid>
-
- <h:panelGrid id="grid10">
- <rich:dragSupport dragType="folder" dragIndicator="defaultIndicator" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}">
- <rich:dndParam name="label" value="testDragValue for Folder" />
- </rich:dragSupport>
- <f:verbatim>Folder Draggable with defaultIndicator</f:verbatim>
- </h:panelGrid>
- <h:outputText />
+ <h:panelGrid id="grid8">
+ <rich:dragSupport dragType="folder" ondragend="#{event.ondragend}"
+ ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}"
+ ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="label" value="Label" />
+ <rich:dndParam name="testDrag" value="testDragValue for Folder" />
+ </rich:dragSupport>
+ <f:verbatim>Folder Draggable - no indicator</f:verbatim>
</h:panelGrid>
- <h:panelGrid id="renderedId">
- <rich:dragSupport dragType="file" dragIndicator="defaultIndicator" ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}" ondropout="#{event.ondropout}" ondropover="#{event.ondropover}" oncomplete="#{event.oncomplete}" onsubmit="#{event.onsubmit}" onbeforedomupdate="#{event.onbeforedomupdate}">
+ <h:panelGrid id="grid9">
+ <rich:dragSupport dragType="file" dragIndicator="defaultIndicator"
+ ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
+ ondropout="#{event.ondropout}" ondropover="#{event.ondropover}">
+ <rich:dndParam name="testDrag" value="testDragValue" />
<rich:dndParam name="marker" value="testMarkerValue" />
<rich:dndParam name="label" value="testDragValue" />
</rich:dragSupport>
+ <f:verbatim>File Draggable with defaultIndicator</f:verbatim>
+ </h:panelGrid>
- <h:graphicImage id="dragImage" value="/pics/masshtaby_01.jpg" width="200px" height="200px" />
- <f:verbatim>dragSupport</f:verbatim>
+ <h:panelGrid id="grid10">
+ <rich:dragSupport dragType="folder" dragIndicator="defaultIndicator"
+ ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
+ ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
+ oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="label" value="testDragValue for Folder" />
+ </rich:dragSupport>
+ <f:verbatim>Folder Draggable with defaultIndicator</f:verbatim>
</h:panelGrid>
+ <h:outputText />
+ </h:panelGrid>
+
+ <h:panelGrid id="renderedId">
+ <rich:dragSupport dragType="file" dragIndicator="defaultIndicator"
+ ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
+ ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
+ oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
+ <rich:dndParam name="marker" value="testMarkerValue" />
+ <rich:dndParam name="label" value="testDragValue" />
+ </rich:dragSupport>
+
+ <h:graphicImage id="dragImage" value="/pics/masshtaby_01.jpg"
+ width="200px" height="200px" />
+ <f:verbatim>dragSupport</f:verbatim>
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getDragValue" reRender="findID1"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID1">
+ <h:outputText value="#{rich:findComponent('dragSupportID').dragValue}"/>
+ </rich:column>
+ <rich:column>
+ <a4j:commandLink value="getDropValue" reRender="findID2"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID2">
+ <h:outputText value="#{rich:findComponent('dropSupportID').dropValue}" />
+ </rich:column>
+ <rich:column>
+ <a4j:commandLink value="getAcceptClass" reRender="findID3"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID3">
+ <h:outputText value="#{rich:findComponent('indicator').acceptClass}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
16 years, 6 months
JBoss Rich Faces SVN: r9317 - trunk/test-applications/jsp/src/main/webapp/DataTable.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-01 09:04:33 -0400 (Tue, 01 Jul 2008)
New Revision: 9317
Modified:
trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp
Log:
rowKeyVar for trees + findComponent test
Modified: trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-07-01 12:58:39 UTC (rev 9316)
+++ trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-07-01 13:04:33 UTC (rev 9317)
@@ -88,7 +88,7 @@
</rich:column>
</rich:columnGroup>
<rich:column styleClass="#{style.styleClassA}" headerClass="#{style.headerClassA}" footerClass="#{style.footerClassA}" style="#{style.styleA}" rendered="#{dataTable.r2rendered}">
- <rich:tree id="rightTree" style="width:300px"
+ <rich:tree id="rightTree" style="width:300px"
nodeSelectListener="#{treeDndBean.processRSelection}"
reRender="selectedNodeR,rightContainer" ajaxSubmitSelection="true"
switchType="client" value="#{treeDndBean.treeNodeRight}"
@@ -97,13 +97,13 @@
onselected="window.status='selectedNode: '+event.selectedNode;"
onexpand="window.status='expandedNode: '+event.expandedNode"
oncollapse="window.status='collapsedNode: '+event.collapsedNode"
- rowKeyVar="key" dropListener="#{treeDndBean.onDrop}"
+ rowKeyVar="RTreeKey" dropListener="#{treeDndBean.onDrop}"
dragListener="#{treeDndBean.onDrag}" dragIndicator="treeIndicator"
acceptedTypes="treeNode" dragType="treeNode" var="item">
<rich:dndParam name="treeParam" value="rightTree" />
</rich:tree>
</rich:column>
- <rich:subTable id="detail" var="detail" value="#{dataTableID.detail}"
+ <rich:subTable id="detail" var="detail" value="#{dataTableID.detail}" rowKeyVar="subRowKey"
columnClasses="#{style.columnClassesA}" footerClass="#{style.footerClassA}" headerClass="#{style.headerClassA}" rowClasses="#{style.rowClassesA}" onclick="#{event.onclick}"
ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}" onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}" onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
@@ -111,7 +111,22 @@
onRowDblClick="#{event.onRowDblClick}" onRowMouseDown="#{event.onRowMouseDown}" onRowMouseMove="#{event.onRowMouseMove}"
onRowMouseOut="#{event.onRowMouseOut}" onRowMouseOver="#{event.onRowMouseOver}" onRowMouseUp="#{event.onRowMouseUp}">
<rich:column id="name">
- <h:outputText value="123"></h:outputText>
+ <rich:tree id="leftTree" style="width:300px"
+ nodeSelectListener="#{treeDndBean.processLSelection}"
+ reRender="selectedNodeL" ajaxSubmitSelection="true"
+ switchType="client" value="#{treeDndBean.treeNodeLeft}"
+ changeExpandListener="#{treeDndBean.onExpand}"
+ binding="#{treeDndBean.leftTree}"
+ onselected="window.status='selectedNode: '+event.selectedNode;"
+ onexpand="window.status='expandedNode: '+event.expandedNode"
+ oncollapse="window.status='collapsedNode: '+event.collapsedNode"
+ dropListener="#{treeDndBean.onDrop}"
+ dragListener="#{treeDndBean.onDrag}" dragIndicator="treeIndicator"
+ acceptedTypes="treeNode" dragType="treeNode" rowKeyVar="LTreeKey"
+ var="item" >
+
+ <rich:dndParam name="treeParam" value="leftTree" />
+ </rich:tree>
</rich:column>
<rich:column id="qty" rendered="#{dataTable.r2rendered}">
<h:outputText value="#{detail.qty}" />
Modified: trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp 2008-07-01 12:58:39 UTC (rev 9316)
+++ trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp 2008-07-01 13:04:33 UTC (rev 9317)
@@ -4,37 +4,58 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="dataTablePropertySubviewID">
- <h:panelGrid columns="2" style="top">
- <h:outputText value="Align:"></h:outputText>
- <h:selectOneMenu value="#{dataTable.align}">
- <f:selectItem itemLabel="center" itemValue="center" />
- <f:selectItem itemLabel="left" itemValue="left" />
- <f:selectItem itemLabel="right " itemValue="right" />
- <a4j:support event="onclick" reRender="dataTableID"></a4j:support>
- </h:selectOneMenu>
+ <h:panelGrid columns="2" style="top">
+ <h:outputText value="Align:"></h:outputText>
+ <h:selectOneMenu value="#{dataTable.align}">
+ <f:selectItem itemLabel="center" itemValue="center" />
+ <f:selectItem itemLabel="left" itemValue="left" />
+ <f:selectItem itemLabel="right " itemValue="right" />
+ <a4j:support event="onclick" reRender="dataTableID"></a4j:support>
+ </h:selectOneMenu>
- <h:outputText value="Border: "></h:outputText>
- <h:inputText value="#{dataTable.border}">
- <a4j:support event="onchange" reRender="dataTableID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Border: "></h:outputText>
+ <h:inputText value="#{dataTable.border}">
+ <a4j:support event="onchange" reRender="dataTableID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Columns Width: "></h:outputText>
- <h:inputText value="#{dataTable.columnsWidth}">
- <a4j:support event="onchange" reRender="dataTableID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Columns Width: "></h:outputText>
+ <h:inputText value="#{dataTable.columnsWidth}">
+ <a4j:support event="onchange" reRender="dataTableID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Width: "></h:outputText>
- <h:inputText value="#{dataTable.width}">
- <a4j:support event="onchange" reRender="dataTableID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Width: "></h:outputText>
+ <h:inputText value="#{dataTable.width}">
+ <a4j:support event="onchange" reRender="dataTableID"></a4j:support>
+ </h:inputText>
- <h:outputText value="rendered:" />
- <h:selectBooleanCheckbox value="#{dataTable.rendered}" onclick="submit();" />
+ <h:outputText value="rendered:" />
+ <h:selectBooleanCheckbox value="#{dataTable.rendered}"
+ onclick="submit();" />
- <h:outputText value=" row 2 rendered" />
- <h:selectBooleanCheckbox value="#{dataTable.r2rendered}" onclick="submit();" />
-
- <h:outputText value="elements:"></h:outputText>
- <h:outputText value="#{testBean.elements}"></h:outputText>
- </h:panelGrid>
+ <h:outputText value=" row 2 rendered" />
+ <h:selectBooleanCheckbox value="#{dataTable.r2rendered}"
+ onclick="submit();" />
+
+ <h:outputText value="elements:"></h:outputText>
+ <h:outputText value="#{testBean.elements}"></h:outputText>
+
+ <h:outputText value="Selected Node: "></h:outputText>
+ <h:outputText escape="false"
+ value="#{treeDndBean.leftSelectedNodeTitle}" id="selectedNodeL" />
+
+ <h:outputText value="Selected Node: "></h:outputText>
+ <h:outputText escape="false"
+ value="#{treeDndBean.rightSelectedNodeTitle}" id="selectedNodeR" />
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getRowCount" reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText value="#{rich:findComponent('dataTableID').rowCount}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
16 years, 6 months
JBoss Rich Faces SVN: r9316 - in trunk/test-applications/seleniumTest/src: main/webapp/pages/ajaxRepeat and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-07-01 08:58:39 -0400 (Tue, 01 Jul 2008)
New Revision: 9316
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
Log:
Add additional methods to a4j:repeat selenium test
Modified: trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2008-07-01 12:37:39 UTC (rev 9315)
+++ trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JRepeatTestBean.java 2008-07-01 12:58:39 UTC (rev 9316)
@@ -165,21 +165,19 @@
int rowKey = getRepeater().getRowIndex();
keys.add(rowKey);
setKeys(keys);
- A4JRepeatItemTestBean item = items.get(rowKey);
- item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
- item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
- //priceRef.processValidators(FacesContext.getCurrentInstance());
- //priceRef.processUpdates(FacesContext.getCurrentInstance());
+ for (A4JRepeatItemTestBean item : items) {
+ item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
+ item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
+ }
return null;
}
-
- public String change2() {
- int rowKey = getRepeater().getRowIndex();
- A4JRepeatItemTestBean item = items.get(rowKey);
- item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
- item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
- //priceRef.processValidators(FacesContext.getCurrentInstance());
- //priceRef.processUpdates(FacesContext.getCurrentInstance());
+
+ public String changeWhithoutAjaxKeys() {
+ setKeys(null);
+ for (A4JRepeatItemTestBean item : items) {
+ item.setNotRerenderedChangeCounter(item.getNotRerenderedChangeCounter() + 1);
+ item.setRerenderedChangeCounter(item.getRerenderedChangeCounter() + 1);
+ }
return null;
}
Modified: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxRepeat/ajaxRepeatTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2008-07-01 12:37:39 UTC (rev 9315)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRepeatTest.java 2008-07-01 12:58:39 UTC (rev 9316)
@@ -13,8 +13,9 @@
/**
* a4j:repeat component selenium test
+ *
* @author Alexandr Levkovsky
- *
+ *
*/
public class AjaxRepeatTest extends SeleniumTestBase {
@@ -46,22 +47,126 @@
private final static String LINK_ID = "link";
+ private final static String BUTTON_ID = "button";
+
private final static String RERENDERED_COUNTER_ID = "rerendered_change_counter";
private final static String NOT_RERENDERED_COUNTER_ID = "not_rerendered_change_counter";
+ private final static String INPUT_VALUE_OUTPUT_ID = "input_output";
+
@Override
public String getTestUrl() {
return "pages/ajaxRepeat/ajaxRepeatTest.xhtml";
}
@Test(dataProvider = "templates")
+ public void testRerenderingRowsWithAjaxKeysAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rerendering rows with ajaxKeys attribute...");
+ // link action update counter fields in all rows but add only current
+ // row number to ajaxKeys so only current row counter should be
+ // rerendered
+ clickReset();
+ AssertRendered(TABLE_ID);
+ assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
+
+ for (int i = 0; i < DEFAULT_ROWS_COUNT; i++) {
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ if (j < i) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(j + 1).toString());
+ } else {
+ assertOutputText(j, RERENDERED_COUNTER_ID, "0");
+ }
+ assertOutputText(j, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+
+ writeStatus("click link " + i);
+ String linkId = getFullTableElementId(i, LINK_ID);
+ clickAjaxCommandAndWait(linkId);
+
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ if (j < i) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(j + 1).toString());
+ } else if (j == i) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(j + 1).toString());
+ } else {
+ assertOutputText(j, RERENDERED_COUNTER_ID, "0");
+ }
+ assertOutputText(i, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+ }
+ }
+
+ @Test(dataProvider = "templates")
+ public void testRerenderingRowsWithoutAjaxKeysAttribute(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rerendering rows without ajaxKeys attribute...");
+ // button action update counter fields in all rows and sets ajaxKeys to
+ // null so counters in all rows should be rerendered.
+ clickReset();
+ AssertRendered(TABLE_ID);
+ assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
+
+ for (int i = 0; i < DEFAULT_ROWS_COUNT; i++) {
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(i).toString());
+ assertOutputText(j, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+
+ writeStatus("click button " + i);
+ String buttonId = getFullTableElementId(i, BUTTON_ID);
+ clickAjaxCommandAndWait(buttonId);
+
+ for (int j = 0; j < DEFAULT_ROWS_COUNT; j++) {
+ assertOutputText(j, RERENDERED_COUNTER_ID, new Integer(i + 1).toString());
+ assertOutputText(j, NOT_RERENDERED_COUNTER_ID, "0");
+ }
+ }
+ }
+
+ @Test(dataProvider = "templates")
+ public void testRerenderingRowsWithValidation(Template template) throws Exception {
+ renderPage(template);
+ writeStatus("Testing rerendering rows with validation...");
+ clickReset();
+ AssertRendered(TABLE_ID);
+ assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
+
+ for (Integer i = 0; i < DEFAULT_ROWS_COUNT; i++) {
+ assertInputValue(i, INPUT_ID, i.toString());
+ assertOutputText(i, INPUT_VALUE_OUTPUT_ID, i.toString());
+ assertOutputText(i, RERENDERED_COUNTER_ID, "0");
+
+ writeStatus("set not valid value for row " + i + " input...");
+ type(getFullTableElementId(i, INPUT_ID), "200");
+ writeStatus("click link " + i);
+ String linkId = getFullTableElementId(i, LINK_ID);
+ clickAjaxCommandAndWait(linkId);
+
+ assertInputValue(i, INPUT_ID, "200");
+ assertOutputText(i, INPUT_VALUE_OUTPUT_ID, i.toString());
+ assertOutputText(i, RERENDERED_COUNTER_ID, "0");
+
+ writeStatus("set valid value for row " + i + " input...");
+ type(getFullTableElementId(i, INPUT_ID), "99");
+ writeStatus("click link " + i);
+ clickAjaxCommandAndWait(linkId);
+
+ assertInputValue(i, INPUT_ID, "99");
+ assertOutputText(i, INPUT_VALUE_OUTPUT_ID, "99");
+ assertOutputText(i, RERENDERED_COUNTER_ID, new Integer(i + 1).toString());
+ }
+ }
+
+ @Test(dataProvider = "templates")
public void testRenderedAttribute(Template template) throws Exception {
renderPage(template);
writeStatus("Testing rendered attribute...");
clickReset();
AssertRendered(TABLE_ID);
- // repeat has rendered=true and should present on page as table with default 5 rows
+ // repeat has rendered=true and should present on page as table with
+ // default 5 rows
assertRowsCount(5, TABLE_ID);
writeStatus("change rendered attribute to false");
@@ -71,7 +176,8 @@
writeStatus("Click apply");
clickApply();
- // repeat now has rendered=false and should not present on page as table with default 0 rows
+ // repeat now has rendered=false and should not present on page as table
+ // with default 0 rows
assertRowsCount(0, TABLE_ID);
}
@@ -81,7 +187,8 @@
writeStatus("Testing first attribute...");
clickReset();
AssertRendered(TABLE_ID);
- // repeat has rendered=true and should present on page as table with default 5 rows
+ // repeat has rendered=true and should present on page as table with
+ // default 5 rows
assertRowsCount(5, TABLE_ID);
// first row default value 0
String fullInput0Id = getParentId() + FORM2_ID + REPEAT_ID + ":" + 0 + ":" + OUTPUT_ID;
@@ -106,7 +213,8 @@
writeStatus("Testing rows attribute...");
clickReset();
AssertRendered(TABLE_ID);
- // repeat has rows=0 and table with all default 5 rows should present on page
+ // repeat has rows=0 and table with all default 5 rows should present on
+ // page
assertRowsCount(5, TABLE_ID);
writeStatus("change rendered attribute to false");
@@ -116,7 +224,8 @@
writeStatus("Click apply");
clickApply();
- // repeat now has rendered=false and should not present on page as table with default 0 rows
+ // repeat now has rendered=false and should not present on page as table
+ // with default 0 rows
assertRowsCount(3, TABLE_ID);
// last row should have value 2
assertInputValue(2, INPUT_ID, "2");
@@ -140,25 +249,6 @@
}
}
- @Test(dataProvider = "templates")
- public void testAjaxKeysAttribute(Template template) throws Exception {
- renderPage(template);
- writeStatus("Testing ajaxKeys attribute...");
- clickReset();
- AssertRendered(TABLE_ID);
- assertRowsCount(DEFAULT_ROWS_COUNT, TABLE_ID);
-
- for (int i = 0; i < DEFAULT_ROWS_COUNT; i++) {
- String LinkId = getFullTableElementId(i, LINK_ID);
- assertOutputText(i, RERENDERED_COUNTER_ID, "0");
- assertOutputText(i, NOT_RERENDERED_COUNTER_ID, "0");
- writeStatus("click link...");
- clickAjaxCommandAndWait(LinkId);
- assertOutputText(i, RERENDERED_COUNTER_ID, "1");
- assertOutputText(i, NOT_RERENDERED_COUNTER_ID, "0");
- }
- }
-
private void clickReset() {
String buttonId = getParentId() + FORM2_ID + RESET_BUTTON_ID;
writeStatus("Click reset button");
16 years, 6 months
JBoss Rich Faces SVN: r9315 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-07-01 08:37:39 -0400 (Tue, 01 Jul 2008)
New Revision: 9315
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
http://jira.jboss.com/jira/browse/RF-3549
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-07-01 11:57:46 UTC (rev 9314)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-07-01 12:37:39 UTC (rev 9315)
@@ -1060,7 +1060,7 @@
object.style.display = allowFlash=="true" ? "" : "none";
object.id = oid;
this.items.appendChild(object);
- this.isFlash = swfobject.hasFlashPlayerVersion("8.0.0");
+ this.isFlash = swfobject.hasFlashPlayerVersion("9.0.28");
if (this.isFlash)
{
var flashvars = {fileUploadId:this.id};
16 years, 6 months
JBoss Rich Faces SVN: r9314 - trunk/test-applications/jsp/src/main/webapp/DataScroller.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-07-01 07:57:46 -0400 (Tue, 01 Jul 2008)
New Revision: 9314
Modified:
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp
Log:
sorting correction
Modified: trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-07-01 11:45:13 UTC (rev 9313)
+++ trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-07-01 11:57:46 UTC (rev 9314)
@@ -33,11 +33,10 @@
</f:facet>
<rich:column sortBy="#{dT.str0}" filterBy="#{dT.str0}" filterEvent="onchange"
- selfSorted="#{dataScroller.selfSorted}" sortOrder="#{dataScroller.sortOrder}" filterValue="#{dataScroller.filterValue}">
+ selfSorted="#{dataScroller.selfSorted}" filterValue="#{dataScroller.filterValue}">
<h:outputText value="#{dT.str0}" />
</rich:column>
- <rich:column sortBy="#{dT.int0}" filterBy="#{dT.int0}" filterEvent="onchange"
- sortOrder="#{dataScroller.sortOrder}">
+ <rich:column sortBy="#{dT.int0}" filterBy="#{dT.int0}" filterEvent="onchange" selfSorted="#{dataScroller.selfSorted}">
<h:outputText value="#{dT.int0} " />
</rich:column>
</rich:dataTable>
Modified: trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp 2008-07-01 11:45:13 UTC (rev 9313)
+++ trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScrollerProperty.jsp 2008-07-01 11:57:46 UTC (rev 9314)
@@ -74,16 +74,8 @@
<f:selectItem itemLabel="multi" itemValue="multi" />
<a4j:support event="onchange" reRender="dataTableId,dsID"></a4j:support>
</h:selectOneRadio>
-
- <h:outputText value="sortOrder"></h:outputText>
- <h:selectOneRadio value="#{dataScroller.currentSortOrder}">
- <f:selectItem itemLabel="ASCENDING" itemValue="ASCENDING" />
- <f:selectItem itemLabel="DESCENDING" itemValue="DESCENDING" />
- <f:selectItem itemLabel="UNSORTED" itemValue="UNSORTED" />
- <a4j:support event="onchange" reRender="dataTableId,dsID"></a4j:support>
- </h:selectOneRadio>
-
- <h:outputText value="selfSorted(1st)"></h:outputText>
+
+ <h:outputText value="selfSorted"></h:outputText>
<h:selectBooleanCheckbox value="#{dataScroller.selfSorted}">
<a4j:support event="onchange" reRender="dataTableId,dsID"></a4j:support>
</h:selectBooleanCheckbox>
16 years, 6 months