ajax - jsf 2.2.x AjaxBehaviorEvent listener no refresh multipart/form-data -
i have
<h:form prependid="true" enctype="multipart/form-data" > <h:inputtext value="#{mybean.somestringfield}" /> <h:inputfile id="myfile" value="#{mybean.somepartfield}" /> <h:selectonemenu value="#{mybean.somefield}" > <f:selectitems value="#{mybean.someselectitemlist}" > <f:ajax event="change" execute="@form" render="@form" immediate="true" listener="#{mybean.somelistenerajaxbehaviorevent}" /> </h:selectonemenu> </h:form>
when change value on selectonemenu form no refresh form
the method somelistenerajaxbehaviorevent consists of code following
public void somelistenerajaxbehaviorevent(ajaxbehaviorevent ev) throws abortprocessingexception { try { string code = (string)((uioutput)ev.getsource()).getvalue(); ... // sql sentences update data list } catch(exception ex) { ex.printstacktrace(); } }
this method works correctly when form not of type "multipart/form-data" need attach files on form. have ideas can me solve problem, appreciate contributions
sory, can't add comment.
you should use </h:form>
instead of </form>
close form. did try add log method somelistenerajaxbehaviorevent check if invoke?
Comments
Post a Comment