Skip to Content
0
Former Member
Jul 10, 2015 at 02:25 PM

Set the default value for language attribute in hmc

551 Views

We need to set the default value for language attribute for customized type in hmc.

    <deployment table="CustomKwrdRedir" typecode="10001" />
    <attributes>
           <attribute qualifier="name" type="java.lang.String">
                  <description>Name</description>
                  <persistence type="property" />
           </attribute>

           <attribute qualifier="page" type="SolrAbstractKeywordRedirect">
                  <description>Stores the Redirect page</description>
                  <persistence type="property" />
           </attribute>

           <attribute qualifier="keywords" type="solrFacetSearchKeywordRedirectList">
                  <description>Stores the list of keywords having the same Redirect</description>
                  <persistence type="property" />
           </attribute>
    <attribute type="Language" qualifier="sessionLanguage">
                  <modifiers read="true" write="true" optional="true" search="true" />
                  <!-- <defaultvalue>de.hybris.platform.jalo.c2l.C2LManager.getInstance().getLanguageByIsoCode("English")</defaultvalue> -->
                               <persistence type="property" />
                               </attribute>
    </attributes>
    </itemtype>

The above declaration is not working. We know this can be set using the initdefaultinterceptor. But is there any better approach to do it.

Appreciate the help.