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

7 comments:

  1. can you please let me know where to have this view mapping.xml.

    i have added a new view mapping .xml, having <gsa xml-combine="append".

    now the existing OOB xml combined with the above <add-item tags and coming as single xml.

    no changes in the bcc screen.

    ReplyDelete
  2. Hi,

    You can check by using <print-item .... in ViewMapping Repository in Dyn/admin. If your items are not present, use your items dyn/admin of ViewMapping Repository and add them. And then restart ViewMapping Repository. It should work. Else your viewmappings need to be examined. Hope it helps.

    Regards,
    Iranna

    ReplyDelete
  3. How can we display scene7 functionality in atg10.2 . Can we simply integrate the jsp or we need to run the actionscripting to convert to swf.

    ReplyDelete
    Replies
    1. JSP integration was upto ATG 9.x. Beyond ATG 10.x, it's all about swf. I had tried same custom feature with some POC. I would be coming up with write up about same soon. But here is what you need to do, to achieve the same.
      1. Create ActionScript to show Imagebox.
      2. Convert .as file to .swf file including required libraries from ATG.
      3. Include .swf file to your Versioned Module.
      4. Create ItemMapping/PropertyViewMapping, which used custom view to display Image in BCC.

      Hope above info helps.

      Regards,
      Iranna

      Delete
  4. Hi,

    I created a custom viewmapping, like this example, but it didn't worked at BCC.
    When I access BCC and try to create/edit items, BCC displays it with default configurations, did not get my custom tabs. I look at ACC and Database, and my configurations are there, in a good way.

    I tried to invalidate cache, restart ViewMappingRepository, but didn't work.

    Any suggestions?

    Thanks

    ReplyDelete
    Replies
    1. Hi,

      Will it be possible for you to mail viewmappings and complete item descriptor. I will have look at it and let you know if it has any issues.

      iranna123@gmail.com

      Best Regards,
      Iranna

      Delete