Hi,
Scenario:
1. Create WTPart with attachment and new modeled object called lineitems.
Result: Successfully saved WTPart,attachment and line items.
2. Checkout and Edit WTPart and edit attributes, add more attachment and add more line items.
Result: Successfully saved WTPart , attributes and line items.
Issue: Attachment is not getting saved.
here is my code:
@Override
public FormResult doOperation(NmCommandBean paramNmCommandBean, List<ObjectBean> paramList)
throws WTException
{
FormResult localFormResult1 = new FormResult(FormProcessingStatus.SUCCESS);
for (ObjectBean localObjectBean : paramList)
{
Object beanObject = localObjectBean.getObject();
if(beanObject instanceof WTPart)
{
logger.debug("Is Persistable:"+beanObject);
beanObject = PersistenceHelper.manager.save((Persistable)beanObject);
if ((beanObject instanceof RevisionControlled))
{
Mastered localMastered = ((RevisionControlled)beanObject).getMaster();
localMastered = (Mastered)PersistenceHelper.manager.save(localMastered);
break;
} } }
return localFormResult1;
}
Could you please help me to save attachment when we do checkout and edit.
Thanks,
Sithik