私は現在 Core JavaServer Faces(3e) の本を読んでいます。
本の第11章からajaxスピナーコードを実行しようとしています。
Eclipse、weblogic 10.3.5サーバー、およびMojarra implにOracleエンタープライズパックを使用しています。
しかし、UISpinner クラスは次のエラー メッセージを表示しています。
「タイプ UISpinner は、継承された抽象メソッド ClientBehaviorHolder.getClientBehaviors() を実装する必要があります」</p>
ただし、jsf 仕様によると、UIComponentBase クラスは、UISpinner クラスによって継承される getClientBehaviors() メソッドを実装します。それでも、なぜこのエラーが発生するのですか? 助けてください。
UISpinner クラスの実装は次のとおりです。
package com.corejsf;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import javax.faces.component.FacesComponent;
import javax.faces.component.UIInput;
import javax.faces.component.behavior.ClientBehavior;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.convert.IntegerConverter;
@FacesComponent("com.corejsf.Spinner")
public class UISpinner extends UIInput implements ClientBehaviorHolder {
private static List<String> eventNames = Arrays.asList("click");
public UISpinner() {
setConverter(new IntegerConverter());
// to convert the submitted value
setRendererType("com.corejsf.JSSpinner");
// this component has a renderer
}
public String getDefaultEventName() { return "click"; }
public Collection<String> getEventNames() { return eventNames; }
}