ポートレット API タイプ | 構成オブジェクト | バリュー・バインディング |
---|---|---|
JSR 168 API | PortletPreferences | #{portletPreferences.attribute name} |
IBM® ポートレット API | PortletApplicationSettings | #{portletApplicationSettings.attribute name} |
PortletSettings | #{portletSettings.attribute name} | |
PortletData | #{portletData.attribute name} |
ポートレット JSP ファイルの「ページ・データ」ビューを使用して、属性を定義し、それらの属性を Faces コンポーネントにバインドしてください (JSP ファイルからのポートレット API オブジェクトのアクセスを参照)。
PortletRequest request = (PortletRequest)facesContext.getExternalContext().getRequest(); PortletResponse response = (PortletResponse)facesContext.getExternalContext().getResponse(); PortletContext context = (PortletContext)facesContext.getExternalContext().getContext();
Faces アクションのために IBM ポートレット API の ActionEvent クラス (org.apache.jetspeed.portlet.event.ActionEvent) に アクセスしたい場合は、次のように要求属性から取得できます。
ActionEvent event = (ActionEvent)facesContext.getExternalContext().getRequestMap().get("com.ibm.faces.portlet.ACTION_EVENT");