Skip to main content
12-Amethyst
Mar 6, 2015 9:54 AM UTC
Solved

How to modify NmCommandBean

Hi,

We have a requirement to set an attribute of a WTPart through some conditions while persisting.

I could able to extend the form processor and can set the new value but unable to update the Key Value of NmCommandBean.

Any insights?

Thanks,

Niranjan M

nmalaAnswer
12-Amethyst
Mar 10, 2015 8:48 AM UTC

Hi Prabhash,

My requirement is to update a soft attribute "XX" of a WTPart while persisting based on the conditions like if number starts with PK then the attribute XX value should set to Phantom etc.

So I thought of changing nmcommandbean by updating the value against the key XX and couldn't achieve this.

As you said there is no need to modify nmcommandbean object, I updated WTPart from ObjectBean by extending doOperation method of FormProcessor and now its working as expected.

Thanks,

Niranjan M

4 replies

1-Visitor
Mar 9, 2015 6:09 PM UTC

Hello Niranjan,

There will be no need to modify the nmcommandbean object.Just try to find out appropriate method to override in your form processor.

If you could elaborate your problem statement in detail, may be I will be able to give you some more info.

Translate
nmala12-AmethystAuthorAnswer
12-Amethyst
Mar 10, 2015 8:48 AM UTC

Hi Prabhash,

My requirement is to update a soft attribute "XX" of a WTPart while persisting based on the conditions like if number starts with PK then the attribute XX value should set to Phantom etc.

So I thought of changing nmcommandbean by updating the value against the key XX and couldn't achieve this.

As you said there is no need to modify nmcommandbean object, I updated WTPart from ObjectBean by extending doOperation method of FormProcessor and now its working as expected.

Thanks,

Niranjan M

Translate
1-Visitor
Mar 10, 2015 11:45 AM UTC

Good to know that you found the solution!

Translate