This content has been marked as final. Show 6 replies
You will encounter error if you are not passing repositoryId to RepositoryFormHandler when requireIdOnCreate is set to true. By default requireIdOnCreate is true and so RepositoryFormHandler expects that you would be passing in a unique repositoryId to it along with other data while submitting your form. It will assign the passed repositoryId to the new item that it is going to create. Make sure that you pass the repositoryId parameter from your form to your RepositoryFormHandler component something like:
<dsp:input type="hidden" bean="atg/dynamo/droplet/RepositoryFormHandler.repositoryId" value="UNIQUE_ID_VALUE"/>
You can make requireIdOnCreate as false if you want auto-generated id to be used when new repository item gets created.
RepositoryFormHandler - It is like a RepositoryItem CRUD handler which provides operations for creating new repository items, updating existing items, and deleting items from the repository. You may use it when your form is directly dealing with a RepositoryItem.
ProfileFormHandler - It provides convenient methods for operating on the user's profile. It can be used to add new profiles, edit the current profile, login and logout.
B2CProfileFormHandler - It is a subclass of ProfileFromHandler and adds some commerce specific operations. The commerce specific additional functionality it provides:
1. During login, the active promotions from the anonymous user copied into the list of active promotions of the persistent user.
2. After the login, the session-scope PricingModelHolder is reinitialized to cache all the promotions for that user.
3. During the user registration and login, any shopping cart created while user was anonymous is changed to be persistent.
4. When user logs in any old shopping cart (Order in INCOMPLETE state) can be loaded into the user's session.
5. Checks whether the user has requested that his billing address be used as the shipping address. If so then copy the billing address field values into the shipping address.
CommerceProfileFormHandler : Have some important methods like postLoginUser (after shopping when anonymous user login then after login it will merge all cart items to user's current order).
And also have some other methods that used in B2CProfileFormHandler like setters/getters for OrderManager, PromotionTools, ShoppingCart etc.
B2CProfileFormHandler :used to manage commerce uesr profile by methods like handleNewAddress, handleEditAddress, handleUpdateAddress, handleUpdateAddressAndMakeDefault, handleChangeAddressNickname, handleRemoveAddress, handleSelectDefaultAddress, handleSetExpressCheckout, handleCreateNewCreditCard, handleRemoveCard ect.