Sun Java System Portal Server 7 Developer's Guide

Action process

The process action allows the named channel to process URL parameters and form data, typically that of the channel’s edit form. When the DesktopServlet receives a request where the action is process, to perform the process action, it takes the following URL parameters:

DesktopServletURL?action=process&provider=channelName

Or,

DesktopServletURL?action=process&provider=editContainer&targetprovider=channelName

DesktopServlet Legacy process Action


DesktopServletURL?action=process&provider=channelName

When the DesktopServlet receives a request where the action is process (see Action process), the DesktopServlet:

  1. Looks at the parameters to identify which provider will handle the action, through the provider’s processEdit() method.

    The processEdit() method is called to process the edit page generated from the getEdit() method. The request passed in contains the parameters.

  2. Re-directs to the URL returned from the provider’s processEdit() method.

    If there is an InvalidEditFormDataException, the DesktopServlet will redirect the browser back to the channel’s edit page and include a URL parameter error so that the channel may display the cause of the exception to the user. That is, the DesktopServlet will get the error message and generate a new request as follows.


    DesktopServletURL?action=edit&provider=channelName&error=errormessage
    
Figure 3–4 DesktopServlet Legacy process Action

This flowchart shows the DesktopServlet legacy process action.

DesktopServlet process Action


DesktopServletURL?action=process&provider=editContainer&targetprovider=channelName

In this URL, the provider parameter specifies the edit container for the container, and the targetprovider parameter is the leaf channel inside the container. When the DesktopServlet receives a request where the action is process (see Action process), the DesktopServlet:

  1. Determines whether the edit container is editable.

    If the edit container is not editable, an exception is thrown on the Desktop and control is returned to the web container. If the edit container is editable, it calls the edit container processEdit() method and determines the channel’s name from the request parameter.

  2. Once the channel name is determined, it determines whether the channel is editable.

    If the channel is not editable, it throws a provider exception. If the channel is determined to be editable, it calls the channel’s processEdit() method.

  3. Re-directs to the URL returned from the provider’s processEdit() method.

    If there is an InvalidEditFormDataException, the DesktopServlet will redirect the browser back to the channel’s edit page and include a URL parameter error so that the channel may display the cause of the exception to the user. That is, the DesktopServlet will get the error message and generate a new request as follows:


    DesktopServletURL?action=edit&provider=channelName&error=errormessage
    

    If there is no InvalidEditFormDataException, the DesktopServlet generates the new URL and returns control to the web container.

Figure 3–5 DesktopServlet process Action

This flowchart shows the DesktopServlet process action.