Welcome Guest Search | Active Topics | Sign In | Register

Callbacks in EO Dialog not working for V6.0.31.2 Options
PThompson
Posted: Tuesday, August 26, 2008 4:32:56 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
Hi,

I've just upgraded to the latest version of Eo v 6.0.31.2 and now have a problem with processing with callbackpanels in a EO Dialog control.

My Dialog control has a callbackpanel around controls in both the content and footer templates (as below). Checkboxes trigger the callbackpanel in the content template to process the enable state of the accept button in the footer template. this was working in the previous version of EO. Now the code is fired but no change is made to the accept button.

Can you tell me what I need to change please.

Dialog

--- Content Template
------------Callbackpanel (groupname = feedcopy)
---------------Controls including checkboxes which are triggers


--- Footer Template
------------Callbackpanel (groupname = feedcopy)
---------------Image controls which are also the accept and cancel buttons for the Dialog
eo_support
Posted: Tuesday, August 26, 2008 7:45:22 AM
Rank: Administration
Groups: Administration

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

We are not aware of any problems or changed on Callback made in 6.0.31. Can you make a test page that demonstrates the problem?

Thanks!
PThompson
Posted: Tuesday, August 26, 2008 8:52:26 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
OK, I've created a sample page that tests this.

How do I upload it to you?
PThompson
Posted: Tuesday, August 26, 2008 9:26:25 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
OK Here is the aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_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="cbpPopup" runat="server" height="150px" width="200px" GroupName="Copy">
<eo:Dialog ID="dlgCopy" runat="server" AcceptButton="imgAcceptBtn" AllowResize="True"
BorderColor="#335C88" BorderStyle="Solid" BorderWidth="1px" CancelButton="imgCancelBtn"
CloseButtonUrl="00070101" ControlSkinID="None" HeaderHtml="Dialog Title" Height="200px"
MinimizeButtonUrl="00070102" ResizeImageUrl="00020014" RestoreButtonUrl="00070103"
ShadowColor="LightGray" ShadowDepth="0" Width="300px">
<FooterTemplate>
<div id="Div2" style="text-align: center">
<eo:CallbackPanel ID="cbpDialogFooter" runat="server" GroupName="FeedCopy" Height="72px" Width="240px">
<asp:ImageButton ID="imgAcceptBtn" runat="server" Enabled="false" AlternateText="Copy Disabled" CommandName="Accept"
Style="width: 140px;height: 33px"
ToolTip="Accept to save booking reference for selected campaign feeds"/>
<asp:ImageButton ID="imgCancelBtn" runat="server" AlternateText="Cancel" CommandName="Cancel"
Style="width: 140px;height: 33px"
ToolTip="Cancel out of saving Booking references for selected campaign feeds"/>
</eo:CallbackPanel>
</div>
</FooterTemplate>
<HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; background-image: url(00070104); padding-bottom: 3px; padding-top: 3px; font-family: tahoma" />
<FooterStyleActive CssText="background-color: #e5f1fd; padding-bottom: 8px;" />
<ContentTemplate>
<eo:CallbackPanel ID="cbpDialogUpdate" runat="server" ClientSideBeforeExecute="CmpgFeedCopyPopupB4ExeHdlr"
GroupName="FeedCopy" Height="287px" Triggers="{ControlID:chkBursts;Parameter:chkBursts}, {ControlID:chkDayParts;Parameter:chkDayParts}"
Width="395px" OnExecute="cbpDialogUpdate_Execute">
Copy From:
<asp:DropDownList ID="DropDownList1" runat="server" Width="100%">
<asp:ListItem>England</asp:ListItem>
<asp:ListItem>France</asp:ListItem>
<asp:ListItem>Italy</asp:ListItem>
<asp:ListItem>Germany</asp:ListItem>
</asp:DropDownList><br />
<br />
Copy To:<br />
<asp:ListBox ID="ListBox1" runat="server" Height="250px" Rows="15" SelectionMode="Multiple"
Width="100%"></asp:ListBox><br />
<hr />
<br />
<div>
<asp:CheckBox ID="chkBursts" runat="server" Style="padding-right: 15px; padding-left: 0px;
float: left; padding-bottom: 15px; padding-top: 0px" Text="Bursts" TextAlign="Left"
Width="165px" />
&nbsp; &nbsp;
<asp:CheckBox ID="chkDayParts" runat="server" Style="padding-right: 0px; padding-left: 0px;
padding-bottom: 5px; padding-top: 0px" Text="Day Parts" TextAlign="Left" />
</div>
<br />
<div id="Div3" runat="server" align="left">
<br />
&nbsp;</div>
</eo:CallbackPanel>
</ContentTemplate>
<ContentStyleActive CssText="border-top: #335c88 1px solid; background-color: #e5f1fd" />
</eo:Dialog>
</eo:callbackpanel>
<br />
<br />
<eo:callbackpanel id="cbpCommand" runat="server" height="150px" width="200px" GroupName="Copy" OnExecute="cbpCommand_Execute" Triggers="{ControlID:imgCopy;Parameter:imgCopy}"><asp:ImageButton id="imgCopy" runat="server" AlternateText="Copy "></asp:ImageButton></eo:callbackpanel>
&nbsp;</div>
</form>
</body>
</html>
PThompson
Posted: Tuesday, August 26, 2008 9:27:19 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
Here's the codebehind:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

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

}
protected void cbpCommand_Execute(object sender, EO.Web.CallbackEventArgs e)
{
PopupCopy();

}

