cancel
Showing results for 
Search instead for 
Did you mean: 

Collection of extended Media item is not displayed in smartedit

I have a attribute type of Collection f extended Media as part of MyComponent. When I am trying to update this component from Smartedit. This attribute's value is not getting returned under the CMS API. I have tried to debug API where I found that AttributeDesriptor is getting loaded under the TypeModel but values of this attribute is not working under DefaultCMSItemConverter

 protected List<AttributeDescriptorModel> getAttributes(final ComposedTypeModel composedType)
     {
         /* we only persist properties for which a converter was found */
         return getComposedTypeToAttributeCollectionConverter().convert(composedType).stream()
                 .filter(attribute -> attribute.getPartOf() || getAttributeStrategyConverter().getContentConverter(attribute) != null)
                 .collect(toList());
     }

there is some issue in this section. API:

 /cmswebservices/v1/types?code=MyComponent&mode=DEFAULT (To get all attribute and its description)
 /cmswebservices/v1/sites/ozexport/cmsitems/hhsdahhuoiuoiuxx(id of my component and to fetch values of attributes)

items.xml

 <collectiontypes>
         <collectiontype code="MyMediaList" elementtype="MyMedia" autocreate="true" generate="true" type="list" />  
     </collectiontypes>
     <itemtype code="MyCollectionComponent" generate="true"
                 jaloclass="com.test.core.jalo.MyCollectionComponent" 
                 extends="SimpleCMSComponent"
                 autocreate="true">
         <description>Extends existing type with additional attributes.</description>
         <attributes>
             <attribute type="MyMediaList" qualifier="mediaComponents">
                     <persistence type="property" />
                     <modifiers read="true" write="true" search="true" optional="true" />
                     <description>The is Media associated with component</description>
             </attribute>            
         </attributes>
     </itemtype>
     <itemtype code="MyMedia"
             jaloclass="com.test.core.jalo.MyMedia"
             extends="Media" autocreate="true" generate="true">
             <attributes>
                 <attribute qualifier="title" type="localized:java.lang.String">
                     <persistence type="property" />
                     <modifiers optional="true" read="true" write="true" search="true" />
                 </attribute>
             </attributes>
     </itemtype>

Please help me on this and version 6.7

0 Kudos

Hi,

did you fix this? i have more or less the same issue.

Accepted Solutions (0)

Answers (0)