仕事に行けないようです。私はicefacesを使用しており、2つの列を持つ非常に単純です。1 つは remove などのアクションを含み、もう 1 つは文字列 (正規表現を表す) を含みます。削除アクションで正しい行を削除するために、それを実際の要素に次のようにリンクしようとしています:
<html xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:m="http://www.mitre.org/asias/jsf">
<ui:composition>
<ice:dataTable binding="#{binding}"
value="#{binding.editableRows}"
var="item">
<ice:column>
<f:facet name="header">
<ice:commandLink styleClass="linkBlue"
action="#{binding.addEditableRow}">
<ice:outputText value="Add" />
</ice:commandLink>
</f:facet>
<ice:commandLink styleClass="linkBlue"
action="#{binding.removeEditableRow}">
<f:propertyActionListener value="#{item}" target="#{binding.actionRow}" />
<ice:outputText value="Remove" />
</ice:commandLink>
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Regular Expression" />
</f:facet>
<ice:inputText value="#{item.object}" size="100" />
</ice:column>
</ice:dataTable>
</ui:composition>
</html>
これで見つけたものはすべて、JSF 1.2が必要だと言っています。JSF 1.2 を使用しています。依存関係を管理するために使用している apache Ivy 構成ファイルは次のとおりです。
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="org.mitre.asias" module="testwebproject" />
<configurations defaultconfmapping="default->default">
<conf name="default" visibility="public" description="needed for deployment" extends="runtime,master" />
<conf name="master" visibility="public" description="only this artifact" />
<conf name="runtime" visibility="public" description="libraries only needed at runtime" extends="compile" />
<conf name="provided" visibility="public" description="provided by container, not needed for deployment" />
<conf name="test" visibility="private" description="needed for testing" />
<conf name="compile" visibility="public" description="needed for compilation" />
<conf name="sources" visibility="public" description="the source artifact, if any."/>
<conf name="javadoc" visibility="public" description="the javadoc artifact, if any."/>
<conf name="optional" visibility="public" description="contains all optional dependencies"/>
<conf name="ide" visibility="public" description="all libraries, sources, and javadoc needed for ide" extends="master,compile,provided,test,sources,javadoc" />
</configurations>
<dependencies>
<dependency org="commons-lang" name="commons-lang" rev="2.4" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="commons-logging" name="commons-logging" rev="1.1.1" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="log4j" name="log4j" rev="1.2.16" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="javax.el" name="el-api" rev="2.1.2-b05" conf="provided->compile(*),provided(*),runtime(*),master(*)" />
<dependency org="javax.servlet" name="servlet-api" rev="2.5" conf="provided->compile(*),provided(*),runtime(*),master(*)" />
<dependency org="javax.servlet" name="jsp-api" rev="2.0" conf="provided->compile(*),provided(*),runtime(*),master(*)" />
<dependency org="org.icefaces" name="icefaces" rev="1.8.2" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="org.icefaces" name="icefaces-comps" rev="1.8.2" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="org.icefaces" name="icefaces-facelets" rev="1.8.2" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="javax.faces" name="jsf-api" rev="1.2_13" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="javax.faces" name="jsf-impl" rev="1.2_13" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.14" conf="compile->compile(*),master(*);runtime->runtime(*)" />
<dependency org="junit" name="junit" rev="4.8.1" conf="test->default" />
<exclude module="servlet-api" conf="default" />
<exclude module="el-api" conf="default" />
<exclude module="jsp-api" conf="default" />
</dependencies>
</ivy-module>
IvyDE で Eclipse を使用して、そのライブラリと、[ワークスペース メタデータを使用] を選択して実行されている Tomcat サーバー インスタンスを管理しています。間違ったバージョンの JSF を注入している可能性のある eclipse または tomcat のものはありますか? Ivy に含まれている jsf-impl jar を見ると、その jar に com.sun.faces.taglib.jsf_core.SetPropertyActionListenerImpl と SetPropertyActionListenerTag があることがわかります。それらが必要なすべてであるべきであることは私の理解です。何か案は?私は何かを見逃しているのでしょうか、それとも単に夢中になっているのでしょうか?
編集:
今、私は本当にイライラしています。BalusC からの提案に従って、faces-config.xml を更新して、1.1 dtd の代わりに 1.2 スキーマ定義を使用しました。これは役に立ちませんでした。ということで、いろいろと情報を探します。(この問題)に関連する別のスタックオーバーフロー記事を見つけましたが、jsf-facelets.jarの新しいバージョンを取得する以外に解決策はありませんでした(新しい/古いバージョンはリストされていません)。repo1.maven.org/maven2 ( 1.1.14 ) で入手可能な最新バージョンを使用しています。だから、その前に行かないでください。私の新しい質問は、なぜfaceletsがこれと関係があるのでしょうか? JSFコアの一部ですよね?jsf-impl-1.2_13.jar::META-INF/jsf_core.tldに setPropertyActionListener のタグがあることに気付きました。
<tag>
...
<name>setPropertyActionListener</name>
<tag-class>com.sun.faces.taglib.jsf_core.SetPropertyActionListenerTag</tag-class>
<body-content>empty</body-content>
...
</tag>
その上、これは私のjsf-facelets-1.1.14.jar::com/sun/facelets/tag/jsf/core/CoreLibrary.java にあります:
...
this.addTagHandler("setPropertyActionListener", SetPropertyActionListenerHandler.class);
...
含まれているライブラリで十分なようです。ここで何が起こっているのか分かりますか?簡単な facelet を書けるようになるには、戻って JSF の学位を取得する必要がありますか?