Note that there are some explanatory texts on larger screens.

plurals
  1. POJSF + rich:fileupload + param
    primarykey
    data
    text
    <p>I am using <code>&lt;rich:fileupload&gt;</code> and I need to send some extra parameters to my Controller. I tried to use <code>&lt;f:param&gt;</code> for this.</p> <p>Here is the view:</p> <pre><code>&lt;rich:fileUpload fileUploadListener="#{fileUploadController.listener}" maxFilesQuantity="#{fileUploadController.uploadsAvailable}" addControlLabel="Hinzufügen" uploadControlLabel="Hochladen" cancelEntryControlLabel="Abbrechen" doneLabel="Fertig" clearAllControlLabel="Alle entfernen" noDuplicate="true" stopControlLabel="Stop" clearControlLabel="Entfernen" id="upload" immediateUpload="#{fileUploadController.autoUpload}" ajaxSingle="true" acceptedTypes="jpg" allowFlash="#{fileUploadController.useFlash}" rerender="info"&gt; &lt;a4j:support event="onuploadcomplete" reRender="info" status="globalStatus" /&gt; &lt;f:param value="#{imageFormat}" name="#{fileUploadController.imageFormat}"/&gt; &lt;/rich:fileUpload&gt; </code></pre> <p>Here is the <code>FileUploadController</code> backing bean:</p> <pre><code> private String imageFormat; public void setImageFormat(String imageFormat) { this.imageFormat = imageFormat; } public String getImageFormat() { return imageFormat; } </code></pre> <p>However, the setter is never called, so the variable is always <code>null</code>. The <code>#{imageFormat}</code> has the correct value, I verified it with an <code>&lt;h:outputText&gt;</code>.</p> <p>I can't use <code>&lt;a4j:param&gt;</code>, because there is no button to hook on.</p> <p>We are using JSF 1.2, not JSF 2.0.</p>
    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.
 

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