« Return to Thread: problem with command object missing methods

Re: problem with command object missing methods

by Steve Tekell :: Rate this Message:

Reply to Author | View in Thread


linus1412 wrote:
Are you passing the command object as a param in the action closure?
No I am creating an instance within the action.  This was necessary to achieve array binding.  This has worked for me before.  Did 1.0.2 stop decorating command objects unless they were closure params?
I declared it within the controller.

What I am trying to do is handle the creation of multiple Users at once, the number of which varies given a previous step.  I create an input screen with and a list of Users, with fields like userList[0].name.  My BatchUserCommand just has a list called userList to hold a batch of User domain objects.  For the binding to work I have to prepopulate userList with the right number of new Users before I bind.

Is there a better way to do this?
While all the prepopluation was a hassle, the result was I could validate all the new Users with just batchUserCmd.hasErrors().

thx,

Steve

 « Return to Thread: problem with command object missing methods

LightInTheBox - Buy quality products at wholesale price