Question

When we open cms cockpit in hybris and expand the search option. It shows the "Is default page" radio button as n/a. I want to change it to "true" or "false". In which file should i make the changes ?

Was it helpful?

Solution

Every boolean entity in hybris, if is optional by virtue of its declaration in the items.xml, renders the n/a radio button when viewed in the hmc/cmscockpit.

To remove this, you need to do the following changes

  • Go to items.xml of your extension
  • Edit the boolean attribute as below:

<attribute qualifier="active" type="java.lang.Boolean">
  <modifiers read="true" write="true" optional="false" />
  <defaultvalue>java.lang.Boolean.TRUE</defaultvalue>
  <persistence type="property" />
</attribute>

  • Go to hmc.xml of your custom extension and make the below entries (if you want only yes/no to appear and do not want a checkbox)

<attribute name="active">
  <advancedbooleaneditor truename="true" falsename="false" />
</attribute>

  • Do ant clean all and start the hybris server
  • Go to hmc/cockpit and view the attribute now. The attribute will look like below. enter image description here

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top