Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-545

Hook into the rendering process for AJAX improvement

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 4.0
    • 4.1
    • Framework
    • None

    Description

      I added this feature request in the hope, that we might find a solution on how to simplify the AJAX support in tapestry.
      It currently requires a special "Part" component which exchanges its markupwriter during rendering. As all components not contained in such a "Part" use a Nullwriter, this approach allows to only render specified components.

      The disadvantage with this is, that the part component is absolutely required. It would be much nicer if all components could be marked as "to be rendered".

      For a discussion which approaches are possible see http://thread.gmane.org/gmane.comp.jakarta.tapestry.devel/6734

      At the end I can only see one possibility (or maybe two, but the second one is dirty):

      -add a wrapMethodImplementation(Class,MethodSignature,String,String) method to the EnhancementOperation interface which allows to do kind of AOP magic to the renderComponent method of each component. This would allow to switch the markupwriter in all renderComponent methods of all components.

      the disadvantage: the enhancementworker who does this must come very late in the chain. Otherwise other enhancementworkers could add code before or after the wrapped code.

      -the dirty one: using a little enhancement for the prepareforRender method in combination with threadlocals, the partialservice and a special markupwriter could achieve the same. But this would require to make the markupwriter more clever than it should be. not nice.

      As already mentioned in the e-mail discussion: I can't see any other possibilities. But maybe someone else?

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            jocsch Markus Joschko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: