Foren

how to add tab at configuration portlet

Dax Saw, geändert vor 14 Jahren.

how to add tab at configuration portlet

Regular Member Beiträge: 165 Beitrittsdatum: 27.03.09 Neueste Beiträge
Hi
I created portlet and i have sample_edit.jsp to change preferences this portlet. ( a few field to change value)
But i want to create portlet without sample_edit.jsp ( i need it on configuration portlet, it's should be like extra new tab) How i can add tab in configuration portlet mode.

i use netbeans with portlet pack.

anybody can give me good tutorial how to add tab in configuration portlet.


Thanks for help.
Sory for my english.
Dax Saw, geändert vor 14 Jahren.

RE: how to add tab at configuration portlet

Regular Member Beiträge: 165 Beitrittsdatum: 27.03.09 Neueste Beiträge
hi all
don't work me.
it's my files
liferay-portelt-ext.xml:

	<portlet>
	<portlet-name>EXT_1</portlet-name>
	<struts-path>ext/reports</struts-path>
    <configuration-action-class>com.ext.portlet.reports.action.EditConfigurationAction</configuration-action-class>
    </portlet>


stratus-config.xml:

<action path="/ext/reports/edit_configuration" type="com.ext.portlet.reports.action.EditConfigurationAction">
    <forward name="portlet.ext.reports.edit_configuration" path="portlet.ext.reports.edit_configuration" />
  
  </action>


tiles-defs.xml:

 <definition name="portlet.ext.reports.edit_configuration" extends="portlet.portlet_configuration.edit_configuration">
    <put name="portlet_configuration_content" value="/portlet/ext/reports/edit_configuration.jsp" />
  </definition>


portlet-ext.xml:

..
<portlet-name>EXT_1</portlet-name>
		<display-name>Reports</display-name>
		<portlet-class>com.ext.portlet.reports.ReportsPortlet</portlet-class>
		 <configuration-action-class>com.ext.portlet.reports.action.EditConfigurationAction</configuration-action-class>
..


EditConfigurationAction.java :

package com.ext.portlet.reports.action;

import com.liferay.portal.struts.PortletAction;
import com.liferay.portal.kernel.util.Constants;

import java.util.ArrayList;
import java.util.List;

import javax.portlet.PortletConfig;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.WindowState;

import javax.servlet.jsp.PageContext;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;


public class EditConfigurationAction{

public ActionForward render(
      ActionMapping mapping, ActionForm form, PortletConfig config,
      RenderRequest req, RenderResponse res)
    throws Exception {
   return mapping.findForward("portlet.ext.reports.edit_configuration");
  }

}


anybody can help me?
how to fix it or sent me files which work good

Thanks
Dax Saw, geändert vor 14 Jahren.

RE: how to add tab at configuration portlet

Regular Member Beiträge: 165 Beitrittsdatum: 27.03.09 Neueste Beiträge
anybody can give me solution or sample code.

thanks.
Dax Saw, geändert vor 14 Jahren.

RE: how to add tab at configuration portlet

Regular Member Beiträge: 165 Beitrittsdatum: 27.03.09 Neueste Beiträge
Hi
I still can't add tab to configuration portlet.
I try a few combination.

I attach rar where is my ext-web(just docroot) and ext-impl.
I will be thankful if somebody can help me.

right now with this configuration in attachment i have this error (it's appear whan i click configuration).

I using liferay 5.2.2 and i develope portlet with extension environment



1:48:27,546 INFO  [PluginPackageUtil:1342] Checking for available updates
123
11:48:30,390 INFO  [PluginPackageUtil:1386] Finished checking for available upda
tes in 2844 ms
11:48:35,031 ERROR [jsp:165] java.lang.ClassCastException: com.ext.portlet.repor
ts.action.EditConfigurationAction
        at com.liferay.portal.model.impl.PortletImpl.getConfigurationActionInsta
nce(PortletImpl.java:490)
        at com.liferay.portlet.portletconfiguration.action.EditConfigurationActi
on.getConfigurationAction(EditConfigurationAction.java:138)
        at com.liferay.portlet.portletconfiguration.action.EditConfigurationActi
on.render(EditConfigurationAction.java:111)
        at com.liferay.portal.struts.PortletAction.execute(PortletAction.java:11
4)
        at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:431)
        at com.liferay.portal.struts.PortletRequestProcessor.processActionPerfor
m(PortletRequestProcessor.java:334)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:236)
        at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequ
estProcessor.java:235)
        at com.liferay.portlet.StrutsPortlet.include(StrutsPortlet.java:261)
        at com.liferay.portlet.StrutsPortlet.doView(StrutsPortlet.java:156)
        at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPo
rtlet.java:149)
        at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
        at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFi
lter(FilterChainImpl.java:126)
        at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletF
ilterUtil.java:69)
        at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java
:630)
        at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImp
l.java:698)
        at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java
:417)
        at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_
005fportlet_jsp.java:1409)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

11:49:07,140 INFO  [PluginPackageUtil:1148] Reloading repositories