Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Opera Browser issue in JavaApplet Mode (Read 4795 times)
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Opera Browser issue in JavaApplet Mode
Apr 27th, 2009 at 8:59pm
Print Post  
Hello, I know you guys have stated that only IE and firefox are supported in javaapplet mode. Yet, when I test other browsers, such as Chrome, work as well. I just thought it might be worth mentioning that if you select some node in the diagram and then postback, accessing the selected objects server-side is not there for Opera as it is with other browsers. The selected item count always comes back as 0. I am not sure if you guys have plans on supporting Opera or not, but it might be nice:). In any case, if you do, this is an issue.
Thanks,
jay
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Opera Browser issue in JavaApplet Mode
Reply #1 - Apr 28th, 2009 at 7:41am
Print Post  
Hi Jay,

Is postback done from the NodeSelected script you posted a few weeks ago, or through some other ui element?

Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: Opera Browser issue in JavaApplet Mode
Reply #2 - Apr 28th, 2009 at 1:36pm
Print Post  
Hey Stoyan, Here is the code:
aspx:
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="scriptmanager">
    </asp:ScriptManager>
           <div style="width:600px; height:600px">
               <ndiag:DiagramView runat="server" ID="diagView" AutoScroll="true" Height="100%" Width="100%"  ClientSideMode="JavaApplet" >
                  <Diagram AllowSelfLoops="false" AutoResize="RightAndDown"
                  RouteLinks="true"  />
               </ndiag:DiagramView>
           </div>
           <asp:Button runat="server" ID="btnPost" Text="Post" />   
    </form>
</body>


aspx.vb:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      If Not IsPostBack Then
           Dim onode1 As MindFusion.Diagramming.DiagramNode
           Dim onode2 As MindFusion.Diagramming.DiagramNode
          onode1 = diagView.Diagram.Factory.CreateShapeNode(10, 10, 25, 25)
           onode2 = diagView.Diagram.Factory.CreateShapeNode(50, 50, 25, 25)
           diagView.Diagram.Factory.CreateDiagramLink(onode1, onode2)
           diagView.Diagram.Selection.AllowMultipleSelection = True
      End If
    End Sub

    Private Sub btnPost_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPost.Click
       Dim iCnt As Integer
       iCnt = diagView.Diagram.Selection.Items.Count
    End Sub


Notice that icnt is always zero even if one or more nodes have been selected and you then postback by clicking the button.

jay
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Opera Browser issue in JavaApplet Mode
Reply #3 - Apr 29th, 2009 at 9:13am
Print Post  
The problem is much worse than that Sad The code that saves the diagram to send it to the server when doing postback is not executed at all under Opera, and for example if you draw some new items on the client side, they will disappear after postback. We'll investigate this as soon as possible.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Opera Browser issue in JavaApplet Mode
Reply #4 - May 4th, 2009 at 4:37pm
Print Post  
This version should fix the Opera postback problem:
https://mindfusion.eu/_beta/netdiag103beta.zip

Opera does not allow accessing fields of Java classes from JavaScript, but only methods, so we have updated a few scripts that access fields to call methods instead. The changed scripts are a part of the assembly resources, and might require you to clean the browser and server caches again until the correct version appears...

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: Opera Browser issue in JavaApplet Mode
Reply #5 - May 4th, 2009 at 6:07pm
Print Post  
Hey Stoyan, I am getting a script error with the new dlls. It breaks on the following:

function WebForm_OnSubmit() {
MindFusion.onFormSubmitApplet('diagView', '_mfusion_diagView_Data');
return true;

The error states 'Mindfusion' is undefined.

I reset iis, deleted all of my temporary asp.net files, deleted all temporary internet files, and even rebooted. I still seem to get that error. I even created a new web app and referenced the new dlls but still get that script error.
Below is my code, when I postback by clicking btntest I get the error:


<body style="background-color:#CCCCCC">
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="scriptmanager" AsyncPostBackTimeout="300">
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="up1">
       <ContentTemplate>
           <ndiag:DiagramView runat="server" ID="diagView" AutoScroll="true" Height="500px" Width="500px"  ClientSideMode="JavaApplet"
             >
               <Diagram AllowSelfLoops="false" TextColor="White" DefaultShape="Rectangle" AutoResize="RightAndDown" LinkCrossings="Arcs"
                RouteLinks="true"  />
           </ndiag:DiagramView>
           <ndiag:Overview ID="ovw" runat="server" DiagramViewID="diagView" Height="100px" Width="100px"  />
           <asp:Button runat="server" ID="btntest" Text="test" />
       </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>



This error also seems to be happening in all browsers.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Opera Browser issue in JavaApplet Mode
Reply #6 - May 4th, 2009 at 6:59pm
Print Post  
Have you also replaced the applet's .jar file with the one from the archive?
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: Opera Browser issue in JavaApplet Mode
Reply #7 - May 4th, 2009 at 7:27pm
Print Post  
Oh yeah. I definitely did that. I think it had something to do with this:

http://dotnetslackers.com/JavaScript/re-57918_ScriptResource_axd_and_and_assemblies_built_in_the_future.aspx

It seems if the dlls are compiled in the future, there can be problems. When I set the date on my computer to a future date, I no longer get the script error. Because you are in a different time zone than I, the dlls were compiled in the future.

I think tommorrow everything will be working fine. I'll keep you posted. Thanks.

jay
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Opera Browser issue in JavaApplet Mode
Reply #8 - May 5th, 2009 at 8:02am
Print Post  
yep, we've tried it from a past date and seems that's the problem; so you have solved this longstanding mystery Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint