However, if you are trying to find a reference to a referenced/inherited Application Module via its Data Control before you've ever used any bindings on this Data Control, the programmatic approach will return a null reference.DCBindingContainer dcBindingContainer = (DCBindingContainer) getBindingContainer();DCDataControl dataControl = dcBindingContainer.findDataControl("DataControlName");ApplicationModule appMod = (ApplicationModule) dataControl.getDataProvider();// (where 'ApplicationModule' will be a specific ApplicationModule class of yours; i.e. 'CommonAM')
The solution is to drag and drop any sub-element from the given Data Control onto a page of yours and that will ensure that the needed BC4J configuration for the use of the Data Control will be added to the file: "DataBindings.cpx" (of course you can delete the created component on your page afterwards)
Here's an example BC4J config:
<BC4JDataControl id="CommonAMDataControl" Package="com.common.model.am"
SupportsFindMode="true" SupportsRangesize="true" SupportsResetState="true"
SupportsSortCollection="true" Configuration="CommonAMLocal" syncMode="Immediate"
Once this BC4J configuration has been added...your java code will lookup the bindings successfully.