2012-06-24 34 views

回答

4

是的,您可以指定通過Portlet依賴關係定義的部署順序。將required-deployment-contexts=MyPrevPortlet設置爲liferay-plugin-package.properties

+2

我沒有看到這個問題也被問你:-) –

5

是的,這是可能的。

您可以通過在依賴portlet的liferay-plugin-package.properties中設置required-deployment-contexts屬性來指定插件的部署順序。

例子:

如果您的portlet my-custom-portlet依賴於其它的插件,那麼你可以指定如下:

1)對於單一依賴required-deployment-contexts

required-deployment-contexts=my1-other-portlet 

2)對於多required-deployment-contexts

required-deployment-contexts=\ 
    my-other-theme,\ 
    my1-other-portlet,\ 
    my-other-hook,\ 
    my2-other-portlet 

希望這會有所幫助。

+0

但在一個portlet項目中,如果有多個portlet存在,那麼如果一個portlet依賴於另一個portlet ......就像一個portlet在會話中添加一些值並基於會話第二個portlet必須dsiplay數據,那麼我們如何設置portlet的順序? –

+1

會話共享是運行時間而不是部署時間。所以我認爲它與首先部署哪個portlet沒有任何關係。 –

相關問題