Oracle Waveset 8.1.1 Deployment Guide

User View

The UserViewConstants.java file defines the following options to support optimistic checkouts. These can be set as view options when the User View is checked out in the same manner as existing view options.

The following example enables optimistic checkout in a JSP (such as account/modify.jsp):

try {
    String id = requestState.getParameter(requestState, "id");
     if (id == null) {
         form.setTitle(Messages.UI_ACCT_CRT_USR_TITLE);
         form.setViewId("User");
     }
     else {
         form.setTitle(Messages.UI_ACCT_EDIT_USR_TITLE);
         form.setViewId("User:" + id);
  	      // Set this option so that checkin of the view
 	      // won't launch a reprovision.  This does however mean that the user
 	      // changes will be stored.  Need to be able to defer this.
 	      // 	requestState.setOption(UserViewConstants.OP_NO_REPROVISION, "true");

  	      requestState.setOption(UserViewConstants.OP_SELECT_RESOURCES, "true");

 	      // Enable Optimistic Checkout
 	      requestState.setOption(UserViewConstants.OP_OPTIMISTIC, "true");

          // Set this options to true to build the
          // "Forwarding Approvers" select list         
          req.setOption(UserViewConstants.OP_BUILD_APPROVER_LISTS, "true");
     }