掲示板
Liferay 7 Item Selector taglib
7年前 に Benjamin Bini によって更新されました。
Liferay 7 Item Selector taglib
Junior Member 投稿: 31 参加年月日: 13/05/24 最新の投稿
I try to use Liferay 7 new Item Selector in a custom Control Panel Portlet.
I create custom entities on which I want to attach a file from Document and Media portlet.
I know that there is the "liferay-item-selector" taglibs (https://docs.liferay.com/portal/7.0/taglibs/modules/apps/collaboration/item-selector/com.liferay.item.selector.taglib/liferay-item-selector/tld-summary.html) but browsing the source in GitHub does not help me a lot to understand exactly how to make it work.
I don't see any documentation about it anywhere.
Do you have any hint ? Is a more detailed doc planned ?
Thank you very much
I create custom entities on which I want to attach a file from Document and Media portlet.
I know that there is the "liferay-item-selector" taglibs (https://docs.liferay.com/portal/7.0/taglibs/modules/apps/collaboration/item-selector/com.liferay.item.selector.taglib/liferay-item-selector/tld-summary.html) but browsing the source in GitHub does not help me a lot to understand exactly how to make it work.
I don't see any documentation about it anywhere.
Do you have any hint ? Is a more detailed doc planned ?
Thank you very much
7年前 に David H Nebinger によって更新されました。
RE: Liferay 7 Item Selector taglib
Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
Your best example for how to do something Liferay is to have the Liferay source. A search of the source yields 78 examples, one of which is https://github.com/liferay/liferay-portal/blob/master/modules/apps/collaboration/blogs/blogs-web/src/main/resources/META-INF/resources/blogs/edit_entry.jsp#L140.
Note that I didn't search github for this, I pull down the source for the version of Liferay I'm coding against and load the project into the IDE. That way I have it close by for searching.
Come meet me at the LSNA!
Note that I didn't search github for this, I pull down the source for the version of Liferay I'm coding against and load the project into the IDE. That way I have it close by for searching.
Come meet me at the LSNA!
7年前 に Chema Balsas によって更新されました。
RE: Liferay 7 Item Selector taglib
Regular Member 投稿: 127 参加年月日: 13/02/25 最新の投稿
Hey Benjamin!
Aside from the inner modules David pointed to, you can check out this community project where they showcased how to create an item selector view for a custom entity.
Hope it helps!
Aside from the inner modules David pointed to, you can check out this community project where they showcased how to create an item selector view for a custom entity.
Hope it helps!
7年前 に Benjamin Bini によって更新されました。
RE: Liferay 7 Item Selector taglib
Junior Member 投稿: 31 参加年月日: 13/05/24 最新の投稿Chema Balsas:
Hey Benjamin!
Aside from the inner modules David pointed to, you can check out this community project where they showcased how to create an item selector view for a custom entity.
Hope it helps!
Thank you. But this shows how to implement a view for the item selector for a custom entity, what I try is to implement the item selector in my custom entity portlet itself, in order to be able to attach a "Document and Media" entry to this entity.
As David H Nebinger said, there are some example in the sources, I tried to immitate it, but I have issues.
For example I created a similar class to BlogsItemSelectorHelper to be able to have this "itemSelectorURL", but the injection of "ItemSelector" fails :
@Reference(
cardinality = ReferenceCardinality.OPTIONAL,
policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY
)
public void setItemSelector(ItemSelector itemSelector) {
_itemSelector = itemSelector;
}
public void unsetItemSelector(ItemSelector itemSelector) {
_itemSelector = null;
}
private ItemSelector _itemSelector;
ItemSelector implementation is not injected and remains null.
Besides, David H Nebinger, how do you have the source of your version of Liferay directly running in Eclipse ? I use the bundle, I have the sources attached to the jar but I don't have the sources in my workspace.
Thank you very much for taking time to answer, I appreciate it
7年前 に Benjamin Bini によって更新されました。
RE: Liferay 7 Item Selector taglib
Junior Member 投稿: 31 参加年月日: 13/05/24 最新の投稿
I allow myself to up this thread