private void PopupCopy()
{
this.dlgCopy.HeaderHtml = "Copy Detail";
this.dlgCopy.IsModal = true;
this.dlgCopy.InitialState = EO.Web.DialogState.Visible;
}
protected void cbpDialogUpdate_Execute(object sender, EO.Web.CallbackEventArgs e)
{
ImageButton btnAccept;
switch (e.Parameter)
{
case "chkBursts":
case "chkDayParts":
btnAccept = (ImageButton)this.dlgCopy.FooterContainer.FindControl("imgAcceptBtn");

if (((CheckBox)this.dlgCopy.ContentContainer.FindControl("chkDayParts")).Checked ||
((CheckBox)this.dlgCopy.ContentContainer.FindControl("chkBursts")).Checked)
{
btnAccept.Enabled = true;
btnAccept.AlternateText = "Copy enabled";
btnAccept.ToolTip = "Copy enabled";

}
else
{
btnAccept.Enabled = false;
btnAccept.AlternateText = "Copy disabled";
btnAccept.ToolTip = "Copy disabled";
}
break;
}
}
}
eo_support
Posted: Tuesday, August 26, 2008 1:02:18 PM
Rank: Administration
Groups: Administration

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

Thanks for the test code. We have looked into the issue and this does appear to be a bug. However it does appear to have always been there and does not appear to have been introduced by the new version. Nevertheless we will try to fix it as soon as possible.

Thanks!
PThompson
Posted: Wednesday, August 27, 2008 3:54:25 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
OK thanks. If it helps it was working in version 6.0.26.2.

In the meantime do you have any idea of timescales for a fix?
PThompson
Posted: Wednesday, August 27, 2008 6:00:28 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
This also affects other object events within the callback within a single template.

E.g A Callbackpanel containing a dropdown list and listbox exist in the content template of a dialog. The dropdown list is a trigger for the callbackpanel, to appy new list items to the listbox ona selected index change.

This scenario does NOT apply also.
eo_support
Posted: Wednesday, August 27, 2008 8:32:16 PM
Rank: Administration
Groups: Administration

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

We have fixed this issue internally. Hopefully we can have a new build this week.

Thanks!
eo_support
Posted: Sunday, August 31, 2008 4:51:03 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that fixed this problem. Please download it from our download page.

Thanks!
PThompson
Posted: Tuesday, September 30, 2008 4:09:20 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
Hi

Thanks for the upgrade. It has resolved the problem.

However a new problem has now arisen client side. If I try to update a Listbox during a callback in a dialog. The changes are not applied. This was working prior to the new version as i used it as a workaround while waiting for the server side fix.


From the example below you will see a that the checkbox can be updated during a client callback of the dropdown list within a dialog but not a listbox.

Here's the code (ASPX, CODEBEHIDE & SCRIPT)

ASPX:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_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>
<script type="text/javascript" src="script.js"></script>

<form id="form1" runat="server">
<div>
<eo:callbackpanel id="cbpPopup" runat="server" height="150px" width="200px" GroupName="Copy">
<eo:Dialog ID="dlgCopy" runat="server" AcceptButton="imgAcceptBtn" AllowResize="True"
BorderColor="#335C88" BorderStyle="Solid" BorderWidth="1px" CancelButton="imgCancelBtn"
CloseButtonUrl="00070101" ControlSkinID="None" HeaderHtml="Dialog Title" Height="200px"
MinimizeButtonUrl="00070102" ResizeImageUrl="00020014" RestoreButtonUrl="00070103"
ShadowColor="LightGray" ShadowDepth="0" Width="300px">
<FooterTemplate>
<div id="Div2" style="text-align: center">
<eo:CallbackPanel ID="cbpDialogFooter" runat="server" GroupName="FeedCopy" Height="72px" Width="240px">
<asp:ImageButton ID="imgAcceptBtn" runat="server" Enabled="false" AlternateText="Copy Disabled" CommandName="Accept"
Style="width: 140px;height: 33px"
ToolTip="Accept to save booking reference for selected campaign feeds"/>
<asp:ImageButton ID="imgCancelBtn" runat="server" AlternateText="Cancel" CommandName="Cancel"
Style="width: 140px;height: 33px"
ToolTip="Cancel out of saving Booking references for selected campaign feeds"/>
</eo:CallbackPanel>
</div>
</FooterTemplate>
<HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; background-image: url(00070104); padding-bottom: 3px; padding-top: 3px; font-family: tahoma" />
<FooterStyleActive CssText="background-color: #e5f1fd; padding-bottom: 8px;" />
<ContentTemplate>
<eo:CallbackPanel ID="cbpDialogUpdate" runat="server" ClientSideBeforeExecute="CopyPopupB4ExeHdlr"
GroupName="FeedCopy" Height="287px"
Triggers="{ControlID:chkBursts;Parameter:chkBursts},&#13;&#10; {ControlID:chkDayParts;Parameter:chkDayParts}, &#13;&#10; {ControlID:lbCopyTo;Parameter:lbCopyTo},&#13;&#10; {ControlID:ddCopyFrom;Parameter:ddCopyFrom}"
Width="395px">
Copy From:
<asp:DropDownList ID="ddCopyFrom" runat="server" Width="100%">
<asp:ListItem>England</asp:ListItem>
<asp:ListItem>France</asp:ListItem>
<asp:ListItem>Italy</asp:ListItem>
<asp:ListItem>Germany</asp:ListItem>
</asp:DropDownList><br />
<br />
Copy To:<br />
<br />
<asp:ListBox ID="lbCopyTo" runat="server" Height="250px" Rows="15"
Width="100%">
<asp:ListItem>France</asp:ListItem>
<asp:ListItem>Italy</asp:ListItem>
<asp:ListItem>Germany</asp:ListItem>
</asp:ListBox>
<br />
<div>


<asp:CheckBox ID="chkBursts" runat="server" Style="padding-right: 15px; padding-left: 0px;
float: left; padding-bottom: 15px; padding-top: 0px" Text="Bursts" TextAlign="Left"
Width="165px" />
&nbsp; &nbsp;
<asp:CheckBox ID="chkDayParts" runat="server" Style="padding-right: 0px; padding-left: 0px;
padding-bottom: 5px; padding-top: 0px" Text="Day Parts" TextAlign="Left" />
</div>
<br />
<div id="Div3" runat="server" align="left">
<br />
&nbsp;</div>
</eo:CallbackPanel>
</ContentTemplate>
<ContentStyleActive CssText="border-top: #335c88 1px solid; background-color: #e5f1fd" />
</eo:Dialog>
</eo:callbackpanel>
<br />
<br />
<eo:callbackpanel id="cbpCommand" runat="server" height="150px" width="200px" GroupName="Copy" OnExecute="cbpCommand_Execute" Triggers="{ControlID:imgCopy;Parameter:imgCopy}"><asp:ImageButton id="imgCopy" runat="server" AlternateText="Copy "></asp:ImageButton></eo:callbackpanel>
&nbsp;</div>
</form>
</body>
</html>


CODEBEHIND

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

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

}
protected void cbpCommand_Execute(object sender, EO.Web.CallbackEventArgs e)
{
PopupCopy();

}

private void PopupCopy()
{
this.dlgCopy.HeaderHtml = "Copy Detail";
this.dlgCopy.IsModal = true;
this.dlgCopy.InitialState = EO.Web.DialogState.Visible;
}

}



SCRIPT
// JScript File

function CopyPopupB4ExeHdlr(callbackPanel)
{
var trigger = callbackPanel.getParam()

switch (trigger)
{
case "ddCopyFrom":
//get list controls
var fromList = document.getElementById("dlgCopy_ctl00_ddCopyFrom");
var toList = document.getElementById("dlgCopy_ctl00_lbCopyTo");

if (fromList == null || toList == null )
{
alert ("ERROR cannot locate list controls. Please contact the system administrator");
return false;
}
//initialise toList
toList.length = 0;

var oOption;

//Apply feeds not selected to to List
for ( var i=0, len=fromList.length; i<len; ++i )
{
if ( fromList.selectedIndex != i)
{
oOption = document.createElement("OPTION");
oOption.value = fromList.options[i].value;
oOption.text = fromList.options[i].text;
toList.options.add(oOption);
}
}

var chkDayparts = document.getElementById("dlgCopy_ctl00_chkDayParts");
chkDayparts.checked = true;

break;

case "chkBursts":
case "chkDayParts":
//get Copy controls
var copyBtn = document.getElementById("dlgCopy_ctl01_imgAcceptBtn");
var chkBursts = document.getElementById("dlgCopy_ctl00_chkBursts");
var chkDayparts = document.getElementById("dlgCopy_ctl00_chkDayParts");


if (copyBtn == null || chkBursts == null || chkDayparts == null )
{
alert ("ERROR cannot locate copy controls. Please contact the system administrator");
return false;
}


if (chkBursts.checked || chkDayparts.checked)
{
copyBtn.alt = "Copy enabled";
copyBtn.disabled = false;
return false
}
else
{
copyBtn.alt = "Copy disabled";
copyBtn.disabled = true;
return false;
}
break;
}
}


eo_support
Posted: Tuesday, September 30, 2008 2:07:45 PM
Rank: Administration
Groups: Administration

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

I believe that is normal. ASP.NET stores the item list in ViewState and when the page posts back, it rebuilds the list based on .aspx and ViewState, at which moment changes you made on the client side becomes irrelavent. ASP.NET controls are designed to bring certain changes on the client side back to the server ---- but only those the control specifically "brings back" to the server. For example, the selected item index for a list box, the text for a text box, etc. Any other changes you made are discarded when the page posts back.

Thanks


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.