Hi,
I am adding tabs as custom components.
tabs.addTab((Component) component.getComponent(), component.getName(), null);
LOG.debug("Resource url {} ", component.getResourceUrls());
The tabs get added succuesfully. But when it try to get the connecter id the exception occurs. Below is the implementattion of my getReourceUrls method
public ArrayList<String> getResourceUrls() {
LOG.debug("module 1 get resource urls");
final ArrayList<String> urls = new ArrayList<String>();
final Map<ClassResource, Image> resourceUrls = simpleUI.getResourceUrls();
LOG.debug("Resource url in module 1 {} ", resourceUrls);
for (final Map.Entry<ClassResource, Image> resourceUrl : resourceUrls.entrySet()) {
String url;
//LOG.debug("Resource url get value {}", resourceUrl.getValue());
final String protocol = simpleUI.getUI().getCurrent().getPage().getLocation().getScheme();
final String currentUrl = simpleUI.getUI().getCurrent().getPage().getLocation().getAuthority();
final String cid = resourceUrl.getValue().getConnectorId();
final Integer uiId = resourceUrl.getValue().getUI().getUIId();
final String filename = resourceUrl.getKey().getFilename();
url =
protocol + "://" + currentUrl + "/APP/connector/" + uiId + "/" + cid + "/source/" + filename;
urls.add(url);
}
and the exception happens on resourceUrl.getValue().getConnectorId() …
So, can someone explain about the adding of custom components when do they get initialized, added and attach …