Examples of ContentView


Examples of com.ateam.webstore.ui.views.ContentView

      piwls.remove(piwl);
    }

    wlv.setWishList(wl);
   
    wlv.addContentView(new ContentView(JSP_WISHLIST, wl.getName()));
   
    return wlv;
   
  }
View Full Code Here

Examples of com.ateam.webstore.ui.views.ContentView

   
    ProductListView hp = new ProductListView(getMainView());
   
    hp.setProducts(getFeaturedProducts());
   
    ContentView cv = new ContentView(JSP_HOME, "Featured Products");
   
    hp.getContentViews().add(cv);

    return hp;
   
View Full Code Here

Examples of com.ateam.webstore.ui.views.ContentView

    ProductListingView pl = new ProductListingView(getMainView());
   
    pl.setProducts(service.getProductsByCategory(Long.parseLong(category)));
    l.info("displaying category: "+cat.getName());
   
    ContentView cv = new ContentView(JSP_PRODUCT_LISTING, cat.getName());
   
    pl.getContentViews().add(cv);

    return pl;
   
View Full Code Here

Examples of com.ateam.webstore.ui.views.ContentView

   
    String jsp = JSP_PRODUCT_LIST;
    if (admin) {
      jsp = JSP_ADMIN_PRODUCT_LIST;
    }
    ContentView cv = new ContentView(jsp, "All Products");
   
    hp.getContentViews().add(cv);

    return hp;
   
View Full Code Here

Examples of com.ateam.webstore.ui.views.ContentView

   
    ProductDetailsView pv = new ProductDetailsView(main);
   
    if (p != null) {
      pv.setProduct(p);
      pv.addContentView(new ContentView(jsp, p.getProductName()));
    }
    else {
      pv.addContentView(new ContentView(JSP_MESSAGE, "Not Found"));
      pv.setMessage("Sorry, product not found.");
    }
   
    return pv;
  }
View Full Code Here

