Introduced in Feature Pack 3

Populating the new tab with content

Introduced in Feature Pack 3 In this lesson, you populate the new warranty tab with content using the CachedProductOnlyTabPanesExt.jspf file. This is where you retrieve warranty information using the getData tag. This invokes the expression builder created earlier.

About this task


  1. Open the following file:
    • WebSphere Commerce DeveloperWCDE_installdir\workspace\Stores\WebContent\Madisons\Snippets\Catalog\CatalogEntryDisplay\CachedProductOnlyTabPanesExt.jspf
  2. Copy the following snippet into the file:
    The getData tag is used to retrieve data from the new getCatalogEntryViewWarrantyByID expression builder.
    <wcf:getData type="" var="catalogNavigationView" 
    	expressionBuilder="getCatalogEntryViewWarrantyByID" varShowVerb="showCatalogNavigationView" maxItems="1" recordSetStartNumber="0" scope="request">
    	<wcf:param name="UniqueID" value="${productId}" />
    	<wcf:contextData name="storeId" data="${WCParam.storeId}" />
    	<wcf:contextData name="catalogId" data="${WCParam.catalogId}" />
    <c:set var="catEntry" value="${catalogNavigationView.catalogEntryView[0]}" />
    Cycle through all userData entries and determine if it is warranty data.  Display the translated typedKey value using the translated values defined in followed by the typedValue
    <div id="Warranty" dojoType="dijit.layout.ContentPane">
    	<c:forEach var="userDataField" items="${catEntry.userData.userDataField}">
    		<c:if test="${userDataField.typedKey == 'WARRANTYTYPE' || userDataField.typedKey == 'WARRANTYTERM' || userDataField.typedKey == 'CAREINSTRUCTION'}">
    			<b><span class="text"><fmt:message key ="${userDataField.typedKey}" bundle="${storeText}" /></span>: </b>${userDataField.typedValue} <br>
  3. Save your changes and close the file.
  4. Start the WebSphere Commerce server.