You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ChambreNoire <aw...@tentelemed.com> on 2011/12/09 09:34:20 UTC

Re: Setting the value of a HiddenField from JavaScript

Hi there,

I'm having the same problem. Any chance of a peek at your solution?

Cheers

Anthony

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Setting-the-value-of-a-HiddenField-from-JavaScript-tp3539234p4175796.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Setting the value of a HiddenField from JavaScript

Posted by Francois Meillet <qq...@gmail.com>.
Hi Anthony,

Hope this helps :
			
Override the onError method of your submit Button.			
			
String clientFileName;	

@Override
public void onError() {
	super.onError();

	FileUploadField fileUploadField = (FileUploadField)
yourForm.get("YourPanelName:YourFileUploadFieldTagName");

	if (fileUploadField != null && fileUploadField.getFileUpload() != null) {
		final FileUpload upload = fileUploadField.getFileUpload();
		clientFileName = upload.getClientFileName();
	}
}


François

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Setting-the-value-of-a-HiddenField-from-JavaScript-tp3539234p4175962.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org