Created
December 16, 2012 17:16
-
-
Save shout-poor/4309741 to your computer and use it in GitHub Desktop.
Oracle ADF: A method to get a VO from backing bean.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ViewObject getViewObject(String bindingName) { | |
BindingContext ctx = BindingContext.getCurrent(); | |
ControlBinding b = | |
ctx.getCurrentBindingsEntry().getControlBinding(bindingName); | |
if (b == null) { | |
throw new IllegalArgumentException(bindingName + " is not found."); | |
} | |
if (! (b instanceof DCControlBinding)) { | |
throw new IllegalArgumentException(bindingName + " is not DCControlBinding."); | |
} | |
return ((DCControlBinding)b).getViewObject(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment