fileUpload gets invisible on AJAX-Render (3.0.M2)

UI Components for JSF
Post Reply
Selaron
Posts: 17
Joined: 30 Nov 2010, 16:13

05 Jul 2011, 14:40

Using the latest dev release 3.0.M2, when pressing the commandButton in a Form as below, the fileUpload component gets invisible.

Anyone els encounters this problem?

Thanks.

Code: Select all

	<h:form>
		<h:commandButton value="doNothing"
				type="submit">
			<f:ajax render="testPanelGrid"/>
		</h:commandButton>

		<h:panelGrid id="testPanelGrid">
			<p:fileUpload mode="advanced">
			</p:fileUpload>
		</h:panelGrid>
	</h:form>

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

05 Jul 2011, 15:05

Try p:ajax or p:commandButton.

Selaron
Posts: 17
Joined: 30 Nov 2010, 16:13

05 Jul 2011, 15:25

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

05 Jul 2011, 15:33

Yes, you can't update fileUpload component as of 3.0.M2.

http://code.google.com/p/primefaces/iss ... il?id=2199

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 55 guests