Thursday, 15 July 2010

oracle adf - ADF Mobile: Invoke AMX Page to display on user screen using JavaScript -



oracle adf - ADF Mobile: Invoke AMX Page to display on user screen using JavaScript -

my question simple.

in adf mobile, have html page , there button on it. want run javascript code on button click , navigate amx page. how can accomplish functionality.

thank you!

in button properties in amx page click action listener , create bean , method

add below code in order execute zoomin js function

adfmfcontainerutilities.invokecontainerjavascriptfunction("com.mohamed.ios.feature1", "zoomin", new object[] { }); first parameter: feature id second parameter: javascript function name 3rd parameter: java script function parameters

if it's html page 1 time take button in property inspector under javascript find javascript events can use( if property inspector not visible click view -> property inspector).

you can add together js function in onclick event in js function can utilize below code go feature has amx page.

adf.mf.api.gotofeature("feature0", function(req, res) { alert("gotofeature complete"); }, function(req, res) { alert("gotofeature failed " + adf.mf.util.stringify(res); } );

make sure include js file in feature under content tab.

and in order navigate amx page button on amx page pass flowcase below method

public void donavigation(string flowcase) { adfmfcontainerutilities.invokecontainerjavascriptfunction(adfmfjavautilities.getfeaturename(), "adf.mf.api.amx.donavigation", new object[] { flowcase }); }

the donavigation method calling standard adfm js api called adf.mf.api.amx.donavigation , passes flowcase name it.

oracle-adf oracle-adf-mobile

No comments:

Post a Comment