Hi all, I am implementing a form where I need to upload 2 different files.
I want to block the second upload until the user added the first file and I validated on the server. In my Java code I have: fileUploadFieldSello = new FileUploadField("fileUploadFieldSello"); fileUploadFieldSello.setRequired(true); AjaxFormComponentUpdatingBehavior update = new AjaxFormComponentUpdatingBehavior( "onchange") { @Override protected void onUpdate(AjaxRequestTarget target) { // Here goes the call to my business logic for validation System.out.println("onchange event triggered"); fileUploadFieldPdf.setEnabled(true); fileUploadFieldSello.setEnabled(false); target.addComponent(fileUploadFieldPdf); } }; fileUploadFieldSello.add(update); // Add one file input field (sello) add(fileUploadFieldSello); ... Now in my html I have: <form wicket:id="ajax-simpleUpload"> <fieldset> <legend>ValidaciĆ³n</legend> <p> <label for="upload">Sello</label> <input wicket:id="fileUploadFieldSello" id="uploadSello" type="file"/> </p> <p> <label for="upload">PDF</label> <input wicket:id="fileUploadFieldPdf" id="uploadPdf" type="file"/> </p> <input type="submit" value="Validate"/> <span wicket:id="progress">[[ajax upload progressbar]]</span> </fieldset> </form> My problem is that the "onchange" event seems to never got triggered. This raises the question whether I need to trigger another event? Further somebody knows a good tool to see which the input type"file" element is triggering when I select a file? TIA for any infos. salu2 -- Thorsten Scherler <thorsten.at.apache.org> Open Source Java <consulting, training and solutions> Sociedad Andaluza para el Desarrollo de la Sociedad de la InformaciĆ³n, S.A.U. (SADESI) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org