Create ADF popup for value change event(For select one choice component).

Add popup and add dialog to inside of the popup,then select popup and add value for binding attribute in mine
#{pageFlowScope.popupBean.myPop}.
private RichPopup myPop = new RichPopup();
public void selectOneChoiceEvent(ValueChangeEvent valueChangeEvent) {
RichPopup.PopupHints ph = new RichPopup.PopupHints();
myPop.show(ph);
}
public void setMyPop(RichPopup myPop) {
this.myPop = myPop;
}
public RichPopup getMyPop() {
return myPop;
}

Oracle ADF - Add new custom attribute for view object using Expression

Oracle ADF Client-side Validators

Oracle ADF Association sample for Department and Employee

Wednesday, April 20, 2011

Oracle ADF - How to instantiate application module

Here are two sample ways to instantiate application module using Bindingcontex Class and Configuration Class.

(1)Using Bindingcontex class: (Have to give DataControler name and AppModuleImpl class )

oracle.adf.model.BindingContext bc = oracle.adf.model.BindingContext.getCurrent();

JUApplication japp = (JUApplication)bc.getCurrentBindingsEntry().get("AppModuleDataControl");

AppModuleImpl am = (AppModuleImpl)japp.getApplicationModule();

(2)Using Configuration class (Have to give path for AppModule and name "AppModuleLocal")

AppModuleImpl am = (AppModuleImpl)oracle.jbo.client.Configuration.createRootApplicationModule("model.am.AppModule",

"AppModuleLocal");

Wednesday, April 6, 2011

Oracle - ADF How to add methodCall in taskFlow

We can add method for taskflow (methodCall component),say add methodCall in between Page A and Page B.Then you have to add following tag in your taskflow's source

<outcome id="__30">
<fixed-outcome>OutComeFromMethodToPageB</fixed-outcome>
</outcome>

Do methodCall implementation in your bean class and add that class to managedBeans.
see image
sample code stuff
<method-call id="methodCall1">
<method>#{pageFlowScope.TestMethodCall.alterStringVal}</method>
<outcome id="__30">
<fixed-outcome>continue2</fixed-outcome>
</outcome>
</method-call>


Monday, April 4, 2011

Oracle ADF - How to access viewScope , pageFlowScope and SessionScope parameters by bean class

(1)PageFlowScope

AdfFacesContext context = AdfFacesContext.getCurrentInstance();

Map pfScope = context.getPageFlowScope();

pfScope.get("paramName");


(2)ViewScope

AdfFacesContext context = AdfFacesContext.getCurrentInstance();

Map vScope = context.getViewScope();

vScope.get("paramName");


(3)SessionScope

FacesContext fctx = FacesContext.getCurrentInstance();

ExternalContext ectx = fctx.getExternalContext();

Map sessionScope = ectx.getSessionMap();

sessionScope.get("paramName");//paramName can be a bean class