[jboss-dev-forums] [Design of JBoss Portal] - Re: processAction method not implemented
bjoernb
do-not-reply at jboss.com
Fri Mar 13 03:30:32 EDT 2009
hi tsentih,
thx for your post :) but that doesn't solve the problem. it just is another way to implement without the annotation :-/
here are again my 2 portlets
the sending
public class RestaurantSuche extends GenericPortlet {
@RenderMode(name="view")
public void viewNormal(RenderRequest request, RenderResponse response) throws PortletException, IOException {
getPortletContext().getRequestDispatcher("/jsp/RestaurantSuche.jsp").forward(request, response);
}
@ProcessEvent(qname="{http:sschmeckt.de/events}suchString")
public void processEvent1(EventRequest request, EventResponse response) throws PortletException, IOException {
String suchString = request.getParameter("suchString");
response.setEvent(new QName("http:sschmeckt.de/events", "suchString"), suchString);
}
}
and the receiving
public class RestaurantListe extends GenericPortlet {
@RenderMode(name="view")
public void viewNormal(RenderRequest request, RenderResponse response) throws PortletException, IOException {
getPortletContext().getRequestDispatcher("/jsp/RestaurantListe.jsp").forward(request, response);
}
/** This method processes received events with the following QName
*/
@ProcessEvent(qname="{http:sschmeckt.de/events}suchString")
public void processEvent1(EventRequest request, EventResponse response) throws PortletException, IOException {
// Let's store the event value into the portlet's session (we assume it is never null)
String eventValue = (String) request.getEvent().getValue();
request.getPortletSession().setAttribute("suchString", eventValue);
}
}
and my portlet.xml
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0">
<portlet-name>RestaurantSuche</portlet-name>
<portlet-class>
de.sschmeckt.RestaurantSuche
</portlet-class>
<mime-type>text/html</mime-type>
<portlet-info>
Suche des Restaurants
</portlet-info>
<supported-publishing-event>
<qname xmlns:x="http:sschmeckt.de/events">x:suchString
</supported-publishing-event>
<portlet-name>RestaurantListe</portlet-name>
<portlet-class>
de.sschmeckt.RestaurantListe
</portlet-class>
<mime-type>text/html</mime-type>
<portlet-info>
Auflistung aller gefundenen Restaurants
</portlet-info>
<supported-publishing-event>
<qname xmlns:x="http:sschmeckt.de/events">x:suchString
</supported-publishing-event>
<event-definition>
<qname xmlns:x="http:sschmeckt.de/events">x:suchString
<value-type>java.lang.String</value-type>
</event-definition>
</portlet-app>
and still when i compile and publish i see both portlets and the are working... but when i want to send by pushing a button on the sending portlet
Suche:
i still get the following error
ERROR
Cause: javax.portlet.PortletException: processAction method not implemented
Message: processAction method not implemented
StackTrace:
javax.portlet.PortletException: processAction method not implemented
at javax.portlet.GenericPortlet.processAction(GenericPortlet.java:177)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:557)
at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:109)
at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:72)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:97)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N6922078035659651697.invokeNext(TransactionInterceptor$invokeNotSupported_N6922078035659651697.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
[...]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
can someone help ?
thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217732#4217732
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217732
More information about the jboss-dev-forums
mailing list