Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To perform some operations on specific phases of upload, you can attach to an event of rich:fileUpload. Along with standard events, rich:fileUpload provides a number of specific events:</p> <ul> <li>The "onadd" event handler called on an add file operation</li> <li>The "onupload" which gives you a possibility to cancel the upload at client side</li> <li>The "onuploadcomplete" which is called after all files from the list are uploaded</li> <li>The "onuploadcanceled" which is called after upload has been canceled via cancel control</li> <li>The "onerror" which is called if the file upload was interrupted according to any errors</li> </ul> <p>To invoke server side logic using AJAX when event occurs, use 'a4j:status' or 'a4j:jsFunction', for example using 'a4j:status':</p> <pre><code>&lt;rich:fileUpload yourParameters="..."&gt; &lt;a4j:support event="onuploadcomplete" reRender="something" action="#{fileUploadController.setImageFormat(imageFormat)}"/&gt; &lt;/rich:fileUpload&gt; </code></pre> <p>and using 'a4j:jsFunction' (also demonstrated how to use setPropertyActionListener, it is for case if your EL resolver does not support method invocations with parameters (refer to BalusC comment))</p> <pre><code>&lt;rich:fileUpload onupload="setImageFormat();" yourParameters="..."&gt;&lt;/rich:fileUpload&gt; &lt;a4j:jsFunction name="setImageFormat"&gt; &lt;f:setPropertyActionListener value="#{imageFormat}" target="#{fileUploadController.imageFormat}"/&gt; &lt;/a4j:jsFunction&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload