ATG BCC – Overriding the UI attribute of a Text Field

I had a requirement to modify product short description attribute to support 300  chars .Product Short Description  was defined as a String in repository , so the default max length allowed in BCC was 254 characters.

After long trial I figured out the way to change the max length of text field connected to one particular attribute with out applying it globally . so thought of sharing this as I could not find any good documentation for view mapping updates specific to special requirement s like this

Product Catalog string attributes are defined with the data type as either string ( E,g display name , short description e.t.c )  or big string ( long description e.t.c ) .

Big string editors (Text Area ) can be defined as WYSWYG to support the rich text e.t.c and there are lot of documents/blogs available to configure this attribute .

This blog is to explain in detail on the default string editor ( Text editor ) and how it is configured to work in  BCC Merchandising view .

As like other UI attributes of ay editor , the string editor is also managed thru ViewMapping repository /atg/web/viewmapping/ViewMappingRepository . The updates are shown in ACC below but one can update these in dyn/admin as well. In this example Iam modifying the inputFieldMaxlength similarly we can override other attributes as well

A.Global Change

By default the max length of the text field is managed in the itemdescriptor with the ID AmPvadDefInputFieldMaxLength as shown below . It is defined as 254 which means the text field length for any attribute ( not just the product catalog even any other repository ) defined as string is limited to only 254 chars or whatever defined here in BCC across all repositories . IF we have to change it global for all the attributes using the text editor just update it here


B. Change the max length of Text Editor  for a Specific Attribute


Create PropertyViewAttributeDefinition to specify the inputFieldMaxlength for the specific attribute Create rep item with the new ID PVADPrdDesc






























Create Property View to define the new text field with ID PVPrdDesc



































—— Printing item with id: PVADPrdDesc

<add-item item-descriptor=”propertyViewAttributeDefinition” id=”PVADPrdDesc”>

<set-property name=”description”><![CDATA[Max number of characters in the input field for Product Display Description attribute]]></set-property>

<set-property name=”defaultValue”><![CDATA[1000]]></set-property>



Link it to the PVADPrdDesc with the key inputFieldMaxlength as below







































—— Printing item with id: PVPrdDesc
<add-item item-descriptor=”propertyView” id=”PVPrdDesc”>
<set-property name=”description”><![CDATA[AssetManager override display description  propertyView]]></set-property>
<set-property name=”isDefault”><![CDATA[false]]></set-property>
<set-property name=”attributes”><![CDATA[inputFieldMaxlength=PVADPrdDesc]]></set-property>
<set-property name=”mode”><![CDATA[AmMmDef]]></set-property>
<set-property name=”isComponentPropertyView”><![CDATA[true]]></set-property>
<set-property name=”viewComponent”><![CDATA[]]></set-property>
<set-property name=”type”><![CDATA[?]]></set-property>
<set-property name=”name”><![CDATA[AssetManager Display Description  propertyView]]></set-property>


Create the property view mapping with the ID PVMPrdDesc  with the   property view PVPrdDesc created above to link ItemViewMapping
















—— Printing item with id: PVMPrdDesc

<set-property name=”description”><![CDATA[DCS-UI Product Display Description]]></set-property>
<set-property name=”propertyView”><![CDATA[PVPrdDesc]]></set-property>


Add the above property view mapping PVMPrdDesc to the attributes of the existing Product Item view which is generally with the ID AmIvmPrdtGen




















































Display Description allows 1000 chars and Name and other string attributes allows only 254 chars


Please share your thoughts in the comments section below.

Facebook Comments

This 106-Year-Old La

A 106-year-old lady by the name of Virginia McLaurin has ...

5 Reasons Why Great

A study reported on suggests that 35 to 50% ...

5 Reasons Why Good C

Building a Good Team takes quite a bit of planning ...

Have ‘grooming’

‘Change yourself in few hours/days’, ‘Habits of successful people’, ‘You ...

3 Tips on getting th

If you think that your dream job is just a ...

Tips for an In Perso

Research a company and its industry You’ll need to do thorough ...

READ NEXT (1 of 10 articles)

Read previous post:
When Feeling Hopeless, Watch This!!