Examples of com.ateam.webstore.ui.views.ContentView

        main = getMainView();
      }
      ProductListingView pl = new ProductListingView(main);
     
      pl.setProducts(service.searchProductsByNameOrDescription(query));
      pl.addContentView(new ContentView(JSP_PRODUCT_LISTING, "Search results for: "+query));
     
      fs.setResultView(pl);
     
    }
    else {
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentView

    CMutableDocument doc = editor.getDocument();
    doc.setAnnotation(3, 4, "style/color", "red");

    editor.getContent().debugCheckHealthy2();
    timerService.tick(1000);
    ContentView fullDoc = ((EditorImpl) editor).getContent().getFullContentView();
    assertNotNull(
        DocHelper.getElementWithTagName(fullDoc, AnnotationPaint.SPREAD_FULL_TAGNAME));
    doc.setAnnotation(3, 4, "style/color", null);
    timerService.tick(1000);
    assertNull(DocHelper.getElementWithTagName(fullDoc, AnnotationPaint.SPREAD_FULL_TAGNAME));
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentView

    //    redoing it
    // 2. It blatantly disregards transparent nodes. It should "work" with them
    //    around, but it might mess them up.
    // 3. The code is too complicated

    ContentView renderedContent = renderedView;

    assert end == null || end.getContainer() == start.getContainer() :
        "No reverting across elements";

    ContentNode before = Point.nodeBefore(renderedContent, start);
    Node nodeletBefore = before == null ? null : before.getImplNodelet();
    Element parentNodelet;
    if (nodeletBefore == null) {
      parentNodelet = renderedContent.getVisibleNode(start.getContainer()).getImplNodelet().cast();
    } else {
      parentNodelet = nodeletBefore.getParentElement();
    }

    ContentNode first = start.getNodeAfter();
    ContentNode last = end == null ? null : end.getNodeAfter();
    assert renderedContent.getVisibleNode(first) == first;
    assert renderedContent.getVisibleNode(last) == last;
    assert last == null
        || renderedContent.getParentElement(first) == renderedContent.getParentElement(last)
        : "First and last are expected to have same parent";
    {
      ContentNode node;
      for (node = first; node != last; node = renderedContent.getNextSibling(node)) {
        // If node is consistent, we assume the ones after are ok.
        if (end == null && node.isConsistent()) {
          break;
        }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentView

     * from there up into the wrapper world, then scan rightwards across both
     * doms to find the matching pair, using current as our cursor into the html
     * dom, and possibleOwnerNode as our cursor into the wrapper dom.
     */

    ContentView renderedContent = renderedContentView;
    HtmlView filteredHtml = filteredHtmlView;

    // The element before all previous text node siblings of target,
    // or null if no such element
    Node nodeletBeforeTextNodes;
    ContentNode wrapperBeforeTextNodes;

    // Our cursors
    Text current = target;
    ContentNode possibleOwnerNode;

    // Go leftwards to find the start of the text nodelet sequence
    for (nodeletBeforeTextNodes = filteredHtml.getPreviousSibling(target);
         nodeletBeforeTextNodes != null;
         nodeletBeforeTextNodes = filteredHtml.getPreviousSibling(nodeletBeforeTextNodes)) {
      Text maybeText = filteredHtml.asText(nodeletBeforeTextNodes);
      if (maybeText == null) {
        break;
      }
      current = maybeText;
    }

    Element parentNodelet = filteredHtml.getParentElement(target);
    if (parentNodelet == null) {
      throw new RuntimeException(
          "Somehow we are asking for the wrapper of something not in the editor??");
    }
    ContentElement parentElement = NodeManager.getBackReference(parentNodelet);

    // Find our foothold in wrapper land
    if (nodeletBeforeTextNodes == null) {
      // reached the beginning
      wrapperBeforeTextNodes = null;
      possibleOwnerNode = renderedContent.getFirstChild(parentElement);
    } else {
      // reached an element
      wrapperBeforeTextNodes = NodeManager.getBackReference(
          nodeletBeforeTextNodes.<Element>cast());
      possibleOwnerNode = renderedContent.getNextSibling(wrapperBeforeTextNodes);
    }

    // Scan to find a matching pair
    while (true) {
      // TODO(danilatos): Clarify and possibly reorganise this loop
      // TODO(danilatos): Write more unit tests to thoroughly cover all scenarios

      if (possibleOwnerNode == null) {
        // Scenario (D)
        throw new HtmlInserted(
              Point.inElement(parentElement, (ContentNode) null),
              Point.start(filteredHtml, parentNodelet)
            );
      }

      ContentTextNode possibleOwner;
      try {
        possibleOwner = (ContentTextNode) possibleOwnerNode;
      } catch (ClassCastException e) {
        if (possibleOwnerNode.isImplAttached()) {
          // Scenario (C)
          throw new HtmlInserted(
                Point.inElement(parentElement, possibleOwnerNode),
                Point.inElementReverse(filteredHtml, parentNodelet, nodeletBeforeTextNodes)
              );
        } else {
          // Scenario (A)
          // Not minor, an element has gone missing
          throw new HtmlMissing(possibleOwnerNode, parentNodelet);
        }
      }

      ContentNode nextNode = renderedContent.getNextSibling(possibleOwner);
      if (nextNode != null && !nextNode.isImplAttached()) {
        // Scenario (E)
        throw new HtmlMissing(nextNode, parentNodelet);
      }

View Full Code Here

Examples of org.waveprotocol.wave.client.editor.content.ContentView

     *   typing sequence.
     */
    private void startTypingSequence(Point.Tx<Node> previousSelectionStart)
        throws HtmlMissing, HtmlInserted {
      Text node = previousSelectionStart.getContainer().cast();
      ContentView renderedContent = renderedContentView;
      HtmlView filteredHtml = filteredHtmlView;
      try {
        // This might throw an exception
        ContentTextNode wrapper = manager.findTextWrapper(node, true);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.