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

Simplified insert binding template syntax

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.1
    • Component/s: Framework
    • Labels:
      None

      Description

      It would be desirable to support a simplified syntax for obtaining data via bindings and inserting it. A proposal has been to adopt ant-like syntax ("${...}") and interpret the expression within the braces as a binding reference. This would eliminate the need for many Insert components, i.e.:

      <h1>${thread.title}</h1>

      rather than:

      <h1><span jwcid="@Insert" value="thread.title"/></h1>

      Or:

      ${message:prompt}

      rather than:

      <span key="prompt"/>

      This kind of substitution is less invisible, but generally less intrusive, than creating a new component.

      Further, the use of the Any component could be reduced via support for:

      <img src="${imagePath}"/>

      rather than:

      <img jwcid="@Any" src="ognl:imagePath"/>

      Some questions occur; are the following legal?

      <${element}> ... </${element}>
      <img jwcid="@Image" src="${asset:foo}"/>
      <div ${attribute}="${value}"/>

      A final note: these bindings should be treated as we treat informal parameters today; this includes automatically expanding IAssets into their corresponding URLs.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hlship Howard M. Lewis Ship
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: