Forums de discussion

ResourceResponseImpl incompatible with javax.portlet.ActionResponse

Chaminda Amarasinghe, modifié il y a 11 années.

ResourceResponseImpl incompatible with javax.portlet.ActionResponse

New Member Publications: 22 Date d'inscription: 16/12/12 Publications récentes
Hi Friends,

I am working on a hello world like jsf ipc, exactly same as Customer - Bookings sample. My environment is as bellow.

App Server : Webshpere 8,
Liferay : Liferay Portal Community Edition 6.1.1 CE GA2
JSF api and impl : 2.1.3-b02 (same as in sample)
Primefaces - 3.4 - In webshpere's shared library, but not in WEB-INF/lib,
In my portlet's WEB-INF/lib jsf-impl-2.1.3-b02

In my action listener I have following code

QName qName = new QName("http://my-comp.com/events", "ipc.customerSelected");
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
ActionResponse actionResponse = (ActionResponse) externalContext.getResponse();
Serializable eventPayload = selectedSupplierAU;


Issue is I am getting java.lang.ClassCastException: com.liferay.portlet.ResourceResponseImpl incompatible with javax.portlet.ActionResponse for ActionResponse actionResponse = (ActionResponse) externalContext.getResponse();

exactly like in here http://www.liferay.com/community/forums/-/message_boards/message/13290517 but I am not using icefaces.

I tried with JSF 2.1.10 but same issue.

What would be the wrong?
Thanks
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: ResourceResponseImpl incompatible with javax.portlet.ActionResponse

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
My best guess is that you are trying to submit the form using Ajax, rather than a full page (non Ajax) postback. I would recommend that you try using p:commandButton like this:

<p:commandbutton value="Non-Ajax Submit" actionListener="#{backingBean.doThisAndThat}" ajax="false" />
Chaminda Amarasinghe, modifié il y a 11 années.

RE: ResourceResponseImpl incompatible with javax.portlet.ActionResponse

New Member Publications: 22 Date d'inscription: 16/12/12 Publications récentes
Hi Neil,

Thank you very much for the response,

It worked without ajax, But it is nice if I could go with ajax emoticon. Actually I had achived non ajax thing with h:commandButton instead of p:commandButton, where h:commandButton has no defalt ajax behaviour.

Anyway many thanks again.

Regards,
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: ResourceResponseImpl incompatible with javax.portlet.ActionResponse

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Chaminda,

Glad to hear that it is working for you. Unfortunately the standard mechanisms for Portlet 2.0 IPC (Events and Public Render Parameters) only work with a full page postback. :-(

We've heard reports that folks have been able to get PrimePush to work for IPC. Perhaps that might be a good approach for your use-case.

Neil
Chaminda Amarasinghe, modifié il y a 11 années.

RE: ResourceResponseImpl incompatible with javax.portlet.ActionResponse

New Member Publications: 22 Date d'inscription: 16/12/12 Publications récentes
Thanks Neil,

I will try.

Regards,