Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. var stepchild=parent.children.find{ it.id==xInt };
  2. stepchild.metaClass.birthMom=biologicalMothersName;
  3.  
  4. parent.children.each{child->
  5. //when it gets to stepchild no metaclass property birthMom exists....
  6. }
  7.  
  8. var stepchild=parent.children.find{ it.id==xInt };
  9. stepchild.errors.rejectValue('parent',"Not biological parent");
  10.  
  11. parent.children.each{child->
  12. //when it gets to stepchild no errors....
  13. }
  14.  
  15. stepchild.metaClass.setAttribute(stepChild,'birthMom', biologicalMothersName)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement