Skip to main content
1-Visitor
May 17, 2017
Question

Null value for selected ID from NMCommandBean

  • May 17, 2017
  • 1 reply
  • 2637 views

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

1 reply

15-Moonstone
May 18, 2017

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

1-Visitor
May 18, 2017

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,

15-Moonstone
May 18, 2017

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...