I have an XPage upon which exists a CheckBox Group control. I have code defined for the onclick event to submit the value of the checkbox to a Managed Bean on the server, and also trigger a partial refresh of another element.
This works fine when editing an EXISTING document.
However, when working with a NEW document, the submit never fires.
Here is the code:
<xp:checkBoxGroup
id="cztypes1"
value="#{document1.czTypes}"
required="true"
layout="pageDirection">
<xp:this.validators>
<xp:validateRequired message="You must select at least one 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?