On click of an afcommandButton, I need to open a new tab with a webpage address I fetched from my database. How do I do this in Oracle ADF?
Asked
Active
Viewed 790 times
1 Answers
0
I guess it depends on JDev version. In 11.x use a CommandLink. In 12c use Command Button -- it looks like:
<af:button text="Click Me" id="b1" targetFrame="_blank" destination="#{pageFlowScope.yourbean.publicUrlAccessorSetFromDB}"/>
You can set up a public method in the app module and call it in a taskflow to set the publicUrlAccessorSetFromDB variable before the page loads. Otherwise, you have to let the page load, then have user perform some action to call the backing bean which then retrieves the url and sets it into the variable and refreshes the button programmatically. Or you could put a partial trigger on the button to whatever UI action calls the backing bean.

32U
- 456
- 4
- 15