Package org.apache.myfaces.tobago.example.demo

Examples of org.apache.myfaces.tobago.example.demo.Navigation$Node


  }

  public String navigateAction() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    VariableResolver resolver = facesContext.getApplication().getVariableResolver();
    Navigation navigation = (Navigation) resolver.resolveVariable(facesContext, "navigation");

    // in case of both the select controll is not proccessed during lifecycle
    // we need to get the value from the request params
    navigateAction = (String) facesContext.getExternalContext().getRequestParameterMap().get("page:content:navSelect");

    LOG.info("navigateAction = \"" + navigateAction + "\"");
    if (navigateAction == null) {
      return logAndNavigate(null);
    } else if ("parent".equals(navigateAction)) {
      navigateAction = null;
      AjaxUtils.addAjaxComponent(facesContext, "page:content:parent");
      return logAndNavigate(null);
    } else if ("both".equals(navigateAction)) {
      AjaxUtils.addAjaxComponent(facesContext, "page:content:left");
      AjaxUtils.addAjaxComponent(facesContext, "page:content:right");
      navigateAction = null;
      return logAndNavigate(null);
    } else if ("prev".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoPrevious());
    } else if ("next".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoNext());
    }
    return logAndNavigate(null);
  }
View Full Code Here


  }

  public String navigateAction() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    VariableResolver resolver = facesContext.getApplication().getVariableResolver();
    Navigation navigation = (Navigation) resolver.resolveVariable(facesContext, "navigation");
    LOG.info("navigateAction = \"" + navigateAction + "\"");
    if (navigateAction == null) {
      return logAndNavigate(null);
    } else if ("both".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(null);
    } else if ("prev".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoPrevious());
    } else if ("next".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoNext());
    }
    return logAndNavigate(null);
  }
View Full Code Here

  }

  public String navigateAction() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    VariableResolver resolver = facesContext.getApplication().getVariableResolver();
    Navigation navigation = (Navigation) resolver.resolveVariable(facesContext, "navigation");

    // in case of both the select control is not processed during lifecycle
    // we need to get the value from the request params
    navigateAction = (String) facesContext.getExternalContext().getRequestParameterMap().get("page:content:navSelect");

    LOG.info("navigateAction = \"" + navigateAction + "\"");
    if (navigateAction == null) {
      return logAndNavigate(null);
    } else if ("parent".equals(navigateAction)) {
      navigateAction = null;
      AjaxUtils.addAjaxComponent(facesContext, "page:content:parent");
      return logAndNavigate(null);
    } else if ("both".equals(navigateAction)) {
      AjaxUtils.addAjaxComponent(facesContext, "page:content:left");
      AjaxUtils.addAjaxComponent(facesContext, "page:content:right");
      navigateAction = null;
      return logAndNavigate(null);
    } else if ("prev".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoPrevious());
    } else if ("next".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoNext());
    }
    return logAndNavigate(null);
  }
View Full Code Here

  }

  public String navigateAction() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    VariableResolver resolver = facesContext.getApplication().getVariableResolver();
    Navigation navigation = (Navigation) resolver.resolveVariable(facesContext, "navigation");

    // in case of both the select controll is not proccessed during lifecycle
    // we need to get the value from the request params
    navigateAction = (String) facesContext.getExternalContext().getRequestParameterMap().get("page:navSelect");

    LOG.info("navigateAction = \"" + navigateAction + "\"");
    if (navigateAction == null) {
      return logAndNavigate(null);
    } else if ("parent".equals(navigateAction)) {
      navigateAction = null;
      AjaxUtils.addAjaxComponent(facesContext, "page:parent");
      return logAndNavigate(null);
    } else if ("both".equals(navigateAction)) {
      AjaxUtils.addAjaxComponent(facesContext, "page:left");
      AjaxUtils.addAjaxComponent(facesContext, "page:right");
      navigateAction = null;
      return logAndNavigate(null);
    } else if ("prev".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoPrevious());
    } else if ("next".equals(navigateAction)) {
      navigateAction = null;
      return logAndNavigate(navigation.gotoNext());
    }
    return logAndNavigate(null);
  }
View Full Code Here

                if (domainURI.equals(node.getDomainName())) {
                    currentDomain = node.getDomainName();
                    return true;
                }
            }
            Node node = factory.createNode(domainURI);
            currentDomain = node.getDomainName();
            nodes.put(currentDomain, node);
        }
        return true;
    }
View Full Code Here

        }
        return true;
    }

    boolean load(final String configXmlUrl) throws ContributionReadException, ActivationException, ValidationException {
        Node node = factory.createNodeFromXML(configXmlUrl);
        currentDomain = node.getDomainName();
        nodes.put(currentDomain, node);
        return true;
    }
View Full Code Here

            getNode().removeFromDomainLevelComposite(curi, toks.get(2));
        } else {
            if (standaloneNodes.containsKey(curi)) {
                standaloneNodes.remove(curi).stop();
            } else if (nodes.containsKey(curi)) {
                Node n = nodes.remove(curi);
                n.stop();
                if (n.getDomainName().equals(currentDomain)) {
                    currentDomain = "";
                }
            } else {
                for (String compositeURI : getNode().getDeployedComposites(curi)) {
                    getNode().removeFromDomainLevelComposite(curi, compositeURI);
View Full Code Here

        return true;
    }

    boolean start(String nodeName, String compositeURI, String contributionURL, String... dependentContributionURLs)
        throws ActivationException, ValidationException {
        Node node = NodeFactory.newStandaloneNode(compositeURI, contributionURL, dependentContributionURLs);
        standaloneNodes.put(nodeName, node);
        return true;
    }
View Full Code Here

    boolean status(final List<String> toks) {
        if (standaloneNodes.size() > 0) {
            out.println("Standalone Nodes:");
            for (String nodeName : standaloneNodes.keySet()) {
                Node node = standaloneNodes.get(nodeName);
                for (String curi : node.getInstalledContributions()) {
                    for (String dc : node.getDeployedComposites(curi)) {
                        out.println("   " + nodeName + " " + dc);
                    }
                }
            }
            out.println();
        }
        if (nodes.size() > 0) {
            for (Node node : nodes.values()) {
                out.println("Domain: " + node.getDomainName());
                List<String> ics;
                if (toks.size() > 1) {
                    ics = new ArrayList<String>();
                    ics.add(toks.get(1));
                } else {
                    ics = node.getInstalledContributions();
                }

                for (String curi : ics) {
                    Contribution c = node.getInstalledContribution(curi);
                    List<String> dcs = node.getDeployedComposites(curi);
                    if (toks.size() > 2) {
                        dcs = new ArrayList<String>();
                        dcs.add(toks.get(2));
                    } else {
                        dcs = node.getDeployedComposites(curi);
                    }
                    for (String compositeUri : dcs) {
                        for (Artifact a : c.getArtifacts()) {
                            if (compositeUri.equals(a.getURI())) {
                                out.println("   " + curi
View Full Code Here

    for (Way way : waysById.values()) {
     
      List<WayNode> origWayNodes = way.getWayNodes();
      List<OSMNode> wayNodes = new ArrayList<OSMNode>(origWayNodes.size());
      for (WayNode origWayNode : origWayNodes) {
        Node origNode = nodesById.get(origWayNode.getNodeId());
        if (origNode != null) {
          wayNodes.add(nodeMap.get(origNode));
        }
      }
     
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.example.demo.Navigation$Node

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.