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

Bring back the Any and Image components for more previewable templates

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • 5.0.5
    • None
    • None
    • None

    Description

      The Any and Image components were removed despite the fact that expansions are not a complete replacement.
      Some examples where Any or Image are necessary or superior:

      <!-- a static class for preview; a dynamic class at runtime -->
      <span t:type="Any" t:class="prop:someMethodToGetTheClass" class="previewDisplayClass">${message:someText}</span>

      <!-- using a mixin -->
      <div t:type="Any" t:mixins="myLayout">My layout</div>

      <!-- previewable image that is still an asset (localized etc) at runtime -->
      <img t:type="Image" src="images/other/header.gif" alt="informals rendered" border="0"/>

      In addition, by adding another blade to Any's swiss army knife even more previewable templates can be achieved:

      <!-- demo body for preview; dynamic body at runtime -->
      <h3 t:type="Any" t:body="item.itemName" class="itemClass">Example Item</h3>

      The tag body is replaced by the contents of the body parameter.

      Cheers,
      Nick.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            sicklittlemonkey Nick Westgate
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: