ポートレット設定値を変更できない、つまり設定値が変更されないというポートレット設定の問題に直面しています。
ポートレットの値を変更してから、変更されたportlet.xml
場所でチェックインしました。しかし、キーを使用してこのポートレット設定値を取得しようとすると、常に以前の値が返されます。
私の portlet.xml は次のようになります。
<portlet-preferences>
<preference>
<name>DATA_FILE_DOC_NAME</name>// the name of the preference
<value>COM-EXAMPLE-EDIT</value>// the corresponding value
<read-only>false</read-only>// extra attribute
</preference>
</portlet-preferences>
Java ファイルでは、この設定を次のように取得しています。
....
//Getting the portal prefernce object.
PortletPreferences portletPreference = portletRequest.getPreferences();
// get the data file doc name.
dataFileDocName = portletPreference.getValue(
"DATA_FILE_DOC_NAME", "Not Found!!");
System.out.println("Data file doc name is : "+dataFileDocName.toUpperCase());
私はCOM-EXAMPLE-EDITdataFileDocName
として取得していますが、設定を別のものに変更しても、同じ設定COM-EXAMPLE-EDITを取得します(プロジェクトを何回クリーンアップして公開しても)。
私を助けてください。