Uploaded image for project: 'Click'
  1. Click
  2. CLK-112

Auto add public Page fields to VelocityContext

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Target Click 0.21

      Description

      From Click Hacks:
      -------------------------

      2. Non-control public fields are auto-put into the VelocityContext

      We hacked ClickServlet.createVelocityContext to walk public fields, find
      ones that are not-null and not-controls, and call context.put(fieldName,
      value).

      So we get to skip adding values to the model, we just always know in a page
      if we do "this.publicBooleanField = true;", that we can then do
      "$publicBooleanField" in the template.

        Activity

        Hide
        medgar Malcolm Edgar added a comment -

        Available in release 0.21

        Show
        medgar Malcolm Edgar added a comment - Available in release 0.21

          People

          • Assignee:
            medgar Malcolm Edgar
            Reporter:
            click_stephen Stephen Haberman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development