Welcome Guest Search | Active Topics | Sign In | Register

JScript error in CallbackPanel Options
Gunnar
Posted: Saturday, July 18, 2009 6:09:55 AM
Rank: Member
Groups: Member

Joined: 7/17/2009
Posts: 17
I have placed a SlideMenu inside a CallbackPanel. When clicking on a menu item, I get the following clilent side error:

Microsoft JScript runtime error: 'this.biz.style' is null or not an object

Some background:


* The problem only occur with the combination "RaisesServerEvent=true" for the SlideMenu and "ChildrenAsTriggers=true" for the CallbackPanel.

* If I set the "ChildrenAsTriggers=false" for the CallbackPanel, I get the server side event from the SlideMenu as expected, but then I get a full page refresh...

* If I set the "ChildrenAsTriggers=true" for the CallbackPanel and use other controls within the panel (such as Checkbox), the callback is executed without any problems.

* If I set RaisesServerEvent=false" for the SlideMenu I will of course get no postback and no errors.

* If I click "Continue" as response to the client side error message, the execution continues and I get the expected server side events (slide menu click and callbackpanel execute).

Think
Gunnar
Posted: Saturday, July 18, 2009 6:20:54 AM
Rank: Member
Groups: Member

Joined: 7/17/2009
Posts: 17
Additional note: the problem seems to be triggered when "RaisesServerEvent=true" is set on a Top level menu item (an item that should expand in addition to raise an event). Events on leaf nodes doesn't trigger this error.
eo_support
Posted: Saturday, July 18, 2009 7:09:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Can you provide a test page that recreates this problem? We are not able to reproduce the problem in our test environment. Also please check the version you are running and update to the latest if necessary.

Thanks!
Gunnar
Posted: Saturday, July 18, 2009 7:37:44 AM
Rank: Member
Groups: Member

Joined: 7/17/2009
Posts: 17
Running the code below gives the problem when clicking on the "Mail" menu item.

I downloaded the files yesterday. The EO.Web.dll says version 7.0.16.2



Code: C#
using System;

namespace WebApplication1
{
	public partial class _Default : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

		protected void SlideMenu1_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
		{

		}

