Author: mvitenkov
Date: 2008-07-02 08:28:21 -0400 (Wed, 02 Jul 2008)
New Revision: 9377
Modified:
trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml
Log:
+findComponent
Modified: trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml 2008-07-02
12:25:11 UTC (rev 9376)
+++
trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml 2008-07-02
12:28:21 UTC (rev 9377)
@@ -1,45 +1,71 @@
-<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="FileUploadSubviewID">
-<rich:fileUpload id="fileUploadID"
disabled="#{fileUpload.disabled}" autoclear="#{fileUpload.autoclear}"
-required="#{fileUpload.required}"
requiredMessage="#{fileUpload.requiredMessage}"
rendered="#{fileUpload.rendered}"
-listHeight="#{fileUpload.listHeight}"
listWidth="#{fileUpload.listHeight}" uploadData="#{fileUpload.data}"
-maxFilesQuantity="#{fileUpload.maxFilesQuantity}"
fileUploadListener="#{fileUpload.fileUploadListener}">
- <f:facet name="label">
- <h:outputText value="{_KB}KB from {KB}KB uploaded :[ {mm}:{ss}
]"></h:outputText>
- </f:facet>
-</rich:fileUpload>
-<h:panelGrid columns="2">
- <h:outputText value="acceptedTypes"></h:outputText>
- <h:inputText value="#{fileUpload.acceptedTypes}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="listHeight"></h:outputText>
- <h:inputText value="#{fileUpload.listHeight}"
onchange="submit();"></h:inputText>
+<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="FileUploadSubviewID">
+ <rich:fileUpload id="fileUploadID"
disabled="#{fileUpload.disabled}"
+ autoclear="#{fileUpload.autoclear}"
required="#{fileUpload.required}"
+ requiredMessage="#{fileUpload.requiredMessage}"
+ rendered="#{fileUpload.rendered}"
+ listHeight="#{fileUpload.listHeight}"
+ listWidth="#{fileUpload.listHeight}"
uploadData="#{fileUpload.data}"
+ maxFilesQuantity="#{fileUpload.maxFilesQuantity}"
+ fileUploadListener="#{fileUpload.fileUploadListener}">
+ <f:facet name="label">
+ <h:outputText value="{_KB}KB from {KB}KB uploaded :[ {mm}:{ss}
]"></h:outputText>
+ </f:facet>
+ </rich:fileUpload>
+ <h:panelGrid columns="2">
+ <h:outputText value="acceptedTypes"></h:outputText>
+ <h:inputText value="#{fileUpload.acceptedTypes}"
onchange="submit();"></h:inputText>
- <h:outputText value="listWidth"></h:outputText>
- <h:inputText value="#{fileUpload.listWidth}"
onchange="submit();"></h:inputText>
+ <h:outputText value="listHeight"></h:outputText>
+ <h:inputText value="#{fileUpload.listHeight}"
onchange="submit();"></h:inputText>
- <h:outputText value="maxFilesQuantity"></h:outputText>
- <h:inputText value="#{fileUpload.maxFilesQuantity}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="autoclear"></h:outputText>
- <h:selectBooleanCheckbox value="#{fileUpload.autoclear}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="disabled"></h:outputText>
- <h:selectBooleanCheckbox value="#{fileUpload.disabled}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="rendered"></h:outputText>
- <h:selectBooleanCheckbox value="#{fileUpload.rendered}"
onchange="submit();"></h:selectBooleanCheckbox>
+ <h:outputText value="listWidth"></h:outputText>
+ <h:inputText value="#{fileUpload.listWidth}"
onchange="submit();"></h:inputText>
- <h:outputText value="required"></h:outputText>
- <h:selectBooleanCheckbox value="#{fileUpload.required}"
onchange="submit();"></h:selectBooleanCheckbox>
+ <h:outputText value="maxFilesQuantity"></h:outputText>
+ <h:inputText value="#{fileUpload.maxFilesQuantity}"
+ onchange="submit();"></h:inputText>
- <h:outputText value="requiredMessage"></h:outputText>
- <h:inputText value="#{fileUpload.requiredMessage}"
onchange="submit();"></h:inputText>
-
+ <h:outputText value="autoclear"></h:outputText>
+ <h:selectBooleanCheckbox value="#{fileUpload.autoclear}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="disabled"></h:outputText>
+ <h:selectBooleanCheckbox value="#{fileUpload.disabled}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="rendered"></h:outputText>
+ <h:selectBooleanCheckbox value="#{fileUpload.rendered}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="required"></h:outputText>
+ <h:selectBooleanCheckbox value="#{fileUpload.required}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="requiredMessage"></h:outputText>
+ <h:inputText value="#{fileUpload.requiredMessage}"
+ onchange="submit();"></h:inputText>
+
+ <h:panelGrid columns="2">
+ <h:outputText value="File name:"></h:outputText>
+ <h:outputText
value="#{fileUpload.upload.file.name}"></h:outputText>
+ </h:panelGrid>
+
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
- <h:outputText value="File name:"></h:outputText>
- <h:outputText
value="#{fileUpload.upload.file.name}"></h:outputText>
- </h:panelGrid>
-
-</h:panelGrid>
+ <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