When combining the spinner component with f:ajax, the up/down spinning actions gives a javascript error dialog with the message:
malformedXML: source.getAttribute is not a function
It is noticeable that the numbers do respond to the spinning action for a fraction of a second, then the error pops out and the field content becomes NaN. It appears though that the spinner still remembers/tracks the number value, as spinning still shows the values quickly changing before throwing again the message able.
My spinner is based on this composite implementation:
Code: Select all
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<!-- INTERFACE -->
<composite:interface>
<composite:attribute name="id"/>
<composite:attribute name="label"/>
<composite:attribute name="size"/>
<composite:attribute name="value"/>
<composite:attribute name="valueOriginal"/>
<composite:attribute name="maxLength"/>
<composite:attribute name="render" default="true"/>
<composite:attribute name="converter" default=""/>
<composite:attribute name="required" default="false"/>
<composite:attribute name="immediate" default="false"/>
<composite:attribute name="partialSubmit" default="true"/>
<composite:attribute name="readonly" default="true"/>
</composite:interface>
<!-- IMPLEMENTATION -->
<composite:implementation>
<p:spinner
showOn="hover"
id="#{cc.attrs.id}"
rendered="#{cc.attrs.render}"
size="#{cc.attrs.size}"
maxlength="#{cc.attrs.maxLength}"
immediate="#{cc.attrs.immediate}"
required="#{cc.attrs.required}"
value="#{cc.attrs.value}"
readonly="#{cc.attrs.readonly}"
disabled="#{cc.attrs.readonly}"
autocomplete="off"
>
<f:ajax event="change" listener="#{mybean.valueChangeListener}" render="@this" />
</p:spinner>
</composite:implementation>
</div>