cancel
Showing results for 
Search instead for 
Did you mean: 

What is the use of Custom-properties in items.xml?.

Former Member
0 Kudos
777

Can anyone explain what is the application of custom properties that we define at

1) Type level

2) attribute level

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Custom-properties comes in handy when you need to have sync able attributes for a Type. like we have components for both staged and online version, Custom-properties are the way to go to have stage and online version supported attributes.Then you include them in the roottypes and make them sync able.

UPDATE CatalogVersionSyncJob;code[unique=true];roottypes(code)[mode=append] ;sync ContentCatalog:Staged->Online;yourType

Former Member
0 Kudos

Hi Vipin,

Custom-properties are used to define properties for a type. Unlike the defaultvalue element (which sets a default value for an attribute), the custom-properties element sets a value at the type itself.

For more info you can refer - https://wiki.hybris.com/display/release3/items.xml#items.xml-custom-properties

Sujitha

Former Member
0 Kudos

@sujitha: The link is not working.I understand the basic information but couldnt connect with the real time examples.Also if possible can you please specify the example here.

Former Member
0 Kudos

As the custom-properties sets a value at the type, you can retrieve these item type properties at runtime via the getProperty( String propertyName ) method. For e.g.,At the catalog extension this kind of properties will be used to identify the type e.g. as catalog item.

Former Member
0 Kudos

@Sujatha: I am still not able to visualize the full cycle.Going by your explanation. How are we adding values for custom properties?.Does custom -Properties defined becomes attributes of my Model class?.