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

Auto add public Page fields to VelocityContext

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: