Replace an application-provided screen with a custom screen
You can replace an existing application-provided screen with a custom screen.
To replace an existing screen with the custom screen, do the following steps.
- Create a ExtnMetaData_custom.xml file.
For more information about the file contents, see the sample ExtnMetaData_custom.xml file.
- Save the file in the <INSTALL_DIR>/extensions/wsc/webpages folder.
- Restart the server.
Sample ExtnMetaData_custom.xml file
<Extensions>
<Identifier id="">
<UIExtns>
<UIExtn appScreen="wsc.home.portlets.CustomerPortlet"
extnScreen="extn.home.portlets.ExtnOrderPortlet" type="override"/>
<UIExtn appScreen="wsc.home.portlets.OrderPortlet"
extnScreen="extn.home.portlets.ExtnCustomerPortlet" type="override"/>
</UIExtns>
</Identifier>
<Identifier id="Matrix_Retail">
<UIExtns>
<UIExtn appScreen="wsc.home.portlets.OrderPortlet"
extnScreen="extn.Matrix_Retail.home.portlets.ExtnCustomerPortlet" type="override"/>
</UIExtns>
</Identifier>
</Extensions>The contents of the ExtnMetaData_custom.xml file
is described as follows:
Identifier- The root element that encloses the UI extension elements.id- Is the unique identifier for an extension. However, it is not mandatory.
- UIExtn
appScreen- Mandatory. Provide the fully qualified class name of the application-provided screen that you want to customize or replace. This attribute cannot be blank.extnScreen- Mandatory. Provide the fully qualified class name of the custom screen that you created and replaced with the application-provided screen. This attribute cannot be blank. For more information about creating custom screens, see Create custom screens.type- Mandatory. Set the value tooverrideto replace the application-provided screen with the custom screen.
Note:
- To replace a child screen, use
BehaviorControllerinstead ofInitController. To execute mashups ofBehaviorController, use theafterScreenInitevent subscribers. To display data on the screen, call thesetModelmethod for a screen. - Do not modify the contents of the ExtnMetaData.xml file, which is generated by the Extensibility Workbench.
- For a custom screen, you cannot apply extensions by using the Extensibility Workbench.
- For an application-provided screen, you can apply either differential or override extension, and not both.
- If the Order Summary or Return
Summary screens are replaced, the
OrderUtils.resetEditorOrderTotal(screen, model)method must be called after the screen is loaded to update theOrder.PriceInfo.TotalAmountin the editor input. - You cannot replace an application-provided screen with another application-provided screen.