views:

1486

answers:

2

Hi,

I am working with struts2 portlet sample and deployed in liferay portel using liferay server. It is working fine. But now I am trying to validate my form even that working perfectly for first time. But after first attempt when form is submitted with desired values it is not proceedin further and not recogonizing the desired action too.

Can anybody helm me in this issue.

Thanks in advance

A: 

We have the same setup and have had numerous problems with making struts 2 work nicely with the portlet api. We had the same problem as you early on. Are you using the bridge provided with the struts 2 distribution?

One thing that doesn't work with the bridge is chained actions - you can't have an action that redirects to another action. We did som coding of our own to solve it where the action classes figures out which action that is next. (Our application is a step-by-step guide where steps are included or not dependings on what you have entered previously.)

A: 

You might put some break points in PortletStateInterceptor and verify that your action state is getting save and then restored. Note that in portlets there is an action phase and a render phase and if you find the DirectRenderRequest action on the top of the stack instead of yours then you're probably not saving the valuestack state during the action phase.

rado