Showing posts with label Customisations. Show all posts
Showing posts with label Customisations. Show all posts

Making ID property editable in BCC- OOTB Repository

Making ID property editable in BCC- OOTB Repository


To make ID property editable in BCC, please follow below steps. We will make Category ID to be editable.

Note: ID property is editable ONLY when item is being created first time using BCC.

Step 1: Print itemMapping for Category Item in Dyn/admin.
<print-item item-descriptor="itemMapping" id="AmImCat" />


------ Printing item with id: AmImCat
<add-item item-descriptor="itemMapping" id="AmImCat">
  <set-property name="itemName"><![CDATA[category]]></set-property>
  <set-property name="description"><![CDATA[DCS-UI category itemMapping]]></set-property>
  <set-property name="attributes"><![CDATA[resourceBundle=AmAvCatBnd]]></set-property>
  <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
  <set-property name="viewMappings"><![CDATA[AmIvmCatGen,AmIvmCatMedia,AmIvmCatPrdt,AmIvmCatAdv]]></set-property>
  <set-property name="formHandler"><![CDATA[AmFhDef]]></set-property>
  <set-property name="itemPath"><![CDATA[/atg/commerce/catalog/ProductCatalog]]></set-property>
  <set-property name="name"><![CDATA[AssetManager]]></set-property>
</add-item> 


Step 2: Create new attribute with value "true".
<add-item item-descriptor="attributeValue" id="MYAvCatEditId">
 <set-property name="value"><![CDATA[true]]></set-property>
</add-item>


Step 3: Update the existing item-Mapping.
<update-item item-descriptor="itemMapping" id="AmImCat">
 <set-property name="attributes"><![CDATA[resourceBundle=AmAvCatBnd,showCreationId=MYAvCatEditId]]></set-property>
</update-item>


Category Id Editable

Making ID property editable in BCC- Custom Repository

Making ID property editable in BCC- Custom Repository


To make ID property editable in BCC, please follow below steps.

Step 1: Create Attribute with value "true".
<add-item item-descriptor="attributeValue" id="MYAvAddrsEditId">
 <set-property name="value"><![CDATA[true]]></set-property>
</add-item>


Step 2: Update the existing ItemMapping, else create new.
<update-item item-descriptor="itemMapping" id="MYImAddress">
 <set-property name="attributes"><![CDATA[showCreationId=MYAvAddrsEditId]]></set-property>
</update-item>


OR

<add-item item-descriptor="itemMapping" id="MYImAddress">
  <set-property name="name"><![CDATA[AssetManager]]></set-property>
  <set-property name="description"><![CDATA[AssetManager Address itemMapping]]></set-property>
  <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
  <set-property name="itemPath"><![CDATA[/my/Address]]></set-property>
  <set-property name="itemName"><![CDATA[address]]></set-property>
  <set-property name="formHandler"><![CDATA[AmFhDef]]></set-property>
  <set-property name="attributes"><![CDATA[showCreationId=MYAvAddrsEditId]]></set-property>
</add-item>

Id Editable

Creating a Multiple Tabs using view mappings


Creating a Multiple Tabs using view mappings



To create Multiple Tabs using view mappings, please follow the below mentioned steps.

Step 1: Create "Attribute" for resource bundle ( Not required, if your RDF doesn't contain Resource-Bundle & Need not create, if u have created while doing previous exercise)
<add-item item-descriptor="attributeValue" id="MYAvRESBnd">
  <set-property name="value"><![CDATA[/my/Resources]]></set-property>
</add-item>

Step 2: Create "Attribute" for Category names used in RDF.
<add-item item-descriptor="attributeValue" id="MYAvBookGenCat">
  <set-property name="value"><![CDATA[BookInfo]]></set-property>
</add-item>

<add-item item-descriptor="attributeValue" id="MYAvBookDimen">
  <set-property name="value"><![CDATA[BookDimen]]></set-property>
</add-item>

<add-item item-descriptor="attributeValue" id="MYAvBookAuthor">
  <set-property name="value"><![CDATA[BookAuthor]]></set-property>
</add-item>


Step 3: Create itemViewMapping for all the tabs.
<add-item item-descriptor="itemViewMapping" id="MYIvmBookGeneral">
  <set-property name="name"><![CDATA[AssetManager Book general itemViewMapping]]></set-property>
  <set-property name="displayName"><![CDATA[Book Details]]></set-property>
  <set-property name="view"><![CDATA[AmIvDef]]></set-property>
  <set-property name="attributeValues"><![CDATA[includedCategories=MYAvBookGenCat,resourceBundle=MYAvRESBnd]]></set-property>
</add-item>

<add-item item-descriptor="itemViewMapping" id="MYIvmBookDimen">
  <set-property name="name"><![CDATA[AssetManager Book Dimensions itemViewMapping]]></set-property>
  <set-property name="displayName"><![CDATA[Book Dimensions]]></set-property>
  <set-property name="view"><![CDATA[AmIvDef]]></set-property>
  <set-property name="attributeValues"><![CDATA[includedCategories=MYAvBookDimen,resourceBundle=MYAvRESBnd]]></set-property>
</add-item>

<add-item item-descriptor="itemViewMapping" id="MYIvmBookAuthor">
  <set-property name="name"><![CDATA[AssetManager Book Author itemViewMapping]]></set-property>
  <set-property name="displayName"><![CDATA[Book Author]]></set-property>
  <set-property name="view"><![CDATA[AmIvDef]]></set-property>
  <set-property name="attributeValues"><![CDATA[includedCategories=MYAvBookAuthor,resourceBundle=MYAvRESBnd]]></set-property>
</add-item>


Note: displayName is what that appears as Tab Name.

Step 4: Create itemMapping for Item-descriptor in RDF using all tabs.
<add-item item-descriptor="itemMapping" id="MYImBook">
  <set-property name="name"><![CDATA[AssetManager]]></set-property>
  <set-property name="description"><![CDATA[AssetManager Book itemMapping]]></set-property>
  <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
  <set-property name="itemPath"><![CDATA[/my/Library]]></set-property>
  <set-property name="itemName"><![CDATA[book]]></set-property>
  <set-property name="formHandler"><![CDATA[AmFhDef]]></set-property>
  <set-property name="viewMappings"><![CDATA[MYIvmBookGeneral,MYIvmBookDimen,MYIvmBookAuthor]]></set-property>
</add-item>


Multiple Tabs in BCC

Creating a simple view mapping in BCC


Creating a simple view mapping in BCC(With one tab on right panel of BCC)


To create simple view mapping, please follow the below steps. Providing the add-items, as these can be executed in Dyn/admin, ViewMapping repository (/atg/web/viewmapping/ViewMappingRepository).

Step 1: Create "Attribute" for resource bundle ( Not required, if your RDF doesn't contain Resource-Bundle)
<add-item item-descriptor="attributeValue" id="MYAvRESBnd">
  <set-property name="value"><![CDATA[/my/Resources]]></set-property>
</add-item>


Step 2: Create "Attribute" for Category name used in RDF.
<add-item item-descriptor="attributeValue" id="MYAvAddressGenCat">
  <set-property name="value"><![CDATA[BasicInfo]]></set-property>

</add-item>

from RDF: category-resource="BasicInfo"

Step 3: Create itemViewMapping for Tab.
<add-item item-descriptor="itemViewMapping" id="MYIvmAddressGeneral">
  <set-property name="name"><![CDATA[AssetManager Address general itemViewMapping]]></set-property>
  <set-property name="displayName"><![CDATA[Address Details]]></set-property>
  <set-property name="view"><![CDATA[AmIvDef]]></set-property>
  <set-property name="attributeValues"><![CDATA[includedCategories=MYAvAddressGenCat,resourceBundle=MYAvRESBnd]]></set-property>

</add-item>

Step 4: Create itemMapping for item-desctiptor of RDF.
<add-item item-descriptor="itemMapping" id="MYImAddress">
  <set-property name="name"><![CDATA[AssetManager]]></set-property>
  <set-property name="description"><![CDATA[AssetManager Address itemMapping]]></set-property>
  <set-property name="mode"><![CDATA[AmMmDef]]></set-property>
  <set-property name="itemPath"><![CDATA[/my/Address]]></set-property>
  <set-property name="itemName"><![CDATA[address]]></set-property>
  <set-property name="formHandler"><![CDATA[AmFhDef]]></set-property>
  <set-property name="viewMappings"><![CDATA[MYIvmAddressGeneral]]></set-property>

</add-item>

Right Panel of Asset Editor


Showing "Import" and "Export" options for Site-Admin UI

Showing "Import" and "Export" options for Site-Admin UI

To enable the Import Button & Export Option in Site-Admin UI, please follow below mentioned steps.This can help you to import the xls and export the xls for Site-Assets.

Step 1: Override the taskConfiguration file.
Path: /config/atg/remote/multisite/assetmanager/taskConfiguration.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE task-configuration
        PUBLIC "-//Art Technology Group, Inc.//DTD Asset Manager Task Configuration//EN"
        "http://www.atg.com/dtds/task-configuration/task-configuration_2.0.dtd">

<task-configuration>
 <task id="siteadmin.manageSiteAssets" inherit-from="siteadmin.browseSiteAssets">
    <activity-id>
      siteadmin.manageSiteAssets
    </activity-id>
      <!-- Enabling the Import Button -->
    <property name="showImportButton" value="true"/>
 </task>
</task-configuration>





Site-Admin UI with "Import" Enabled



Step 2: Override the SiteAdminToolbar with following content.
Path: /config/atg/remote/multisite/toolbar/SiteAdminToolbar.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE browse-hierarchy
  PUBLIC "-//Art Technology Group, Inc.//DTD Asset Manager Browse Hierarchy//EN"
  'http://www.atg.com/dtds/toolbar/toolbar_1.0.dtd'>

<toolbar
    resource-formatter="/atg/remote/multisite/ResourceFormatter">
      
 <operation-menu id="siteOperationMenu">
    <toolbar-scope asset-area="siteadmin" pane-id="browse"/>
    <operation-menu-item id="export" />
  </operation-menu>

  <operation id="export"        label-resource="toolbar.action.label.export"
                                event="AssetManager.export"
                                active-for-selected-item-count="ONE-OR-MORE"
                                shortcut-resource-bundle="ATGResources"
                                shortcut-resource-key="operation.export.shortcut"
                                shortcut-modifiers="CTRL"/>
</toolbar>


Export XLS for Site Assets