Uploaded image for project: '[Read Only] - Hippo Essentials'
  1. [Read Only] - Hippo Essentials
  2. ESSENTIALS-448

Fallback provided in org.onehippo.cms7.essentials.components.CommonComponent#setContentBean not always desired

    XMLWordPrintable

Details

    Description

      org.onehippo.cms7.essentials.components.CommonComponent#setContentBean (https://github.com/onehippo/essentials/blob/b1b4521b440624d325d91ad765b6a527b9fb6772/components/hst/src/main/java/org/onehippo/cms7/essentials/components/CommonComponent.java)
      https://gist.github.com/mrop/d125aa2b2610a3d09781

      creates a fallback to getting the content bean.

      The method is used as well by the EssentialsDocumentComponent (https://github.com/onehippo/essentials/blob/b1b4521b440624d325d91ad765b6a527b9fb6772/components/hst/src/main/java/org/onehippo/cms7/essentials/components/EssentialsDocumentComponent.java ). In general I think a drag 'n drop component should be independent of the context as it can be dropped everywhere.

      Imagine one drags a component into a page and the document has not been picked yet. The jsp expects a certain document type, so it will fail.
      ( A workaround is of course to use hst:isreadable and some extra checks in the jsp. )

      Please remove the fallback.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mrop Michiel Rop
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: