Skip to content

Instantly share code, notes, and snippets.

@behrangsa
Created May 31, 2013 00:49
Show Gist options
  • Save behrangsa/5682329 to your computer and use it in GitHub Desktop.
Save behrangsa/5682329 to your computer and use it in GitHub Desktop.
AbstractViewModel
class AbstractViewModel {
def model
def propertyMissing(String name) {
model.get(name)
}
def methodMissing(String name, args) {
model.invokeMethod(name, args)
}
}
class BPPViewModel extends AbstractViewModel {
def getFoo() {
"foo"
}
}
def businessProfile = new BusinessProfile()
def bppView = new BPPView(businessProfile)
@linhpham
Copy link

Behrang, your code looks incomplete. BPPView class definition is not listed. I'm not sure how BPPView is linked to BPPViewModel. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment