Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1864

Block renderer helper / service

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 5.3.2
    • None
    • tapestry-core
    • None

    Description

      I've seen several posts on the mailing lists asking for how to render blocks manually in pages/components.

      Had a use case in this issue: https://issues.apache.org/jira/browse/TAP5-1863

      Basically I tried with:
      --------
      RenderCommand renderCommand = (RenderCommand)alertBlock;
      MarkupWriter markupWriter = new MarkupWriterImpl();
      RenderQueueImpl renderQueue = new RenderQueueImpl(log);
      renderQueue.push(renderCommand);
      renderQueue.run(markupWriter);

      alertManager.info(markupWriter.toString());
      --------

      Don't know if it's the 'correct' way of doing things so requesting a service or a helper class available in core that does the job.

      Attachments

        1. RenderCommandToStringService.java
          0.3 kB
          Michael Wyraz
        2. RenderCommandToStringServiceImpl.java
          1 kB
          Michael Wyraz

        Issue Links

          Activity

            People

              Unassigned Unassigned
              magnus@kvalheim.dk Magnus Kvalheim
              Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: