Class HtmlDiffModel

  • All Implemented Interfaces:
    Serializable, org.apache.wicket.model.IDetachable, org.apache.wicket.model.IModel<String>, org.apache.wicket.util.io.IClusterable

    public class HtmlDiffModel
    extends org.apache.wicket.model.LoadableDetachableModel<String>
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HtmlDiffModel.ValidHtmlModel
      This model ensures the value is surrounded with ..value.. This is required by the DiffHelper.diffHtml method.
    • Constructor Summary

      Constructors 
      Constructor Description
      HtmlDiffModel​(org.apache.wicket.model.IModel<String> original, org.apache.wicket.model.IModel<String> current)
      Create a HtmlDiffModel using the default HTML diff service
      HtmlDiffModel​(org.apache.wicket.model.IModel<String> original, org.apache.wicket.model.IModel<String> current, DiffService diffService)
      Create the model using a predefined diff service.
    • Constructor Detail

      • HtmlDiffModel

        public HtmlDiffModel​(org.apache.wicket.model.IModel<String> original,
                             org.apache.wicket.model.IModel<String> current)
        Create a HtmlDiffModel using the default HTML diff service
        Parameters:
        original -
        current -
        See Also:
        DefaultHtmlDiffService
      • HtmlDiffModel

        public HtmlDiffModel​(org.apache.wicket.model.IModel<String> original,
                             org.apache.wicket.model.IModel<String> current,
                             DiffService diffService)
        Create the model using a predefined diff service.
        Parameters:
        original -
        current -
        diffService - if it's null, the default HTML diff service is used (see DefaultHtmlDiffService)
        See Also:
        DiffService
    • Method Detail

      • load

        protected String load()
        Specified by:
        load in class org.apache.wicket.model.LoadableDetachableModel<String>
      • detach

        public void detach()
        Specified by:
        detach in interface org.apache.wicket.model.IDetachable
        Specified by:
        detach in interface org.apache.wicket.model.IModel<String>
        Overrides:
        detach in class org.apache.wicket.model.LoadableDetachableModel<String>