Matched, and now It worked just fine, thanks! By the way, I now tried replacing disableAssignForDelivery with hideAssignForDelivery, and I get a new metamodel validation. Is hide prefix a new 1.10.0 feature not yet available in 1.9.0 ?
Cesar. -----Original Message----- From: Dan Haywood [mailto:[email protected]] Sent: Wednesday, November 4, 2015 4:17 PM To: users Subject: Re: Metamodel validation In 1.9.0 the disable method must match the parameters of the action. So action: public CustomerOrder assignForDelivery(Deliverer deliverer) should have a disable method of: public String disableAssignForDelivery(Deliverer deliverer). I must admit I am always making this mistake myself, so in 1.10.0-SNAPSHOT the framework will also accept the no-arg version (as you've written it). HTH Dan On 4 November 2015 at 21:50, Cesar Lugo <[email protected]> wrote: > Hello, > > > > I have a metamodel validation and I cant find what the issue is. > > > > My code is the following: > > > > //region > assignForDelivery (action) > > @MemberOrder(name="status",sequence = "1") > > @ActionLayout(position = ActionLayout.Position.PANEL_DROPDOWN) > > public CustomerOrder assignForDelivery( > > final @ParameterLayout(named = "Delivered By") Deliverer > deliverer > > ) { > > setDeliveredBy(deliverer); > > setAssignedForDeliveryTime(clockService.nowAsDateTime()); > > setStatus(CustomerOrderStatus.ASSIGNED_FOR_DELIVERY); > > return this; > > } > > > > // disable action dependent on state of object > > public String disableAssignForDelivery() { > > return status.equals(CustomerOrderStatus.ASSIGNED_FOR_DELIVERY) ? > "Customer order is already assigned for delivery" : null; > > } > > //endregion > > > > Then I get the following metamodel validation error: > > > > domainapp.dom.simple.customerorders.CustomerOrder#disableAssignForDelivery: > has prefix disable, is probably a supporting method for a property, > collection or action. If the method is intended to be an action, then > rename and use @ActionLayout(named="...") or ignore completely using > @Programmatic > > > > I have even changed the name of the method and still get the same error. > > > > Cesar. > > > > > > --- > This email has been checked for viruses by Avast antivirus software. > https://www.avast.com/antivirus > --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
