Calling Javascript in a different window

Hi
I am using Vaadin Flow 13+. I have a two tab web application where the master tab opens a details tab. This works fine - using executeJavaScript I can open a new window. Now on an event from the details tab i want to execute javascript on the master tab. I am able to share messages between the two classes using a observer pattern where the master tab creates an observable that the detail tab class sends update to. I also assign a reference to the UI.getCurrent().getPage() in a local variable for the master tab while launching the details tab.
When i call the executeJavascript on the Page object of master tab however the javascript function is not being called. Any ideas on what could be wrong? Is the Page object ephemeral and not reusable after focus is on the details tab?

Do you have @Push enabled?

anand chavan:
When i call the executeJavascript on the Page object of master tab however the javascript function is not being called.

Can you test if it works when you call it directly without the detail tab being involved? Can you post the code where/how you execute the JS? How does your javascript look like?

Olli Tietäväinen:
Do you have @Push enabled?

i tried it with both @Push and @Push(PushMode.MANUAL) still no call to Javascript.

Kaspar Scherrer:

anand chavan:
When i call the executeJavascript on the Page object of master tab however the javascript function is not being called.

Can you test if it works when you call it directly without the detail tab being involved? Can you post the code where/how you execute the JS? How does your javascript look like?

It does work without the Detailed tab. on the javascript side the first thing i do is to print the message i receive:
const showDetails = async xfdfString => {
console.log(“****!@#@#@! SHOW DETAILS:”+xfdfString);

On the Java side:
@ClientCallable
private void onDocumentLoaded(String xfdf) {
	String annotations = callback.onDocumentLoaded(xfdf);
	page = UI.getCurrent().getPage();
	System.out.println("*** ANAND PAGE :: " + page);
	page.executeJavaScript("showDetails($0)", annotations);
}

public void showDetails(String annotations) {
	if(page!=null) {
		System.out.println("*** ANAND SENDING :: " + page + " :: " + annotations);
		page.executeJavaScript("showDetails($0)", annotations);
	}
	
}

I see the page captured: 
*** ANAND PAGE :: com.vaadin.flow.component.page.Page@24133cbb

And Java invocation of javascript is being done correctly:
*** ANAND SENDING :: com.vaadin.flow.component.page.Page@24133cbb :: <?xml version="1.0" encoding="UTF-8" ?> ...
however the message is not printing on the javascript console.