Sun Java System Portal Server 7 Developer's Guide

DesktopServlet Legacy edit Action


DesktopServletURL?action=edit&provider=ChannelName

The flowchart in Action edit shows the various methods executed in the back end to process the edit action. When the client makes a request to edit the channel’s editable parameters, the DesktopServlet:

  1. Determines the provider responsible for generating the requested content.

    If provider is null, it uses the default channel name to get the provider. Last accessed channel is not assumed when action equals edit. Otherwise, the DesktopServlet gets the provider responsible specified in the URL.

  2. Once the provider is determined, the channel’s isEditable() method is invoked to determine if the channel is editable.

    The DesktopServlet gets the named channel’s isEditable property. If the channel is determined to be not editable, an exception is thrown on the Desktop. If the channel can be edited, the DesktopServlet also checks the editType for that channel.

    The editType is a channel property that can be retrieved via the Provider.getEditType() method. The provider’s getEditType() method is invoked to determine the type of edit page to return on the Desktop.

  3. If the channel’s edit type is:

    • EDIT_COMPLETE, the provider’s getEdit() method is invoked and the Edit page for the channel is returned on the Desktop.

    • EDIT_SUBSET, the edit container’s provider name will be detected (via the default Desktop Edit Container attribute), and then the edit container’s getEdit() method will be invoked. Also:

      The edit container’s provides a common look and feel of the edit page for all the channels that it contains. After it generates the markup for the common look and feel, it detects the channel name from the request parameter and determines whether the target channel is editable.

      If the target channel is not editable, it throws a provider exception. If the target channel is editable, it gets the channel’s edit type and delegates the process to the target channel’s getEdit() method.

    If the channel’s edit type is:

    • EDIT_COMPLETE, the Edit page is displayed.

    • EDIT_SUBSET, the edit container’s content is displayed and it wraps around the channel’s edit content.

Figure 3–2 DesktopServlet Legacy edit Action

This figure shows the DesktopServlet legacy edit action.