• No replies
30895 Posts

Pinned topic Error While Adding a portlet to a dynamic Page.

‏2012-02-24T21:48:38Z |
Hello Every One,

I need help in understanding of lifecyle of a newly added portlet in a dynamic page.

I have a Page A to which I created an extension node. There is a page B with pre-alloted portlets assigned to it.
On Click of a button on Page, I am adding a new instance of page B successfully and passing the needed values from Page A to Page B successfully using Portlet context preferences and processing it in portlets using .

Now In the same way, when I am trying to add a new portlet Y to the newly created page B from from a portlet X in same page B,

Portlets gets added to page using API, but it doesn't get the values,

In the system log I get an error, java.lang.ClassCastException: incompatible with javax.portlet.ActionResponse

which means portlet is going into render phase, without going into action Phase.
But according to Dynamic UI API , What I learnt is a portlet should be in Action Phase to retrieve Page/Portlet properties.

Can Anyone help me where I am going wrong.

After calling addPortlet method, I am redirecting to the portlet Y with a request with newly updated properties.

Thanks Everyone.