Problem creating new Product via BCC using derived properties of type Map

485 views
Skip to first unread message

dave_c

unread,
Oct 15, 2008, 12:20:29 PM10/15/08
to ATG_Tech
Hi all,

We're running in to an issue when trying to create a new Product via
the BCC in the Merch UI. We have created several derived properties to
help implement a localized catalog in en & fr locales.

We get the below stack trace when trying to create a new Product in
the BCC. Also below is our catalog definition for the property in
question which is included in the Versioned module we run with Merch.
The scalar type properties (i.e. just String types) seem to work fine
but the Map types (i.e. 'specifications') are giving us issues.

FYI. We use a programmatic import process to populate catalog data as
well and we don't see the issue when we create product or SKU items
directly in the versioned product catalog via the repo API. Also,
creating product items directly using the ACC on a non-versioned
instance of the application work as well.

Thanks for the help,
Dave

2008-10-09 09:24:38,732 ERROR [org.apache.catalina.core.ContainerBase.
[jboss.web].[localhost].[/AssetManager].[jsp]] Servlet.service() for
servlet jsp threw exception
java.lang.IllegalArgumentException: Property: specifications is not a
writeable property for: product
at atg.repository.dp.DerivedMap.change(DerivedMap.java:114)
at atg.repository.dp.DerivedMap.clear(DerivedMap.java:328)
at
atg.repository.servlet.RepositoryItemEditorImpl.updateMapProperty(RepositoryItemEditorImpl.java:
509)
at
atg.repository.servlet.RepositoryItemEditorImpl.updateItemProperties(RepositoryItemEditorImpl.java:
321)
at
atg.repository.servlet.RepositoryFormHandler.updateItemProperties(RepositoryFormHandler.java:
1674)
at
atg.web.assetmanager.editor.SingleAssetRepositoryFormHandler.addItem(SingleAssetRepositoryFormHandler.java:
887)
at
atg.web.assetmanager.editor.SingleAssetRepositoryFormHandler.handleAdd(SingleAssetRepositoryFormHandler.java:
823)


PRODUCT CATALOG DEFINITION:
<table name="jdi_prd_specs" type="multi" id-column-name="product_id"
multi-column-name="spec_name">
<property name="specifications_en" display-name="Product
Specification" column-name="spec_value" data-type="map"
component-data-type="string" category="Product Spec">
<attribute name="locale" value="en"/>
</property>
</table>
<table name="frjdi_prd_specs" type="multi" id-column-
name="product_id" multi-column-name="spec_name">
<property name="specifications_fr" display-name="Product
Specification" column-name="spec_value" data-type="map"
component-data-type="string" category="Product Spec">
<attribute name="locale" value="fr"/>
</property>
</table>

<property name="specifications" data-type="map" component-data-
type="string" category="Product" >
<derivation method="firstWithLocale">
<expression>specifications_en</expression>
<expression>specifications_fr</expression>
</derivation>
<attribute name="derivationAttribute" value="locale"/>
<attribute name="keyService" value="/atg/userprofiling/
LocaleService"/>
<attribute name="keySubProperty" value="locale"/>
<attribute name="defaultKey" value="en"/>
</property>

Belmont, Adam

unread,
Oct 15, 2008, 3:53:55 PM10/15/08
to atg_...@googlegroups.com
As a workaround you can add the attribute:

writable="false" to your derived property, "specifications".

Like so:

<property name="specifications" writable="false" data-type="map"
component-data- type="string" category="Product" >

Dave Cairns

unread,
Oct 16, 2008, 4:44:06 PM10/16/08
to atg_...@googlegroups.com
Hi Adam,

Thanks...that worked.

Is this a known bug/issue in ATG? This only seems to be an issue in
BCC on multi-valued types, AFAIK. Or is this a documented feature that
I missed somewhere?

Thanks again.
Dave

Belmont, Adam

unread,
Oct 17, 2008, 11:49:27 AM10/17/08
to atg_...@googlegroups.com
It's not a feature. The GSA should report that it's not a "writable"
property to the UI but it doesn't in this case.

-- Adam
Reply all
Reply to author
Forward
0 new messages