Skip to main content
1-Visitor
May 17, 2017 3:09 PM UTC
Question

Null value for selected ID from NMCommandBean

For one of requirement, I have created two tables in wizard through multicomponent config.

Out of which one table has the Action menu with event like "Validate", "Publish" and "Edit Details".

I wrote the "DefaultObjectFormProcessor" for all action event. but once i am trying to get selected object details in doOperation method. Null value returned by all getSelectedXXXX, getNMXXXXX methods of NMCommandBean.

Is it require some settings in case of multicomponentconfig?

your help on that highly appreciated

3 replies

15-Moonstone
May 18, 2017 7:24 AM UTC

Hi,

I use

nmCommandBean.getActionOidsWithWizard()

This returns an array of com.ptc.netmarkets.model.NmOid

NmCommand  has many accessors 🙂

I've explored it with a debugger, to find what to call...

Regards

Translate
1-Visitor
May 18, 2017 7:51 AM UTC

I tried that method too but response remain same i.e. null

I am using multicomponent config. Is it requires any settings in that?

I also tried printing commandbean.getParameterMap. In that map, I am getting value for the all table Ids referenced in wizard.

Is there any way to traverse details for table (WC Java API)?

Regards,

Translate
15-Moonstone
May 18, 2017 2:58 PM UTC

Strange

Each table have their own ids ( defined by setId like below ) ?

final TableConfig table;

table = factory.newTableConfig();

table.setId("myTableID");

and each component must be declared in the jsp view

<%
   ComponentDefinition cdef = (ComponentDefinition) request.getAttribute("componentDefinition");

%>

<mvc:table componentDef="${cdef}" compId="myTableID"/>

This should be enough.

Now it would be intersting to use a debugger to explore what's in nmCommandBean...

Translate