Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4815

Interface to mark components with type safe models

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.1.1
    • 6.2.0
    • wicket
    • None

    Description

      Could we please have an interface to tag components that support type safe default models (Think Link, GenericPanel etc). This would help enforce consistency across these types of components.

      Something like:

      public interface IGenericComponent<T>
      {
      IModel<T> getModel();
      void setModel(IModel<T> model);
      void setModelObject(T object);
      T getModelObject();
      }

      It may also be a good idea to implement a helper utility that does all the casting etc, and takes an additional Component argument per method.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            jesselong Jesse Long
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: