Forums de discussion

Problem when cloning portlet to Plugins-SDK

thumbnail
Christianto Sahat, modifié il y a 15 années.

Problem when cloning portlet to Plugins-SDK

Regular Member Publications: 179 Date d'inscription: 25/09/07 Publications récentes
Hi all,

I tried to clone 'Journal Article' portlet in plugins-sdk environment. After I copied necessary files ( *.java, *.jsp), and modify some xml files, I built and deployed the portlet. The portlet could be registered successfully, but the problem is, after registered, I couldn't see the portlet in 'Add Application' menu.

Moreover, the category where the portlet is in, is always missing. So for example, whenever the portlet I put in 'news' category, this category gone missing after I deployed this portlet.

There are some error messages concerning with localization, like this :


  08:37:18,967 ERROR [IncludeTag:52] Current URL /c/portal/render_portlet generates exception: Can't find resource for bundle com.liferay.portlet.PortletResourceBundle, key javax.portlet.title


and after registered, there's always error message like this :

08:37:03,319 WARN  [PortletHotDeployListener:615] Can't find bundle for base name com.liferay.portlet.StrutsResourceBundle, locale en_US


Here are some snippet of my code :

portlet.xml file :

	<portlet>
		<portlet-name>xxxnews</portlet-name>
		<display-name>xxx News</display-name>
		<portlet-class>com.liferay.portlet.StrutsPortlet</portlet-class>
		<init-param>
			<name>view-action</name>
			<value>/clivetnews/view</value>
		</init-param>
		<expiration-cache>0</expiration-cache>
		<supports>
			<mime-type>text/html</mime-type>
		</supports>
		<resource-bundle>com.liferay.portlet.StrutsResourceBundle</resource-bundle>
		<security-role-ref>
			<role-name>power-user</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>user</role-name>
		</security-role-ref>
	</portlet>


struts-config.xml

<struts-config>
    <action-mappings>
             // stripped
    </action-mappings>

	<!-- Custom Request Processor -->

	<controller processorClass="com.liferay.portal.struts.PortalRequestProcessor" contentType="text/html; charset=UTF-8" />

	<!-- Message Resources -->

	<message-resources parameter="content.Language,content.Language-ext,content.Language-xxx" factory="com.liferay.portal.struts.MultiMessageResourcesFactory" />
        
    <plug-in classname="org.apache.struts.tiles.TilesPlugin">
        <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
        <set-property property="moduleAware" value="true" />
        <set-property property="definitions-parser-validate" value="true" />
    </plug-in>
</struts-config>



Under my portlet source folder, I add files content/Language-xxx_*.properties for localization.

Does anyone know how to fix this problem ?
Xavi Fibla Agustín, modifié il y a 14 années.

RE: Problem when cloning portlet to Plugins-SDK

New Member Publications: 24 Date d'inscription: 15/03/09 Publications récentes
Hello,

How can I clone an existing portlet in Liferay?

Thanks,
thumbnail
Raj K, modifié il y a 13 années.

RE: Problem when cloning portlet to Plugins-SDK

Regular Member Publications: 214 Date d'inscription: 19/06/09 Publications récentes
Hi Xavi,

Did you get to know to how to clone a liferay portlet?
thumbnail
Raj K, modifié il y a 13 années.

RE: Problem when cloning portlet to Plugins-SDK

Regular Member Publications: 214 Date d'inscription: 19/06/09 Publications récentes
Christianto Sahat:


  08:37:18,967 ERROR [IncludeTag:52] Current URL /c/portal/render_portlet generates exception: Can't find resource for bundle com.liferay.portlet.PortletResourceBundle, key javax.portlet.title



Hi Christianto,

Did you get a solution for
Can't find resource for bundle com.liferay.portlet.PortletResourceBundle, key javax.portlet.title ??

Please suggest!
Raquel S, modifié il y a 13 années.

RE: Problem when cloning portlet to Plugins-SDK

New Member Publications: 13 Date d'inscription: 03/12/10 Publications récentes
I have also this problem. Has anyone found a solution?

Thanks
mikel basabe, modifié il y a 12 années.

RE: Problem when cloning portlet to Plugins-SDK

New Member Publications: 21 Date d'inscription: 27/04/11 Publications récentes
Raquel S:
I have also this problem. Has anyone found a solution?

Thanks


Hi!,

Have you found a solution for this problem?

I have the same problem.

Thanks!
thumbnail
Archi Madhu, modifié il y a 10 années.

RE: Problem when cloning portlet to Plugins-SDK

Regular Member Publications: 237 Date d'inscription: 25/03/08 Publications récentes
Has anyone got answer for this one?