Fórumok

Portlet struts 2 et configuration-action-class

Frédéric Ederf, módosítva 14 év-val korábban

Portlet struts 2 et configuration-action-class

New Member Bejegyzések: 2 Csatlakozás dátuma: 2010.02.12. Legújabb bejegyzések
Hello,

I'm developing a Struts 2 Portlet and I would like to add a tab configuration.

The only solution I found is : indicate in liferay-portlet.xml the configuration action class with "<configuration-action-class>" but i can't indicate a Struts 2 Action Class because the action must extends from BaseConfigurationAction or PortletAction.

Do you have an idea?

Thx lot.
Frédéric Ederf, módosítva 14 év-val korábban

RE: Portlet struts 2 et configuration-action-class

New Member Bejegyzések: 2 Csatlakozás dátuma: 2010.02.12. Legújabb bejegyzések
Help please ;)
Haroun Bella, módosítva 13 év-val korábban

RE: Portlet struts 2 et configuration-action-class

New Member Bejegyzések: 10 Csatlakozás dátuma: 2010.03.30. Legújabb bejegyzések
Hello,
do you find a way to do that?
I have the same problem

thanks

haroun
Nicholas Tenczar, módosítva 13 év-val korábban

RE: Portlet struts 2 et configuration-action-class

Junior Member Bejegyzések: 53 Csatlakozás dátuma: 2010.07.15. Legújabb bejegyzések
You can't use a Struts2 action class for your configuration tab. Liferay handles the execution of the configuration action and so as long as you give it a class that extends BaseConfigurationAction or PortletAction it will run. You don't have to worry about struts configuration for the configuration tab, liferay takes care of that for you as well.

In short, it doesn't matter that you are building a Struts2 portlet. This does not mean that you can not use Struts2. It only means that the configuration action will be handled by Liferay and you need only implement your logic within a class that extends PortletAction or BaseConfigurationAction.
Haroun Bella, módosítva 13 év-val korábban

RE: Portlet struts 2 et configuration-action-class

New Member Bejegyzések: 10 Csatlakozás dátuma: 2010.03.30. Legújabb bejegyzések
Thank you for the reply.

When I try to run I get an error.

17:35:02,109 ERROR [IncludeTag:165] org.apache.jasper.JasperException: /edit_con
figuration.jsp(1,1) Tag &lt;%@ taglib non terminᅴ
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorH
andler.java:40)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.j
ava:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.j
ava:132)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:522)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
at org.apache.jasper.compiler.Parser.parse(Parser.java:138)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.
java:216)

liferay call my class but i have an error with jsp :


&lt;%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %&gt;
&lt;%@ taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %&gt;
&lt;%@ page import="com.liferay.portal.kernel.util.Constants" %&gt;

<portlet:defineobjects />

<form action="<liferay-portlet:actionURL portletConfiguration=" true">" method="post" name="<portlet:namespace />fm"&gt;
    <input name="<portlet:namespace /><%=Constants.CMD%>" type="hidden" value="<%=Constants.UPDATE%>">

    Type:  <select name="<portlet:namespace />type">
                    <option value="casual">Casual</option>
                    <option value="formal">Formal</option>
                 </select>
    <br>
    <input type="button" value="Save" onClick="submitForm(document.<portlet:namespace />fm);">
</form> 


thank you for your help

Haroun
Haroun Bella, módosítva 13 év-val korábban

RE: Portlet struts 2 et configuration-action-class

New Member Bejegyzések: 10 Csatlakozás dátuma: 2010.03.30. Legújabb bejegyzések
Hello,

You are right that's work.

I can't what i change excatly. but the is not from my jsp.

Thanks for your help