|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi, I upgraded my EO.Web from version 2010 to 2011, and I think that 2011 version have a bug. See the codes below:
Code: JavaScript
function ShowEmail()
{
var grid = eo_GetObject('grdData'); //This is an EO.Web.Grid object
var item = grid.getSelectedItem();
var cell = null;
var callbp = eo_GetObject('cbpEmailArea'); //This is an EO.Web.CallbackPanel object
var retcallbp = null;
cell = item.getCell(3);
var retcallbp = callbp.execute(cell.getValue(), 'cboEmailArea');
}
Code: HTML/ASPX
<eo:Dialog ID="dlgEmail" runat="server" BackColor="#FFFFD4" ClientSideOnCancel=""
ControlSkinID="None" ForeColor="#003399" HeaderHtml="Pessoas de Contato" Height="96px"
Width="552px">
<HeaderStyleActive CssText="background-image:url('00020311');color:#003399;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:5px;padding-left:8px;padding-right:3px;padding-top:0px;" />
<BorderImages BottomBorder="00020305" BottomLeftCorner="00020304" BottomRightCorner="00020306"
LeftBorder="00020303" RightBorder="00020307" TopBorder="00020310" TopLeftCorner="00020301"
TopLeftCornerBottom="00020302" TopRightCorner="00020309" TopRightCornerBottom="00020308" />
<FooterStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td style="height: 7px">
</td>
<td>
</td>
<td style="width: 20px">
</td>
</tr>
<tr>
<td style="height: 7px">
</td>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td style="padding-right: 8px; vertical-align: middle; width: 150px; height: 7px; text-align: right">
<asp:Label ID="lblCabEmailUnidade" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="8pt" ForeColor="#003399" Text="Unidade:"></asp:Label></td>
<td>
<asp:DropDownList ID="cboEmailUnidade" runat="server" BackColor="White" Font-Names="Verdana"
Font-Size="8pt" ForeColor="#003399" TabIndex="1" Width="270px" >
</asp:DropDownList></td>
<td rowspan="3" style="width: 100px; text-align: right;">
<asp:ImageButton ID="cmdEmailOK" runat="server" Height="24px" ImageUrl="~/GLM/images/ok_c.png"
OnClientClick="javascript: return UnitEmailHide();" TabIndex="-1" Width="24px" />
<asp:ImageButton ID="cmdDelete" runat="server" Height="24px" ImageUrl="~/GLM/images/delete_c.png"
Width="24px" OnClientClick="javascript: return UnitEmailDelete();" TabIndex="-1" />
<asp:ImageButton ID="cmdEmailQuit" runat="server" Height="24px" ImageUrl="~/GLM/images/quit_c.png"
OnClientClick="javascript: return UnitEmailQuit();"
TabIndex="-1" Width="24px" /></td>
</tr>
<tr>
<td style="padding-right: 8px; vertical-align: top; height: 7px; text-align: right">
</td>
<td>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></td>
</tr>
<tr>
<td style="padding-right: 8px; vertical-align: middle; height: 7px; text-align: right">
<asp:Label ID="lblCabEmailArea" runat="server" Font-Bold="True" Font-Names="Verdana"
Font-Size="8pt" ForeColor="#003399" Text="Área Funcional:"></asp:Label></td>
<td>
<eo:CallbackPanel ID="cbpEmailArea" runat="server" AutoDisableContents="True" Height="8px"
Triggers="{ControlID:cboEmailUnidade;Parameter:}" Width="270px">
<asp:DropDownList ID="cboEmailArea" runat="server" BackColor="White" Font-Names="Verdana"
Font-Size="8pt" ForeColor="#003399" TabIndex="2" Width="270px">
</asp:DropDownList><asp:Label ID="lblEspera" runat="server" Font-Size="2pt" ForeColor="#FFFFD4"></asp:Label></eo:CallbackPanel>
</td>
</tr>
</table>
</td>
<td style="width: 20px">
</td>
</tr>
<tr>
<td style="height: 7px">
</td>
<td>
</td>
<td style="width: 20px">
</td>
</tr>
<tr>
<td style="height: 24px; width: 10px;">
</td>
<td style="height: 26px; vertical-align: middle;">
<asp:ImageButton ID="cmdEmailNew" runat="server" Height="24px" ImageUrl="~/GLM/images/insertpeople_c.png"
OnClientClick="javascript: return NewEmail();" Width="24px" TabIndex="-1" />
<asp:ImageButton ID="cmdEmailDelete" runat="server" Height="24px" ImageUrl="~/GLM/images/deletepeople_c.png"
OnClientClick="javascript: return EmailDelete();" Width="24px" TabIndex="-1" /></td>
<td style="height: 22px">
</td>
</tr>
<tr>
<td style="width: 10px; height: 15px">
</td>
<td>
<eo:Grid ID="grdEmail" runat="server" BackColor="#F0F0F0" BorderColor="#C7D1DF"
BorderWidth="1px" ColumnHeaderAscImage="00050303" ColumnHeaderDescImage="00050304"
ColumnHeaderDividerImage="00050302" EnableKeyboardNavigation="True" FixedColumnCount="1"
Font-Bold="False" Font-Italic="False" Font-Names="Verdana" Font-Overline="False"
Font-Size="9pt" Font-Strikeout="False" Font-Underline="False" FullRowMode="False"
GridLineColor="199, 209, 223" GridLines="Both" Height="128px" ItemHeight="19"
Width="552px" TabIndex="3" ClientSideOnCellSelected="CellEmailSelected">
<FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
<ItemStyles>
<eo:GridItemStyleSet>
<ItemStyle CssText="background-color: white" />
<ItemHoverStyle CssText="background-image: url(00050206); background-repeat: repeat-x" />
<SelectedStyle CssText="background-image: url(00050207); background-repeat: repeat-x" />
<CellStyle CssText="padding-left:8px;padding-top:2px; color:#336699;white-space:nowrap;" />
</eo:GridItemStyleSet>
</ItemStyles>
<ColumnTemplates>
<eo:TextBoxColumn>
<TextBoxStyle CssText="border-bottom-color:#7f9db9;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#7f9db9;border-left-style:solid;border-left-width:1px;border-right-color:#7f9db9;border-right-style:solid;border-right-width:1px;border-top-color:#7f9db9;border-top-style:solid;border-top-width:1px;color:#003399;font-family:Verdana;font-size:8pt;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
<CellStyle CssText="color:#003399;" />
</eo:TextBoxColumn>
<eo:DateTimeColumn>
<DatePicker ControlSkinID="None" DayCellHeight="16" DayCellWidth="19" DayHeaderFormat="FirstLetter"
DisabledDates="" OtherMonthDayVisible="True" SelectedDates="" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
TitleRightArrowImageUrl="DefaultSubMenuIcon">
<TodayStyle CssText="font-family: tahoma; font-size: 12px; border-right: #bb5503 1px solid; border-top: #bb5503 1px solid; border-left: #bb5503 1px solid; border-bottom: #bb5503 1px solid" />
<SelectedDayStyle CssText="font-family: tahoma; font-size: 12px; background-color: #fbe694; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
<DisabledDayStyle CssText="font-family: tahoma; font-size: 12px; color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
<PickerStyle CssText="border-bottom-color:#7f9db9;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#7f9db9;border-left-style:solid;border-left-width:1px;border-right-color:#7f9db9;border-right-style:solid;border-right-width:1px;border-top-color:#7f9db9;border-top-style:solid;border-top-width:1px;font-family:Courier New;font-size:8pt;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
<CalendarStyle CssText="background-color: white; border-right: #7f9db9 1px solid; padding-right: 4px; border-top: #7f9db9 1px solid; padding-left: 4px; font-size: 9px; padding-bottom: 4px; border-left: #7f9db9 1px solid; padding-top: 4px; border-bottom: #7f9db9 1px solid; font-family: tahoma" />
<TitleArrowStyle CssText="cursor:hand" />
<DayHoverStyle CssText="font-family: tahoma; font-size: 12px; border-right: #fbe694 1px solid; border-top: #fbe694 1px solid; border-left: #fbe694 1px solid; border-bottom: #fbe694 1px solid" />
<MonthStyle CssText="font-family: tahoma; font-size: 12px; margin-left: 14px; cursor: hand; margin-right: 14px" />
<TitleStyle CssText="background-color:#9ebef5;font-family:Tahoma;font-size:12px;padding-bottom:2px;padding-left:6px;padding-right:6px;padding-top:2px;" />
<OtherMonthDayStyle CssText="font-family: tahoma; font-size: 12px; color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
<DayHeaderStyle CssText="font-family: tahoma; font-size: 12px; border-bottom: #aca899 1px solid" />
<DayStyle CssText="font-family: tahoma; font-size: 12px; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
</DatePicker>
</eo:DateTimeColumn>
<eo:MaskedEditColumn>
<MaskedEdit ControlSkinID="None" TextBoxStyle-CssText="BORDER-RIGHT: #7f9db9 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7f9db9 1px solid; PADDING-LEFT: 2px; PADDING-BOTTOM: 1px; MARGIN: 0px; BORDER-LEFT: #7f9db9 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: #7f9db9 1px solid; font-family:Courier New;font-size:8pt;">
</MaskedEdit>
</eo:MaskedEditColumn>
</ColumnTemplates>
<Columns>
<eo:RowNumberColumn Width="35">
</eo:RowNumberColumn>
<eo:TextBoxColumn DataType="String" HeaderText="Nome" Name="NM_RESPONSABLE_PERSONS"
TextBoxMaxLength="50" Width="220">
</eo:TextBoxColumn>
<eo:TextBoxColumn DataType="String" HeaderText="Email" Name="DS_RESPONSABLE_PERSONS_EMAIL"
TextBoxMaxLength="150" Width="280">
</eo:TextBoxColumn>
</Columns>
<ColumnHeaderStyle CssText="background-image:url('00050301');padding-left:8px;padding-top:2px;font-weight: bold;color:white;" />
</eo:Grid>
</td>
<td>
</td>
</tr>
<tr>
<td style="width: 10px; height: 15px">
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</ContentTemplate>
<ContentStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
</eo:Dialog>
At one point the Javascript function ShowEmail() is called to force the execution of the "cbpEmailArea" CalbackPanel, passing the cell value of the fourth column of the "grdData" Grid as parameter. The "cbpEmailArea" is into the EO.Web.Dialog control "dlgEmail". This work fine in the 2010 version. But, in the 2011 version, only work OK when the value passed as parameter is null. Otherwise, is showed the following error window: Another strange thing is that happening when I edit the ASPX page in Visual Studio. The EO.Web.Dialog "dlgEmail" does not show correctly, showing the following error: Have any relationship with the error? Thanks in advance, Marcelo Camarate
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please post a full test page. We tried your code but we had to remove the code that accesses the Grid since your code does not contain the Grid. Once we remove that code, it works fine.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi, Thanks for your reply. The problem is in a big web application that my company developed. So, I decided to create a small project in ASP.NET/VB.NET to demonstrate the bug. To download the file "2011Test.zip" you can access ftp://ftp.camarate.com.br using the account "eoweb2011" and the password "test2011". When you run the application, if you select any row that has "Functional Area" column equal "All", the server part of the CallbackPanel is performed as show the message "I'm CallbackPanel executed the server side" below the respective Combobox. But, if you select any other row that the column "Functional Area" is different to "All", the first time nothing happens because the CallbackPanel is not executed. After, even selecting any line in the Grid, the CalbackPanel never runs, as shown in the message "Only enter in SHOWEMAIL function in the client side". Regards, Marcelo Camarate
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Please make sure you pass a string to the CallbackPanel's execute. For example, the following code will fail if the Grid cell value is not string:
callbp.execute(cell.getValue(), "cboEmailArea");
To avoid the problem, you can call toString() on the cell value before passing it to the CallbackPanel. We will also change our code to automatically convert it to a string in our next build.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 9/2/2010 Posts: 120
|
Hi eo_suport,
Thanks for your reply. The application is working fine now.
But, just for the record, the EO.Web 2010 version this worked OK.
Regards, Marcelo Camarate
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Thanks for the update. EO.Web 2011 performs some additional conversions (to escape certain characters) on the argument. Previous version does not escape the argument correctly for certain characters. This requires the argument to be passed as string.
Thanks
|
|