OpenWindow changed in 3.5.7

0
1

Hi guys,

Something has changed in Application.OpenWindow in 3.5.7.
See the attached toy project.
When you run it, press the “Open Window with INITIAL Page” button. A new browser window opens up (correctly) with the InitSecondaryPage loaded in it.

Then type something in the “PageType To Open” textbox (to pass some parameter to the page) and press the “Send LATER Page to Previoulsy Opened Window”.
You will see that the secondary window flickers like refreshing, the address bar changes correctly to the new url, but the content page is not replaced.

This used to work till yesterday when I changed to version 3.5.7 from 3.5.4.

Best,
Alex

 

Attachment
  • You must to post comments
0
0

Thank you Julie!

The problem was I was registering the HashChanged event at the wrong place, somewhere in tha Page, while you do it at the beginning of the Program.Main method. I’ll modify my app according to your example and let you know if there is any other issue.

Thanks agein,
Alex

  • You must to post comments
0
0

Hello,

Here is a sample that uses the Application.HashChanged event. If you set a breakpoint, you can see that the event is being fired.

Attachment
  • You must to post comments
0
0

Hi Alaa,

Thanks for your answer.

But I can’t see how this works. The event does not fire. And probably it shouldn’t as the documentation says clearly “HashChangedEventHandler Fired when the hash part of the URL changes on the client side.” However, what I’m trying to do is navigate the secondary browser window, which was opened earlier, to a new page of my application on the server side.

To describe it simply:
1. I start an application with a page with two buttons, “open initial page” and “open secondary page”.
2. I press the first button which does a
Application.OpenWindow($”{Application.StartupUrl}?type=init”, “Secondary”, “resizable=0, fullscreen, top=100, screenX=3000, width=800, height=1200”, null); and opens a second browser window going through the Program.cs Main function, finds the argument “init” and sends an “InitSecondaryPage” to the newly opened window.
3. I press the second button which does a
Application.Navigate($”{Application.StartupUrl}?type=later”, “Secondary”, null);
I can see the url changing in the address bar of the second browser window but the flow does not go through the Program’s Main function to detect the argument “later”.

I have tried registering the Application.HashChanged event, but as I said it does not fire.

So what is the best way to instruct the second browser window to load a new page of my application by pressing a button in the main browser window?

Best,
Alex

  • You must to post comments
0
0

Hi Alex,

The old behavior was, infact, a bug that was fixed in version 3.5.5 .

Before the fix, anytime you would change the url a new session would be created, right now, it would just refresh the application.

The right thing to do in this case, is to handle the Application.HashChanged event and navigate your application using combination of both hashes and queries.

 

Best regards,

Alaa

  • You must to post comments
0
0

Hi Alex,

I’ve used your sample and monitored the described changes starting with Wisej.NET 3.5.5
We’ll investigate and update you on this.

Best regards
Frank

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.