on 2018 Nov 23 6:38 AM
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
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.