XPages onclick event not submitting on NEW document -
i have xpage upon exists checkbox group control. have code defined onclick event submit value of checkbox managed bean on server, , trigger partial refresh of element.
this works fine when editing existing document.
however, when working new document, submit never fires.
here code:
<xp:checkboxgroup id="cztypes1" value="#{document1.cztypes}" required="true" layout="pagedirection"> <xp:this.validators> <xp:validaterequired message="you must select @ least 1 employee type" /> </xp:this.validators> <xp:selectitem itemlabel="office" itemvalue="o" /> <xp:selectitem itemlabel="non-office" itemvalue="n" /> <xp:selectitem itemlabel="sub contractors" itemvalue="s" /> <xp:eventhandler event="onclick" submit="true" refreshmode="partial" refreshid="alertrecipients1"> <xp:this.action><![cdata[#{javascript:alertmessage.echo(getcomponent("cztypes1").getvalue());}]]></xp:this.action> </xp:eventhandler> </xp:checkboxgroup>
any ideas?
ok, got answer friend on forum.
the issue had validators on other controls on xpage.
because lifecycle processing , failing validation (for other blank fields) onclick submittal portion not being processed.
this demonstrated adding immediate=true property event handler:
doing allowed testing proceed, , echo method called (with null value being passed due validation failure).
once other fields on xpage filled out, onclick event worked fine.
Comments
Post a Comment