		protected void CallbackPanel1_Execute(object sender, EO.Web.CallbackEventArgs e)
		{

		}
	}
}





Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px" 
            Width="200px" ChildrenAsTriggers="True" onexecute="CallbackPanel1_Execute">
            <eo:SlideMenu ID="SlideMenu1" runat="server" Width="200px" ControlSkinID="None" 
                onitemclick="SlideMenu1_ItemClick" RaisesServerEvent="True" 
                SlidePaneHeight="170">
                <TopGroup>
                    <Items>
                        <eo:MenuItem LeftIcon-Url="00000506" RaisesServerEvent="True" Text-Html="Mail">
                            <SubMenu>
                                <Items>
                                    <eo:MenuItem LeftIcon-Url="00030404" Text-Html="Drafts">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030408" Text-Html="Inbox">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030409" Text-Html="Journal">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030410" Text-Html="Junk E-mail">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030414" Text-Html="Notes">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030415" Text-Html="Outbox">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030416" Text-Html="Sent Items">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030418" Text-Html="Tasks">
                                    </eo:MenuItem>
                                </Items>
                            </SubMenu>
                        </eo:MenuItem>
                        <eo:MenuItem LeftIcon-Url="00000503" Text-Html="Calendar">
                            <SubMenu>
                                <Items>
                                    <eo:MenuItem LookID="plain_text" 
                                        Text-Html="Place an EO.Web Calendar at here. See the full demo at &lt;a href=&quot;http://www.essentialobjects.com/Demo/Default.aspx?id=SlideMenu_Outlook2003&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.">
                                    </eo:MenuItem>
                                </Items>
                            </SubMenu>
                        </eo:MenuItem>
                        <eo:MenuItem LeftIcon-Url="00000504" Text-Html="Contacts">
                            <SubMenu>
                                <Items>
                                    <eo:MenuItem LeftIcon-Url="00030402" Text-Html="Address Cards">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030402" Text-Html="Detailed Address Cards">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030402" Text-Html="Phone List">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030402" Text-Html="By Category">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030402" Text-Html="By Company">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030402" Text-Html="By Location">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030402" Text-Html="By Follow-up Flag">
                                    </eo:MenuItem>
                                </Items>
                            </SubMenu>
                        </eo:MenuItem>
                        <eo:MenuItem LeftIcon-Url="00000508" Text-Html="Tasks">
                            <SubMenu>
                                <Items>
                                    <eo:MenuItem LeftIcon-Url="00030418" Text-Html="Simple List">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030418" Text-Html="Detailed List">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030418" Text-Html="Active Tasks">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030418" Text-Html="Next Seven Days">
                                    </eo:MenuItem>
                                    <eo:MenuItem LeftIcon-Url="00030418" Text-Html="Overdue Tasks">
                                    </eo:MenuItem>
                                </Items>
                            </SubMenu>
                        </eo:MenuItem>
                        <eo:MenuItem LeftIcon-Url="00000505" Text-Html="Folders">
                            <SubMenu>
                                <Items>
                                    <eo:MenuItem LookID="plain_text" 
                                        Text-Html="Place an EO.Web TreeView at here. See the full demo at &lt;a href=&quot;http://www.essentialobjects.com/Demo/Default.aspx?id=SlideMenu_Outlook2003&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.">
                                    </eo:MenuItem>
                                </Items>
                            </SubMenu>
                        </eo:MenuItem>
                    </Items>
                </TopGroup>
                <LookItems>
                    <eo:MenuItem ItemID="_TopGroup">
                        <SubMenu Style-CssText="border-right: #002d96 1px solid; border-top: #002d96 1px solid; font-weight: bold; font-size: 11px; border-left: #002d96 1px solid; cursor: hand; font-family: tahoma">
                        </SubMenu>
                    </eo:MenuItem>
                    <eo:MenuItem Height="31" HoverStyle-CssText="border-bottom: #002d96 1px solid" 
                        Image-ExpandedUrl="00000502" Image-HoverUrl="00000501" 
                        Image-Mode="ItemBackground" Image-Url="00000500" ItemID="_TopLevelItem" 
                        LeftIcon-Padding-Left="6" 
                        NormalStyle-CssText="border-bottom: #002d96 1px solid">
                        <SubMenu Style-CssText="padding-right: 10px; padding-left: 10px; font-size: 11px; padding-bottom: 2px; padding-top: 2px; border-bottom: #002d96 1px solid; font-family: tahoma">
                        </SubMenu>
                    </eo:MenuItem>
                    <eo:MenuItem Height="20" 
                        HoverStyle-CssText="font-weight: normal; text-decoration: underline" 
                        ItemID="_Default" LeftIcon-Padding-Right="5" 
                        NormalStyle-CssText="font-weight: normal; text-decoration: none">
                    </eo:MenuItem>
                    <eo:MenuItem Height="20" ItemID="plain_text" LeftIcon-Padding-Right="5" 
                        NormalStyle-CssText="font-weight: normal;" Text-NoWrap="False">
                    </eo:MenuItem>
                </LookItems>
            </eo:SlideMenu>
        </eo:CallbackPanel> 
    </div>
    </form>
</body>
</html>



eo_support
Posted: Saturday, July 18, 2009 9:17:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have confirmed this to be a bug and posted a new build (7.0.21) that should fix the issue. Please see your private message for download location.

Note when you have RaisesServerEvent set to true on top level item, the item would not:

1. Automatically expand when clicked. You can manually expand the clicked item with code in your ItemClick handler. It will be something like this:

Code: C#
protected void SlideMenu1_ItemClick(
    object sender, EO.Web.NavigationItemEventArgs e)
{
    e.MenuItem.Expanded = true;
}


2. Play glide effect when the item expands. Because the page is posted back and reloaded as soon as you click the item, the slide menu has no chance to play any effect at all;

Thanks!


Gunnar
Posted: Saturday, July 18, 2009 2:57:38 PM
Rank: Member
Groups: Member

Joined: 7/17/2009
Posts: 17
The fix worked beautifully, thanks Angel

And I appreciate the notes on the "restrictions" in the configuration and the hint about explicitly expanding the node in the click event. Cool.
eo_support
Posted: Saturday, July 18, 2009 3:02:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You are very welcome. Please feel free to let us know if you have any more questions.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.