Package freenet.clients.http

Examples of freenet.clients.http.PageNode


  public PushTesterToadlet(HighLevelSimpleClient client) {
    super(client);
  }

  public void handleMethodGET(URI uri, HTTPRequest req, ToadletContext ctx) throws ToadletContextClosedException, IOException, RedirectException {
    PageNode pageNode = ctx.getPageMaker().getPageNode("Push tester", ctx, new RenderParameters().renderNavigationLinks(false));
    for (int i = 0; i < 600; i++) {
      pageNode.content.addChild(new TesterElement(ctx, String.valueOf(i), 100));
    }
    writeHTMLReply(ctx, 200, "OK", pageNode.outer.generate());
  }
View Full Code Here


      if (!formPassword.equals(toadletContext.getContainer().getFormPassword())) {
        return new RedirectResponse(invalidFormPasswordRedirectTarget);
      }
    }
    PageMaker pageMaker = toadletContext.getPageMaker();
    PageNode pageNode = pageMaker.getPageNode(getPageTitle(request), toadletContext);
    for (String styleSheet : getStyleSheets()) {
      pageNode.addCustomStyleSheet(styleSheet);
    }
    for (Map<String, String> linkNodeParameters : getAdditionalLinkNodes(request)) {
      HTMLNode linkNode = pageNode.headNode.addChild("link");
      for (Entry<String, String> parameter : linkNodeParameters.entrySet()) {
        linkNode.addAttribute(parameter.getKey(), parameter.getValue());
      }
    }
    String shortcutIcon = getShortcutIcon();
    if (shortcutIcon != null) {
      pageNode.addForwardLink("icon", shortcutIcon);
    }

    TemplateContext templateContext = templateContextFactory.createTemplateContext();
    templateContext.mergeContext(template.getInitialContext());
    try {
View Full Code Here

   *
   * @return HTML code of the page.
   * @throws RedirectException
   */
  public final String toHTML(ToadletContext ctx) throws RedirectException {
    PageNode page;
    if(mOwnIdentity != null)
      page = mPM.getPageNode(Freetalk.PLUGIN_TITLE + " - " + mOwnIdentity.getShortestUniqueName(), ctx);
    else
      page = mPM.getPageNode(Freetalk.PLUGIN_TITLE, ctx);
    page.addCustomStyleSheet(Freetalk.PLUGIN_URI + "/css/freetalk.css");
    page.content.addAttribute("class", "freetalk");

    if(mOwnIdentity != null && !(this instanceof TaskPage)) {
      PersistentTaskManager taskManager = mFreetalk.getTaskManager();
     
View Full Code Here

TOP

Related Classes of freenet.clients.http.PageNode

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.