I’m trying to grasp the newer programming model (non Access Bean).
In WebSphere Commerce 7 FEP 5, how do I work out the structure of the object retrieved from the GetData tags?
For example in the snippet below, how would I know what the data structure of catalogEntryDetails is? Class Name, methods etc.?
Also could someone explain where the “metaData” field came from? Should that be in the noun definition, or is it something that’s set in code at the mediator layer? I couldn’t see a reference to it as an immediate field in the noun definition….
<c:forEach var="metadata" items="${catalogEntryDetails.metaData}" varStatus="status2">
<c:if test="${metadata.key == 'ThumbnailPath'}">
<c:set var="thumbNail" value="${env_imageContextPath}/${metadata.value}" />
</c:if>
<c:if test="${metadata.key == 'FullImagePath'}">
<c:set var="fullImage" value="${metadata.value}" />
</c:if>
</c:forEach>
catalogEntryDetails object is set from this snippet:
<c:if test="${!empty productId}">
<%-- Try to get it from our internal hashMap --%>
<c:set var="key1" value="${productId}+getCatalogEntryViewAllByID"/>
<c:set var="catalogEntryDetails" value="${cachedCatalogEntryDetailsMap[key1]}"/>
<c:if test="${empty catalogEntryDetails}">
<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType" var="catalogNavigationView"
expressionBuilder="getCatalogEntryViewAllByID" varShowVerb="showCatalogNavigationView" maxItems="1" recordSetStartNumber="0">
<wcf:param name="UniqueID" value="${productId}"/>
<wcf:contextData name="storeId" data="${storeId}" />
<wcf:contextData name="catalogId" data="${catalogId}" />
</wcf:getData>
<wcf:set target = "${cachedCatalogEntryDetailsMap}" key="${key1}" value="${catalogNavigationView.catalogEntryView[0]}"/>
</c:if>
</c:if>
<c:if test="${empty productId && !empty WCParam.partNumber}">
<c:set var="key1" value="${WCParam.partNumber}+getCatalogEntryViewAllByPartnumber"/>
<c:set var="catalogEntryDetails" value="${cachedCatalogEntryDetailsMap[key1]}"/>
<c:if test="${empty catalogEntryDetails}">
<wcf:getData type="com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType" var="catalogNavigationView"
expressionBuilder="getCatalogEntryViewAllByPartnumber" varShowVerb="showCatalogNavigationView" maxItems="1" recordSetStartNumber="0">
<wcf:param name="PartNumber" value="${WCParam.partNumber}" />
<wcf:contextData name="storeId" data="${storeId}" />
<wcf:contextData name="catalogId" data="${catalogId}" />
</wcf:getData>
<c:set var="catalogEntryDetails" value="${catalogNavigationView.catalogEntryView[0]}"/>
<wcf:set target = "${cachedCatalogEntryDetailsMap}" key="${key1}" value="${catalogNavigationView.catalogEntryView[0]}"/>
</c:if>
</c:if>
The best you can do – examine IBM Infocenter. wcf:GetData docs tell us that retrieved result is specified by “type” parameter. In your case it’s “com.ibm.commerce.catalog.facade.datatypes.CatalogNavigationViewType”. Once again open docs for CatalogNavigationViewType. Docs tell us that it’s method getCatalogEntryView():
So that’s the answer to your question:
catalogEntryDetails is an instance of CatalogEntryViewType. For some reason I could not find this interface in IBM docs. But you can still find it in com.ibm.commerce.catalog.facade.datatypes package (located in \WCDE_ENT70\workspace\WC\Catalog-DataObjects.jar)
Here it is:
{
}
The “metaData” field came from this string: