プロジェクト用にカスタムレンダラーを作成する機会がありましたが、これは完全に機能しています。ただし、ResponseWriterメソッドのパラメーターのいくつかに多少混乱しています。ドキュメントはこれをあまりよく説明していないので、常駐のJSF専門家の1人がこれをよりよく説明できることを望んでいます。具体的には:
public abstract void startElement(java.lang.String name,
javax.faces.component.UIComponent component)
throws java.io.IOException
Parameters:
name - Name of the element to be started
component - The UIComponent (if any) to which this element corresponds
その2番目のパラメータは実際に何をしますか?レンダラーで「null」または「this」を渡しても問題なく動作するようです。
同様にwriteAttributeの場合:
public abstract void writeAttribute(java.lang.String name,
java.lang.Object value,
java.lang.String property)
throws java.io.IOException
Parameters:
name - Attribute name to be added
value - Attribute value to be added
property - Name of the property or attribute (if any) of the UIComponent associated with the containing element, to which this generated attribute corresponds
ResponseWriterがバッキングプロパティを知る必要があるのはなぜですか?繰り返しになりますが、クラス属性を書き込むときにnullまたは「styleClass」を渡すと正常に機能するようです。
好奇心旺盛な人が知りたがっています、そして私のグーグルフーはこれに失敗しています...