I have a portlet with different modes. Form the default page (mode), there are 
links to the various modes. 
The default page is accessed through a navigation link. It works fine for all 
the modes. But when I refresh the page from the explorer, the default page 
shows up regardless of which mode I am in currently. But I want it to stay on 
the current mode and refresh that page only, while it goes back to the default 
page. This is because I have killed the session after it sets the template 
page. But if I dont kill the session, the Navigation link when clicked will 
link to  the current mode, while it should go to the default page.

Basically, I want the navigation link to bring the page back to default page, 
while I want the explorer REFRESH to refresh the current template mode only. 

My code looks like this. Has anyone ever faced situation like this. It's kinda 
tricky. How can I modify the doView to solve the problem? Any suggestions will 
be highly appreciated:
************************************************************
protected void doView(RenderRequest request, RenderResponse response) {
                String template = TEMPLATE_HOME;
                String mode1= (String) session.getAttribute(MODE1, 
PortletSession.PORTLET_SCOPE);
        
                if(mode1 != null && mode1.equalsIgnoreCase(PAGE1)) {
                        template = TEMPLATE_PAGE1;
                        session.removeAttribute(MODE1);
                }
                setTemplate(request, response, template);
        }

public void processAction(ActionRequest request, ActionResponse {
                String mode1 = request.getParameter(MODE1);
                if(mode1 != null && mode1.equalsIgnoreCase(MODE1)) {
                      request.getPortletSession().setAttribute(MODE1, PAGE1, 
PortletSession.PORTLET_SCOPE);
                }
        }
*************************************************************

Thanks
Sudarshan

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022736#4022736

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022736
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to