Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dariusz Sawicki
how to add tab at configuration portlet
May 5, 2009 5:18 AM
Answer

Dariusz Sawicki

Rank: Regular Member

Posts: 164

Join Date: March 27, 2009

Recent Posts

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.
Samuel Kong
RE: how to add tab at configuration portlet
May 5, 2009 9:54 AM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1483

Join Date: March 10, 2008

Recent Posts

Dariusz Sawicki
RE: how to add tab at configuration portlet
May 6, 2009 8:02 AM
Answer

Dariusz Sawicki

Rank: Regular Member

Posts: 164

Join Date: March 27, 2009

Recent Posts

hi all
don't work me.
it's my files
liferay-portelt-ext.xml:
1
2    <portlet>
3    <portlet-name>EXT_1</portlet-name>
4    <struts-path>ext/reports</struts-path>
5    <configuration-action-class>com.ext.portlet.reports.action.EditConfigurationAction</configuration-action-class>
6    </portlet>


stratus-config.xml:
1
2<action path="/ext/reports/edit_configuration" type="com.ext.portlet.reports.action.EditConfigurationAction">
3    <forward name="portlet.ext.reports.edit_configuration" path="portlet.ext.reports.edit_configuration" />
4 
5  </action>


tiles-defs.xml:
1
2 <definition name="portlet.ext.reports.edit_configuration" extends="portlet.portlet_configuration.edit_configuration">
3    <put name="portlet_configuration_content" value="/portlet/ext/reports/edit_configuration.jsp" />
4  </definition>


portlet-ext.xml:
1
2..
3<portlet-name>EXT_1</portlet-name>
4        <display-name>Reports</display-name>
5        <portlet-class>com.ext.portlet.reports.ReportsPortlet</portlet-class>
6         <configuration-action-class>com.ext.portlet.reports.action.EditConfigurationAction</configuration-action-class>
7..


EditConfigurationAction.java :
 1
 2package com.ext.portlet.reports.action;
 3
 4import com.liferay.portal.struts.PortletAction;
 5import com.liferay.portal.kernel.util.Constants;
 6
 7import java.util.ArrayList;
 8import java.util.List;
 9
10import javax.portlet.PortletConfig;
11import javax.portlet.RenderRequest;
12import javax.portlet.RenderResponse;
13import javax.portlet.WindowState;
14
15import javax.servlet.jsp.PageContext;
16
17import org.apache.struts.action.ActionForm;
18import org.apache.struts.action.ActionForward;
19import org.apache.struts.action.ActionMapping;
20
21
22public class EditConfigurationAction{
23
24public ActionForward render(
25      ActionMapping mapping, ActionForm form, PortletConfig config,
26      RenderRequest req, RenderResponse res)
27    throws Exception {
28   return mapping.findForward("portlet.ext.reports.edit_configuration");
29  }
30
31}


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

Thanks
Dariusz Sawicki
RE: how to add tab at configuration portlet
May 20, 2009 4:41 AM
Answer

Dariusz Sawicki

Rank: Regular Member

Posts: 164

Join Date: March 27, 2009

Recent Posts

anybody can give me solution or sample code.

thanks.
Dariusz Sawicki
RE: how to add tab at configuration portlet
May 21, 2009 5:22 AM
Answer

Dariusz Sawicki

Rank: Regular Member

Posts: 164

Join Date: March 27, 2009

Recent Posts

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



 11:48:27,546 INFO  [PluginPackageUtil:1342] Checking for available updates
 2123
 311:48:30,390 INFO  [PluginPackageUtil:1386] Finished checking for available upda
 4tes in 2844 ms
 511:48:35,031 ERROR [jsp:165] java.lang.ClassCastException: com.ext.portlet.repor
 6ts.action.EditConfigurationAction
 7        at com.liferay.portal.model.impl.PortletImpl.getConfigurationActionInsta
 8nce(PortletImpl.java:490)
 9        at com.liferay.portlet.portletconfiguration.action.EditConfigurationActi
10on.getConfigurationAction(EditConfigurationAction.java:138)
11        at com.liferay.portlet.portletconfiguration.action.EditConfigurationActi
12on.render(EditConfigurationAction.java:111)
13        at com.liferay.portal.struts.PortletAction.execute(PortletAction.java:11
144)
15        at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
16tProcessor.java:431)
17        at com.liferay.portal.struts.PortletRequestProcessor.processActionPerfor
18m(PortletRequestProcessor.java:334)
19        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
20va:236)
21        at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequ
22estProcessor.java:235)
23        at com.liferay.portlet.StrutsPortlet.include(StrutsPortlet.java:261)
24        at com.liferay.portlet.StrutsPortlet.doView(StrutsPortlet.java:156)
25        at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPo
26rtlet.java:149)
27        at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
28        at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFi
29lter(FilterChainImpl.java:126)
30        at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletF
31ilterUtil.java:69)
32        at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java
33:630)
34        at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImp
35l.java:698)
36        at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java
37:417)
38        at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_
39005fportlet_jsp.java:1409)
40        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
41        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
42
4311:49:07,140 INFO  [PluginPackageUtil:1148] Reloading repositories
Attachments: ext-impl.zip (77.5k)