* Get the elements visible for a given context. These are the base elements plus the workspace, section and panel
* elements. But hierarchy applies: Panel elements may hide section ones, workspace ones and global ones.
* Assume current workspace, section and panel.
*/
public GraphicElement[] getAvailableElements() {
Workspace workspace = NavigationManager.lookup().getCurrentWorkspace();
Section section = NavigationManager.lookup().getCurrentSection();
RequestContext reqCtx = RequestContext.getCurrentContext();
Long idPanel = null;
Panel panel = (Panel) reqCtx.getRequest().getRequestObject().getAttribute(Parameters.RENDER_PANEL);
if (panel != null && section != null) {
idPanel = panel.getPanelId();
if (getElementScopeDescriptor().isAllowedInstance()) {
idPanel = panel.getInstanceId();
}
}
return getAvailableElements(workspace == null ? null : workspace.getId(), section == null ? null : section.getId(), panel == null ? null : idPanel);
}