Upload zip file in JSF 2.2 with ajax -
in application can upload zip file. i'd incorporate ajax. how can ajax work zip files?
right now, code looks this:
<h:form id="form" enctype="multipart/form-data" prependid="false" pt:class="form-inline" pt:role="form" rendered="#{consolecontroller.getadmin() != null}"> <div class="form-group"> <label class="sr-only" for="file">file:</label> <h:inputfile id="file" value="#{uploadcontroller.file}" /> </div> <h:commandbutton id="button" value="upload" action="#{uploadcontroller.upload}" class="btn btn-default"> <f:ajax execute="file" render="@all" /> </h:commandbutton> </h:form> i following error in form of modal window in chrome:
malformedxml: toplevel node must 1 of: changes, redirect, error,...
i having same problem every time tried render(using ajax) forms of type enctype="multipart/form-data". instead of using render="@all", try render manually forms want except form "form". ex: render=":form2 :form3 : form4"
Comments
Post a Comment