2016-04-13 18 views
0

ドキュメントとメディアのポートレット内にJPSを表示する必要があります。私はページを作成JSPをポートレットに追加するLiferay

<span id="<portlet:namespace />searchButtonContainer"> 
    <liferay-util:include page="/html/portlet/document_library/search_button.jsp" /> 
</span> 

:私は私のアクションを実行するコードを/html/portlet/document_library/toolbar.jspに追加CmisSearchPortletAction

public class CmisSearchPortletAction extends BaseStrutsPortletAction { 
    @Override 
    public void processAction(StrutsPortletAction originalStrutsPortletAction, PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { 
     // TODO 
    } 
    @Override 
    public String render(StrutsPortletAction originalStrutsPortletAction,PortletConfig portletConfig,RenderRequest renderRequest, RenderResponse renderResponse) throws Exception { 
     renderRequest.setAttribute("name", "World"); 
     return "/portlet/document_library/cmis_search.jsp"; 
    } 
} 

は、私はアクションクラスを定義してい/html/portlet/document_library/search_button.jsp

<%@ include file="/html/portlet/document_library/init.jsp" %> 

<liferay-ui:icon-menu align="left" direction="down" icon="" message="search" showExpanded="<%= false %>" showWhenSingleIcon="<%= true %>"> 

    <portlet:renderURL var="urlSearch"> 
     <portlet:param name="struts_action" value="/document_library/cmis_search" /> 
     <portlet:param name="redirect" value="<%= currentURL %>" /> 
    </portlet:renderURL> 

    <liferay-ui:icon image="add_instance" message='<%="Busqueda Avanzada"%>' url="<%= urlSearch %>" /> 

</liferay-ui:icon-menu> 

最後に、私のJPS actio N(cmis_search.jsp):

<%@ include file="/html/portlet/document_library/init.jsp" %> 
<% String name = (String)request.getAttribute("name"); %> 
Hello <%= name %>! 

私は自分の行動(CmisSearchPortletAction)が実行された検索ボタンをクリックして、私はLiferayの中にJSP(cmis_search.jsp)を表示することができますが、ここで問題があるとき。

コンテンツは「文書およびメディア」ポートレットの中にありません。これどうやってするの?。

I Want to move the red one to the docs and media portlet like in this img

答えて

0

のLiferay

に文書メディアポートレット内xxx.JSP表示する

文書メディアポートレットのview.jspページには、/ HTML /ポートレット/ document_libraryディレクトリにあります。それをjspフックで拡張/上書きすることができます。

<liferay-util:include page="xxx.jsp" />を適切な場所に使用することがあります。

Hereどうすればいいですか。

関連する問題