Developing an Alternate Editing User Interface
This topic explains how the Regulatory Submission Processor Interface provides the ability to customize the edit user interface for regulatory submissions and register delegates. This interface gives you the option to open either the Windchill edit user interface or an alternate edit user interface. Depending on the configuration of regulatory submission processor delegates defined for each regulatory submission type or subtype, edit actions are enabled on the regulatory submission information page, regulatory submission table row actions, and task form template actions. If a delegate is not defined, the action validator for the Windchill edit action renders the Windchill edit action. If a delegate is defined, the edit user interface action is rendered based on the result of the enableCustomEditAction() method. If enableCustomEditAction() returns true, then the action for the Windchill edit user interface is hidden, and the custom edit action is rendered based on the result of the createCustomEditUrl (RegulatorySubmission regulatorySubmission) method. If the enableCustomEditAction () returns false, the Windchill edit action is rendered.
To render an alternate edit user interface, the non-Windchill action opens a spring controller that calls the associated delegate. This delegate returns a URL to the controller that is used to open the alternate edit user interface. If no custom class is defined or registered for a regulatory submission type, then the Windchill edit user interface is rendered.
Solution
Create a custom class that extends an out-of-the-box regulatory submission edit user interface.
Create an xconf entry to register your custom class.
Solution Elements
The next table describes the various solution elements.
Element
Type
Description
enableCustomEditAction ()
API
Used to configure the edit action for Regulatory Submissions. By default, the implementation returns false. If a custom edit URL has been configured by overriding the createCustomEditUrl (RegulatorySubmission regulatorySubmission) method, then override this method to return true. When a custom edit action is enabled, the Windchill edit action is disabled, and the custom URL opens.
createCustomEditUrl (RegulatorySubmission regulatorySubmission)
API
Used to configure a custom edit URL that is used by the custom edit action for Regulatory Submissions. By default, the implementation returns null. Override this method to return the custom edit URL which will be used for editing a Regulatory Submission. If the enableCustomEditAction () method is configured to return true, and createCustomEditUrl (RegulatorySubmission regulatorySubmission) method is not configured, an error is displayed.
Default Behavior
By default, the Windchill edit action is enabled for regulatory submissions.
Creating Custom Classes
To customize the edit user interface when editing a non-revisable or revisable regulatory submission, create a Java class that extends the SimpleRegulatorySubmissionProcessor or the appropriate revisable subtype populators, such as, AERSubmissionProcessor, ERSubmissionProcessor, RPSSubmissionProcessor, or UDISubmissionProcessor and override the enableCustomEditAction and createCustomEditUrl methods. The example of a new custom class with the minimum requirements of the overridden createCustomEditUrl method is given below:
public class CustomRPSSubmissionProcessor extends RPSSubmissionProcessor {
@Override
public boolean enableCustomEditAction() {
// Returning True will enable the Custom Edit Action and redirect the UI to the URL returned by the
// createCustomEditUrl method
return true;
}


@Override
public String createCustomEditUrl(RegulatorySubmission regulatorySubmission) {
// Compose the URL to be used for redirecting the UI
String redirectString = "http://customerdomain.com/customApp/";
return redirectString;
}
}
War dies hilfreich?