Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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
Sithik,
Are you interested in editing your post and formatting your java code as such? When editing, choose the Use advanced editor button. After entering that mode, you can highlight your code and click the buttons in the screenshot below to format your code for easier visibility.
Thanks!