Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Joshua Messina
Make Media Gallery portlet "instanceable"
25 de Abril de 2012 13:24
Resposta

Joshua Messina

Ranking: Junior Member

Mensagens: 30

Data de entrada: 13 de Abril de 2012

Mensagens recentes

I'm developing a collaboration site using liferay portal 6.1 tomcat, and I have a page where users would be able to access shared media. However, I wanted to make each media gallery portlet specific to a type of media, i.e. one for images, one for audio, one for video. The issue I am having is that I can't figure out how to make the Media Gallery portlet instanceable. I couldn't find a reference to the portlet in the liferay-portlet.xml file, and so I'm not really sure how to proceed. Can anyone help me with this?
Hitoshi Ozawa
RE: Make Media Gallery portlet "instanceable"
25 de Abril de 2012 14:54
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Check the following page. Search for "<instanceable>false</instanceable>" and read the explanation above.

http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/writing-the-my-greeting-portl-4
Joshua Messina
RE: Make Media Gallery portlet "instanceable"
26 de Abril de 2012 08:52
Resposta

Joshua Messina

Ranking: Junior Member

Mensagens: 30

Data de entrada: 13 de Abril de 2012

Mensagens recentes

Hitoshi Ozawa:
Check the following page. Search for "<instanceable>false</instanceable>" and read the explanation above.

http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/writing-the-my-greeting-portl-4



I don't see how this helps me. The only thing it says about making portlets instanceable is this:

"First, we don't want multiple greetings on the same page, so we are going to make the My Greeting portlet non-instanceable. To do this, edit liferay-portlet.xml and change the value of the element instanceable from true to false so that it looks like this:

<instanceable>false</instanceable>"

That does not answer my question. I know that I need to add that tag (with the value "true", not "false") into the liferay-portlet.xml file, but I can't find a reference to that portlet in the file. I need to know where the reference to that portlet is so that I can add the instanceable tag. Please note that this is a portlet that came pre-installed on liferay, not one that I added.
Gowtham Mani
RE: Make Media Gallery portlet "instanceable"
27 de Abril de 2012 04:51
Resposta

Gowtham Mani

Ranking: Junior Member

Mensagens: 56

Data de entrada: 25 de Novembro de 2008

Mensagens recentes

Hi Joshua,

The portlet name for media gallery is "31".
So you can add the <instanceable> tag to that particlar portlet tag

Hope this helps

Regards,
Gowtham
Joshua Messina
RE: Make Media Gallery portlet "instanceable"
27 de Abril de 2012 08:15
Resposta

Joshua Messina

Ranking: Junior Member

Mensagens: 30

Data de entrada: 13 de Abril de 2012

Mensagens recentes

Unfortunately I already tried adding <instanceable> to this portlet. It did not work. If that is indeed the correct portlet then I'm not sure what is going wrong with my installation. Unfortunately I won't be able to test further until I rebuild my site.
Hitoshi Ozawa
RE: Make Media Gallery portlet "instanceable"
27 de Abril de 2012 09:14
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Just tried it on Liferay 6.1.0 GA1 Tomcat bundle and were able to put several Media Gallery on a page.

Check portlet-custom.xml file and search for "Media Gallery". You'll find the following tags implying the portlet-name is 31.

<portlet-name>31</portlet-name>
<display-name>Media Gallery</display-name>

Next, open up liferay-portlet.xml file and insert instanceable tag:
<use-default-template>false</use-default-template>
<instanceable>true</instanceable>
<scopeable>true</scopeable>
Joshua Messina
RE: Make Media Gallery portlet "instanceable"
27 de Abril de 2012 09:28
Resposta

Joshua Messina

Ranking: Junior Member

Mensagens: 30

Data de entrada: 13 de Abril de 2012

Mensagens recentes

I guess it did work. I don't know what was wrong with it before. I had added that tag to portlet 31 a while ago. I don't know why it didn't work then. Anyway, thanks for the help.
Hitoshi Ozawa
RE: Make Media Gallery portlet "instanceable"
27 de Abril de 2012 16:28
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

The order of the tags are important. If it's not in the right order, Liferay will throw exception during startup.
Joshua Messina
RE: Make Media Gallery portlet "instanceable"
27 de Abril de 2012 18:05
Resposta

Joshua Messina

Ranking: Junior Member

Mensagens: 30

Data de entrada: 13 de Abril de 2012

Mensagens recentes

I did have it in the right order. I followed the dtd exactly. It just works now. I didn't actually change anything in that file.
Hitoshi Ozawa
RE: Make Media Gallery portlet "instanceable"
27 de Abril de 2012 18:52
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7949

Data de entrada: 23 de Março de 2010

Mensagens recentes

Nice to hear that you have it working now. I hope you'll be able to get your page setup now. emoticon