cancel
Showing results for 
Search instead for 
Did you mean: 

Optional attribute in SmartEdit editor

phoude
Participant

Hi,

I have a optional string attribute on one of my component but for some reasons SmartEdit would not allow me to save my form until this attribute is filled in. This is the attribute definition from my items.xml file.

<attribute type="localized:java.lang.String" qualifier="paragraph">
	<modifiers read="true" write="true" optional="true" />
	<persistence type="property">
		<columntype>
			<value>HYBRIS.LONG_STRING</value>
		</columntype>
	</persistence>
</attribute>

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

As I had the same question, I came across this entry.
This article has helped me further:
https://community.sap.com/t5/crm-and-cx-questions/make-a-component-attribute-read-only-in-smartedit/... 

(I'm replying for the next desperate person who comes across this post - I hope the problem is solved 3.5 years later 😊 )

Remove in your smartedit-spring.xml the bean requiredComponentTypeAttributePopulator.

<bean class="de.hybris.platform.cmsfacades.types.service.impl.DefaultComponentTypeAttributeStructure"
		  p:typecode="MySmarteditComponent"
		  p:qualifier="text">
		<property name="populators">
			<set>
				<ref bean="richTextComponentTypeAttributePopulator" />
				<ref bean="requiredComponentTypeAttributePopulator" />
			</set>
		</property>
	</bean>