1

I want to use the return value of a JS function from java back bean ... I know how to just call the method by this code

public void callJSSnap(ActionEvent actionEvent) {

FacesContext context = FacesContext.getCurrentInstance();
ExtendedRenderKitService erks =
Service.getService(context.getRenderKit(),
       ExtendedRenderKitService.class);

erks.addScript(context, "snap();");


    // Add event code here...
}

its just a void function ... what if I had a javascript function that returns a value and I want to use it in oracle add Java Back bean

1 Answer 1

1

There is no direct assess to javascript from the server.

You have to queue a custom event inside the JS function which passes the result back to the server. This is the typical at:clientListener at:serverListener situation. Check the doc at https://docs.oracle.com/cd/E28280_01/apirefs.1111/e12419/tagdoc/af_serverListener.html

Sign up to request clarification or add additional context in comments.

3 Comments

yeah but I want to have on pause event on af:media but it does not support I think... can I write a on pause function in js for AF:media ??
af:media only is the canvas for a player of your system. ADF doesn't know which player will be used. It's depending on the client system. So, I'm not sure where you want to base the pause event on. What if an image is used? There is no 'pause' button available then.
thank you ... I just wanted to get the second and min of the time that the video stopped ... and I want to do something with that in back bean .. please let me know if there is alternative way that I can save the time stop of a video and use it in oracle adf back bean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.