[MAGNOLIA-2382] templates and paragraphs can have arbitrary parameters Created: 18/Sep/08  Updated: 23/Jan/13  Resolved: 17/Oct/08

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 4.0

Type: Improvement Priority: Major
Reporter: Philipp Bärfuss Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: mme_sprint1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLSTK-190 M1.2.4 Paragraph Configuration Closed
dependency
depends upon MAGNOLIA-2369 Templates should be instanciated with... Closed
is depended upon by MGNLSTK-134 Teasers all kinds Closed
supersession
supersedes MAGNOLIA-2402 Add a property to Paragraph Configura... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Comments   
Comment by Magnolia International [ 19/Sep/08 ]

Maybe we should think of a different name to avoid confusion with request parameters ?

Comment by Jan Haderka [ 19/Sep/08 ]

properties?

Comment by Magnolia International [ 22/Sep/08 ]

a first temporary step - since MAGNOLIA-2369 currently prevents having params: c2b is now recursive, so arbitrary params can at least be added in a subnode

Comment by Magnolia International [ 14/Oct/08 ]

Doesn't work for paragraphs yet, as they're not instanciated using "recursive" content2bean. This patch is possibly sufficient, please review:

Index: magnolia-core/src/main/java/info/magnolia/cms/beans/config/ParagraphManager.java
===================================================================
--- magnolia-core/src/main/java/info/magnolia/cms/beans/config/ParagraphManager.java	(revision 19061)
+++ magnolia-core/src/main/java/info/magnolia/cms/beans/config/ParagraphManager.java	(working copy)
@@ -119,7 +119,7 @@
      */
     protected void addParagraphToCache(Content c) {
         try {
-            final Paragraph p = (Paragraph) Content2BeanUtil.toBean(c, Paragraph.class);
+            final Paragraph p = (Paragraph) Content2BeanUtil.toBean(c, true, Paragraph.class);
             addParagraphToCache(p);
         }
         catch (Content2BeanException e) {
Generated at Mon Feb 12 03:36:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.