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

Change If and Unless to render thier template element if provided (i.e., when using t:type) as well as informal parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0.18
    • 5.1.0.0
    • tapestry-core
    • None

    Description

      I use a lot of dummy texts in my template to see what the page will actually look like when rendered. To filter out these fragments I created a "Dummy" component whose setupRender method always returns "false".

      I don't know if this is efficient but it would be nice to have something like this already in T5's component library.

      More efficient would be a special marker XML attribute that the template parser recognizes. Maybe something like a t:test attribute which is works like <t:if test="...">...</t:if>. If the contained expression evaluations to false or null the marked element is filtered.

      <ul>
      <li t:test="show.item">conditional item</li>
      <li t:test="literal:false">dummy item</li>
      </ul>

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            messi Folke Behrens
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: