Struts 2
  1. Struts 2
  2. WW-3587

Provide Mechanism to replace FreeMarker with Java Template, enhance Java Template features

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1.1
    • Fix Version/s: 2.2.3
    • Labels:
      None

      Description

      We recently did some profiling and identifying of inefficiencies within our system. Part of our search found FreeMarker was not as quick as we would like. We found Java Template as an alternative and began incorporating it.

      Java Template required some changes on our part.

      • Radio and checkboxes were not implemented.
      • We added cssClass and cssStyle to the submit tag.
      • We removed unused imports from the head tag.
      • FieldError required an unordered list of errors which could not be presented in the way we needed. We changed to a break-row-delimited and 'red' block. Admittedly, this solution is fairly custom to our solution, but I feel you will see our need here. Let me know if you need more info.

      Dropping Java Template into our project still requires us to include FreeMarker.

      Our goals:

      We are currently branching Java Template within our project. We do not want to do this for very long. Three of the solutions we created for Java Template seem like global improvements. The FieldError change might be harder to solve globally, but I think our desires are mentioned. We are asking for these changes to be applied to the Java Template project, so we no longer have to maintain them internally. Hopefully the community can benefit from these updates.

      I am not a fan of toting around FreeMarker within our project even though we are no longer using it. We have not researched how we can solve this, but would appreciate suggestions or a global solution.

      I can provide source for the Java Template changes but this form does not have an attachment feature. Maybe the next page. If not, let me know, and we can coordinate.

      1. SubmitHandler.java
        3 kB
        Dustin Digmann
      2. SimpleTheme.java
        4 kB
        Dustin Digmann
      3. RadioHandler.java
        3 kB
        Dustin Digmann
      4. FieldErrorHandler.java
        2 kB
        Dustin Digmann
      5. CheckBoxListHandler.java
        3 kB
        Dustin Digmann

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Maurizio Cucchiara
              Reporter:
              Dustin Digmann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development