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

Add new method hasBody() to ComponentResources, to reveal if component has a body or not

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0.13
    • 5.0.14
    • tapestry-core
    • None

    Description

      Same idea as in Tapestry-2541 but in a much lighter way :

      In my case, I use the Layout pattern for rendering my pages, but depending on the situation, sometimes the body of the layout is empty. In that case I would like to display a generic content. So I imagine something like this :

      <t:if test="hasBody">
      Blah blah blah
      <t:parameter name="else">
      <t:body />
      </t:parameter>
      </t:if>

      But I don't know how to write the test "hasBody".

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            kheldar666 Martin Papy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: