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

<t:content> ignores text just before the closing tag

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.3.6
    • 5.4
    • tapestry-core
    • None

    Description

      Let's create a new Tapestry component called <t:CheckboxField> (pretty inspired name)...

      Component Template
      <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" xmlns:p="tapestry:parameter">
      <t:content>
        BEGIN
        <t:if test="modeEdit">
          	
          <t:label for="checkboxField"/>
          <input t:id="checkboxField"/>       
      
          <p:else>
             <span class="label">${context.label}</span>
             <span class="input" t:type="any" t:mixins="NotEmpty">${convertedBooleanValue}</span>
          </p:else>
          	 	
        </t:if>
        END
      </t:content>
      </html>
      

      ...and use it in a page:

      Page Template
      <t:beaneditor t:id="customerEdit" t:object="customer" model="model">		
         <p:vip> <t:CheckboxField/> </p:vip>		
      </t:beaneditor>
      

      Then, the (plain) text "END" will never get rendered. Of course, normally we would surround it within an HTML element, such as <p> or <div>, but need not be.

      Attachments

        1. t_content_issue.JPG
          9 kB
          Aritz Bastida

        Activity

          People

            hlship Howard Lewis Ship
            aritzbastida Aritz Bastida
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: