jsf 2 - Workaround for richfaces popup validation -
it's documented bug in richfaces (see bug rf-11413)
you can try on richfaces showcase rich:datatable -> editing
only solution find : https://community.jboss.org/message/735198 (look answer eldin okanovic)
but doesn't work me, came similar solution, works me.
in xhtml rich:datatable add action on a4j:commandlink action="#{carsbean.popupreset}"
<a4j:commandlink styleclass="no-decor" render="editgrid" execute="@this" oncomplete="#{rich:component('editpane')}.show()" action="#{carsbean.popupreset}"> <h:graphicimage value="/images/icons/edit.gif" alt="edit" /> <a4j:param value="#{it.index}" assignto="#{carsbean.currentcarindex}"/> <f:setpropertyactionlistener target="#{carsbean.editedcar}" value="{car}" /> </a4j:commandlink>
in carsbean add method carsbean.popupreset
public void popupreset() { facescontext context = facescontext.getcurrentinstance(); uiinput com1 = (uiinput) context.getviewroot().findcomponent("form:price"); uiinput com2 = (uiinput) context.getviewroot().findcomponent("form:mage"); ... com1.resetvalue(); com1.setvalue(editedcar.getprice()); com2.resetvalue(); com2.setvalue(editedcar.getmileage()); ... }
it's not pretty solution far works me.
Comments
Post a Comment