Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-11950

Cannot reuse custom Perspective with different title

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 13.3.0, 14.0.0
    • 13.4.0, 14.0.0
    • None
    • None

    Description

      Hi,

      When trying to extend org.hippoecm.frontend.plugins.standards.perspective.Perspective in order to reimplement https://code.onehippo.org/cms-community-dev/hippo-cms/commit/5ad73bf0d2f5d3706e2becadd1639c62a26dd1d2 (to be honest I don't understand why we don't support the old way of setting the title, but I need it in order to use the same perspective with different titles), I discovered that:

      • The field title is private (I cannot access it directly).
      • The constructor initializes the field title as an instance of StringResourceModel.
      • The only way to change this field is by using the method setTitle.
      • The method setTitle calls title.setObject, which leads to UnsupportedOperationException for StringResourceModel.

      It seems that there is no way of changing the title, it could be nice to have another setTitle method that accepted an IModel object instead of the String.

      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            eperez Eduardo Perez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: