Thanks for the replay.
Same happens with:
Code: Select all
<h:form>
<p:commandButton value="doNothing"
type="submit" update="testPanelGrid">
</p:commandButton>
<h:panelGrid id="testPanelGrid">
<p:fileUpload mode="advanced">
</p:fileUpload>
</h:panelGrid>
</h:form>
and
Code: Select all
<h:form>
<h:commandButton value="doNothing"
type="submit">
<p:ajax update="testPanelGrid"/>
</h:commandButton>
<h:panelGrid id="testPanelGrid">
<p:fileUpload mode="advanced">
</p:fileUpload>
</h:panelGrid>
</h:form>
Further, FireBug screams something like this:
When I called replaceWith(<table id="j_idt6:testPanelGrid"> <tbody> <tr> <td><div id="j_idt6:j_idt13" class="ui-fileupload ui-widget"><div id="j_idt6:j_idt13_browser" class="ui-fileupload-browser ui-state-default ui-corner-all ui-helper-hidden"><input type="file" id="j_idt6:j_idt13_input" name="j_idt6:j_idt13_input" /><button>Upload</button><div>Browse</div></div><table id="j_idt6:j_idt13_files" class="ui-fileupload-files"></table><div class="ui-fileupload-controls"><button type="button" class="ui-fileupload-upload-button">Upload</button><button type="button" class="ui-fileupload-cancel-button">Cancel</button></div></div><script type="text/javascript">$(function(){widget_j_idt6_j_idt13 = new PrimeFaces.widget.FileUpload('j_idt6:j_idt13', {mode:'advanced',auto:false,customUI:false,dragDropSupport:true,uploadLabel:'Upload',cancelLabel:'Cancel'});});</script></td> </tr> </tbody> </table> ) with your args, an error was thrown! FileUpload with namespace "ui-fileupload-j_idt6_j_idt13" already assigned to this element