docroot/WEB-INF/src/it/infn/ct/g_hmmer_portlet.java
@Override
    protected void doView(RenderRequest request, RenderResponse response) 
    throws PortletException, IOException 
    {
        _log.info("calling doView ...");    
        response.setContentType("text/html");
        
        // Get current preference values
        getPreferences(null,request);
        gridOperationId=Integer.parseInt(appPreferences.getGridOperationId());
        _log.info("GridOperationId: '"+gridOperationId+"'");
        // currentView comes from the processAction; unless such method
        // is not called before (example: page shown with no user action)
        // In case the application is not yet register (gridOperationId<0)
        // the VIEW_INITIALIZE pane will be enforced otherwise the
        // VIEW_INPUT will be selected as default view
        String currentView=request.getParameter("PortletStatus");
        if(currentView==null) currentView="VIEW_INPUT";
        if(gridOperationId<0) currentView="VIEW_ACTIVATE";                
        
        // Different actions will be performed accordingly to the
        // different possible view modes
        switch(Views.valueOf(currentView)) {
            // The following code is responsible to call the proper jsp file
            // that will provide the correct portlet interface
            case VIEW_ACTIVATE: {
                _log.info("VIEW_ACTIVATE Selected ...");      
            }
            break;
            case VIEW_INPUT: {
                _log.info("VIEW_INPUT Selected ...");
                PortletRequestDispatcher dispatcher=getPortletContext().getRequestDispatcher("/input.jsp");
                dispatcher.include(request, response);
            }
            break; 
            case VIEW_PILOT: {
                _log.info("VIEW_PILOT Selected ...");
                String pilotScript = request.getParameter("pilotScript");
                request.setAttribute("pilotScript", pilotScript);
                PortletRequestDispatcher dispatcher=getPortletContext().getRequestDispatcher("/viewPilot.jsp");
                dispatcher.include(request, response);
            }
            break;
            case VIEW_SUBMIT: {
                _log.info("VIEW_SUBMIT Selected ...");    
                String jobIdentifier = request.getParameter("jobIdentifier");
                request.setAttribute("jobIdentifier", jobIdentifier);                                                    
                PortletRequestDispatcher dispatcher=getPortletContext().getRequestDispatcher("/submit.jsp");
                dispatcher.include(request, response);
            }
            break;
            default:
                _log.info("Unknown view mode: "+currentView.toString());
        } // switch            
    }
/**
     * This method is responsible to assign the correct Application view
     * the view mode is taken from the renderRequest instance by the PortletStatus patameter
     * or automatically assigned accordingly to the Application status/default view mode
     * 
     * @param request RenderRequest instance normally sent by the processAction
     * @param response RenderResponse used to send values to the jsp page
     * 
     * @throws PortletException
     * @throws IOException 
     */
This method is responsible to assign the correct Application view
the view mode is taken from the renderRequest instance by the PortletStatus patameter
or automatically assigned accordingly to the Application status/default view mode

@param request RenderRequest instance normally sent by the processAction
@param response RenderResponse used to send values to the jsp page


