Package org.jboss.on.embedded.ui.nav

Examples of org.jboss.on.embedded.ui.nav.JONTreeNode


    // so we have to re-do the childMap in all cases
    public void changeExpandListener(org.richfaces.event.NodeExpandedEvent event)
    {
        UIComponent comp = event.getComponent();
        UITree tree = (UITree)comp;
        JONTreeNode jonTreeNode = (JONTreeNode)(tree.getTreeNode().getData());
        jonTreeNode.reInitializeChildrenMap();
    }
View Full Code Here


    @Observer(ResourceManager.RESOURCE_CREATED_EVENT)
    public void updateNavWithNewResource(ResourceType typeOfNewResource, Resource parentResource)
    {
        log.trace("Resource of type [" + typeOfNewResource + "] added beneath Resource [" + parentResource
                + "] - updating nav tree...");
        JONTreeNode parentResourceNode = findNode(getResourcePath(parentResource));
        JONTreeNode resourceTypeNode = findNodeByResourceTypeAndParent(typeOfNewResource, parentResourceNode);
        if (resourceTypeNode == null)
        {
            // the resource type node doesn't exist yet, so lets refresh its parent to give it a chance
            // to be generated. This would be the case for non-singleton resource types which started off
            // with no children and can't have resource added directly to them, e.g. Embedded EJB deployments.
            parentResourceNode.reInitializeChildrenMap();
        }
        else
        {
            resourceTypeNode.reInitializeChildrenMap();
        }

    }
View Full Code Here

    @Observer(ResourceManager.RESOURCE_DELETED_EVENT)
    public void updateNavWithDeletedResource(Resource deletedResource)
    {
        log.trace("Resource [" + deletedResource + "] deleted - updating nav tree...");
        JONTreeNode node = findNode(getResourcePath(deletedResource));
        if (node == null)
        {
            log.warn("Unable to find node for deleted resource [" + deletedResource + "].");
            return;
        }
        JONTreeNode parentNode = node.getParent();
        parentNode.reInitializeChildrenMap();
    }
View Full Code Here

     * @return an outcome indicating which summary page to display.
     */
    public String view()
    {
        // TODO could consider renaming this getCurrentNavigationNode()
        JONTreeNode selectedNode = navigationAction.getSelectedNode();
        return selectedNode.getSummaryActionOutcome(this).getOutcome();
    }
View Full Code Here

    public String getResourceTypePath(String resourceTypeName)
    {
        // TODO double check if this is still a problem
        //need to put breakpoint here to work out why categorySummary paging is not working properly
        //i.e. it renders the first page and the second page but not the third page
        JONTreeNode treeNode = ((BaseTreeNode)navigationAction.getRootNode()).findNodeByTypeName(resourceTypeName);
        return treeNode.getPath();
    }
View Full Code Here

            resourceTypeFilter =
                    resourceTypeFilter.substring(resourceTypeFilter.lastIndexOf("/") + 1,
                            resourceTypeFilter.length());

            JONTreeNode selectedNode = navigationAction.getSelectedNode();
            if (selectedNode instanceof SubCategoryTreeNode)
            {
                SubCategoryTreeNode subCatTreeNode = (SubCategoryTreeNode)selectedNode;
                addResourcesToList("", subCatTreeNode);
                this.subCategory = subCatTreeNode;
View Full Code Here

            {
                SummaryAction.this.facesMessages.add(FacesMessage.SEVERITY_WARN,
                        "#0 '#1' no longer exists.", this.resource.getResourceType().getName(),
                        this.resource.getName());
                // Reset the current node to the stale Resource node's parent node.
                JONTreeNode parentNode = SummaryAction.this.navigationAction.getSelectedNode().getParent();
                SummaryAction.this.navigationAction.setCurrentPath(parentNode.getPath());
                // And refresh the parent node's children to remove the stale Resource node.
                parentNode.reInitializeChildrenMap();
                return FacesOutcomes.ERROR;
            }
            setResourceAndSummaryInfo(this.resource);
            return FacesOutcomes.RESOURCE_INSTANCE;
        }
View Full Code Here

    @Begin(join = true)
    public String init()
    {
        log.debug("Initializing updateBackingContentAction Seam component...");
        JONTreeNode selectedNode = this.navigationAction.getSelectedNode();
        ResourceTreeNode resourceTreeNode = (ResourceTreeNode)selectedNode;
        this.resource = resourceTreeNode.getResource();
        log.debug("Current Resource is " + this.resource);
        this.resourceType = this.resource.getResourceType();
View Full Code Here

    private PackageType packageType;

    @Begin(join = true)
    public String init()
    {
        JONTreeNode selectedNode = this.navigationAction.getSelectedNode();
        ResourceTypeTreeNode resourceTypeTreeNode = (ResourceTypeTreeNode)selectedNode;
        this.resourceType = resourceTypeTreeNode.getResourceType();

        this.packageType = ContentUtility.getCreationPackageType(this.resourceType);
        if (this.packageType == null)
View Full Code Here

        ResourcePackageDetails detail = new ResourcePackageDetails(key);
        detail.setDeploymentTimeConfiguration(this.configuration);

        Configuration pluginConfiguration = null;

        JONTreeNode currentNode = navigationAction.getSelectedNode();
        Resource ancestorResource = currentNode.getClosestResource();

        final String resourceName = getFileName();
        CreateResourceResponse createResourceResponse = this.resourceManager.createResource(resourceName,
                this.resourceType, ancestorResource, pluginConfiguration, detail);
        switch (createResourceResponse.getStatus())
View Full Code Here

TOP

Related Classes of org.jboss.on.embedded.ui.nav.JONTreeNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.