I have created a composite component which contains a simple primefaces inputText with some validation attached.
In order to attach ajax events for this composite i defined a composite:clientBehaviour like this:
<composite:interface>
<composite:attribute name="value" type="java.lang.String" />
<composite:attribute name="update" type="java.lang.String" />
<composite:editableValueHolder name="ipAddressInput" targets="#{cc.clientId}:ipAddressInput" />
<composite:clientBehavior name="update" targets="#{cc.clientId}:ipAddressInput" event="blur" />
</composite:interface>
<composite:implementation>
<p:inputText placeholder="xxx.xxx.xxx.xxx" id="ipAddressInput" value="#{cc.attrs.value}" validatorMessage="Invalid IPV4 Address">
<p:keyFilter regEx="/[0-9.]/i" />
<f:validator validatorId="com.db.nms.app.netappls.validation.faces.IpV4Validator" />
</p:inputText>
</composite:implementation>
When i add this composite to a page and defining an ajax event like:
<netappls:ipV4Input id="ipInputCC" value="#{addInterfaceIpDialogBean.addressForm.ipAddress}">
<p:ajax update="maskInput" listener="#{addInterfaceIpDialogBean.onUpdateIp}" />
</netappls:ipV4Input>
The listener will not be called on blur. Just copy the inputText where i use the composite and define the ajax event exactly like this will call the listener.
I also tried to set different process and update filter on the ajax element. Nothing had worked. When i add imediate="true" to the ajax element it will fire but the value will not be updated.
My first idea was that it is related to the validator. But also removing the validator does not change anything.
Any idea what i am doing wrong?
The composite will be used in a dialog page using primefaces dialog framework.