This method is responsible to assign the correct Application view the view mode is taken from the renderRequest instance by the PortletStatus patameter or automatically assigned accordingly to the Application status / default view mode @param request RenderRequest instance normally sent by the processAction @param response RenderResponse used to send values to the jsp page
@Override
    protected void doView(RenderRequest request, RenderResponse response) 
    throws PortletException, IOException 
    {
        _log.info("calling doView ...");    
        response.setContentType("text/html");
        getPreferences(null,request);
        gridOperationId=Integer.parseInt(appPreferences.getGridOperationId());
        _log.info("GridOperationId: '"+gridOperationId+"'");
        String currentView=request.getParameter("PortletStatus");
        if(currentView==null) currentView="VIEW_INPUT";
        if(gridOperationId<0) currentView="VIEW_ACTIVATE";                
        switch(Views.valueOf(currentView)) {
            case VIEW_ACTIVATE: {
                _log.info("VIEW_ACTIVATE Selected ...");      
            }
            break;
            case VIEW_INPUT: {
                _log.info("VIEW_INPUT Selected ...");
                PortletRequestDispatcher dispatcher=getPortletContext().getRequestDispatcher("/input.jsp");
                dispatcher.include(request, response);
            }
            break; 
            case VIEW_PILOT: {
                _log.info("VIEW_PILOT Selected ...");
                String pilotScript = request.getParameter("pilotScript");
                request.setAttribute("pilotScript", pilotScript);
                PortletRequestDispatcher dispatcher=getPortletContext().getRequestDispatcher("/viewPilot.jsp");
                dispatcher.include(request, response);
            }
            break;
            case VIEW_SUBMIT: {
                _log.info("VIEW_SUBMIT Selected ...");    
                String jobIdentifier = request.getParameter("jobIdentifier");
                request.setAttribute("jobIdentifier", jobIdentifier);                                                    
                PortletRequestDispatcher dispatcher=getPortletContext().getRequestDispatcher("/submit.jsp");
                dispatcher.include(request, response);
            }
            break;
            default:
                _log.info("Unknown view mode: "+currentView.toString());
        } 
    }
@ Override protected void doView ( RenderRequest request , RenderResponse response ) throws PortletException , IOException { _log . info ( "calling doView ..." ) ; response . setContentType ( "text/html" ) ; getPreferences ( null , request ) ; gridOperationId = Integer . parseInt ( appPreferences . getGridOperationId ( ) ) ; _log . info ( "GridOperationId: '" + gridOperationId + "'" ) ; String currentView = request . getParameter ( "PortletStatus" ) ; if ( currentView == null ) currentView = "VIEW_INPUT" ; if ( gridOperationId < 0 ) currentView = "VIEW_ACTIVATE" ; switch ( Views . valueOf ( currentView ) ) { case VIEW_ACTIVATE : { _log . info ( "VIEW_ACTIVATE Selected ..." ) ; } break ; case VIEW_INPUT : { _log . info ( "VIEW_INPUT Selected ..." ) ; PortletRequestDispatcher dispatcher = getPortletContext ( ) . getRequestDispatcher ( "/input.jsp" ) ; dispatcher . include ( request , response ) ; } break ; case VIEW_PILOT : { _log . info ( "VIEW_PILOT Selected ..." ) ; String pilotScript = request . getParameter ( "pilotScript" ) ; request . setAttribute ( "pilotScript" , pilotScript ) ; PortletRequestDispatcher dispatcher = getPortletContext ( ) . getRequestDispatcher ( "/viewPilot.jsp" ) ; dispatcher . include ( request , response ) ; } break ; case VIEW_SUBMIT : { _log . info ( "VIEW_SUBMIT Selected ..." ) ; String jobIdentifier = request . getParameter ( "jobIdentifier" ) ; request . setAttribute ( "jobIdentifier" , jobIdentifier ) ; PortletRequestDispatcher dispatcher = getPortletContext ( ) . getRequestDispatcher ( "/submit.jsp" ) ; dispatcher . include ( request , response ) ; } break ; default : _log . info ( "Unknown view mode: " + currentView . toString ( ) ) ; } }
This method is responsible to assign the correct Application view
 the view mode is taken from the renderRequest instance by the PortletStatus patameter
 or automatically assigned accordingly to the Application status/default view mode
This method is responsible to assign the correct Application view the view mode is taken from the renderRequest instance by the PortletStatus patameter or automatically assigned accordingly to the Application status / default view mode
// Get current preference values // currentView comes from the processAction; unless such method // is not called before (example: page shown with no user action) // In case the application is not yet register (gridOperationId<0) // the VIEW_INITIALIZE pane will be enforced otherwise the // VIEW_INPUT will be selected as default view // Different actions will be performed accordingly to the // different possible view modes // The following code is responsible to call the proper jsp file // that will provide the correct portlet interface // switch            