私は次の構造を持っています:
@Named
public class SpecificAction extends BasicAction {
public void calulateSomething(ValueChangeEvent event) {...}
}
}
@Named
public abstract class BasicAction {
public void calculateSomething(ValueChangeEvent event) {...}
}
ビューより:
ファイル: SpecificAction.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:cc="http://java.sun.com/jsf/composite/cc"
xml:lang="de" lang="de">
<ui:composition template="/BasicAction.xhtml">
<ui:param name="basicAction" value="#{specificAction}" />
....
</ui:composition>
BasicAction.xhtml には、私の複合コンポーネントが含まれています。
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:cc="http://java.sun.com/jsf/composite/cc"
xmlns:gui="http://java.sun.com/jsf/composite/gui">
<gui:inplaceInput id="name" valueChangeListener="#{basicAction.calculateSomething}" value=#{bean.name} />
</html>
そして複合コンポーネント:
<composite:interface>
<composite:attribute name="value" />
<composite:editableValueHolder name="Value"/>
<composite:attribute name="valueChangeListener" targets="Value" />
</composite:interface>
<composite:implementation>
<h:inputText id="Value" value="#{cc.attrs.value}" onblur="handleBlur(this.id);" >
<composite:insertChildren />
</h:inputText>
</composite:implementation>
作成したものを実行すると、valueChangeListener の el が「specificAction」であれば完全に機能します。また、「basicAction」式を使用してbasicAction.xhmlで正常に動作します.複合コンポーネントだけで、私はその面白い例外を取得しました:
[ExceptionHandlerFactory] Handling exception javax.faces.event.AbortProcessingException: javax.faces.event.AbortProcessingException: /BasicAction.xhtml @XX,XX valueChangeListener="#{basicAction.calculateSomething}": The class 'SpecificAction' does not have the property 'calculateSomething'.
at javax.faces.event.MethodExpressionValueChangeListener.processValueChange(MethodExpressionValueChangeListener.java:157) [:2.1.3-FCS]
at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134) [:2.1.3-FCS]
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769) [:2.1.3-FCS]
何かアイデアはありますか?
Seam 3 または JSF2 Framework のバグか、それとも私の側の愚かなエラーですか?