Feb 04, 2010, 12:17 PM
[CLOSED] Panel with Layout="Card" in v 1.0
Hello,
I'm having an issue with a Panel with a Layout="Card". We used to have a CardLayout wrap around it and we modified for Coolite v 1.0
Now I'm getting a JavaScript error and I'm not sure what the problems is.
The error is;
When running the application on debug mode (Javascript) it complains on this line
Html
I'm having an issue with a Panel with a Layout="Card". We used to have a CardLayout wrap around it and we modified for Coolite v 1.0
Now I'm getting a JavaScript error and I'm not sure what the problems is.
The error is;
"Object doesn't support this property or method"
this.layout.setActiveItem(a)
Please look at pnlLayout1 Panel control sectionHtml
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectRequestForms.aspx.cs"
Inherits="WebClientTrackerII.App.Projects.RequestForms.ProjectRequestForms" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Register src="DVCWebcast.ascx" tagname="DVCWebcast" tagprefix="uc1" %>
<%@ Register src="Webchat.ascx" tagname="Webchat" tagprefix="uc1" %>
<%@ Register src="Podcast.ascx" tagname="Podcast" tagprefix="uc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../ProjectsStyle.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="projectRequestFormsMr" runat="server" Theme="Gray" />
<ext:Viewport ID="prjctRqstViewport" runat="server">
<Items>
<ext:BorderLayout ID="BorderLayout1" runat="server">
<Center>
<ext:Panel ID="WizardPanel" runat="server" Header="false" BodyStyle="padding:6px;background-color:#dedede;" AutoScroll="true" Layout="Fit">
<TopBar>
<ext:Toolbar ID="topbarTlbr" runat="server" >
<Items>
<ext:Label ID="lblView" runat="server" Text="View :"></ext:Label>
<ext:ToolbarSeparator ID="tlbrSeparator1" runat="server"></ext:ToolbarSeparator>
<ext:ComboBox ID="cmbBoxSelect" runat="server" ReadOnly="true" Disabled="true">
<Items>
<ext:ListItem Text="DVC/Webcast Form" Value="DVCWebcast" />
<ext:ListItem Text="Webchat Form" Value="Webchat" />
<ext:ListItem Text="Podcast Form" Value="Podcast" />
</Items>
<DirectEvents>
<Select OnEvent="cmbBoxSelectEvent">
<ExtraParams>
<ext:Parameter Name="selectedValue" Value="#{cmbBoxSelect}.getValue()" Mode="Raw" />
</ExtraParams>
</Select>
</DirectEvents>
</ext:ComboBox>
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:Panel ID="pnlLayout1" runat="server" Border="false" Header="false" AutoScroll="true" Layout="Card" ActiveIndex="0">
<Items>
<ext:Panel ID="Panel1" runat="server" Border="false" Header="false" AutoScroll="true" Layout="Fit">
<Content>
<%--
<uc1:DVCWebcast ID="DVCWebcast1" runat="server" />
--%>
</Content>
</ext:Panel>
<ext:Panel ID="Panel2" runat="server" Border="false" Header="false" AutoScroll="true">
<Content>
<uc1:Webchat ID="Webchat1" runat="server" />
</Content>
</ext:Panel>
<ext:Panel ID="Panel3" runat="server" Border="false" Header="false" AutoScroll="true" Layout="Fit">
<Content>
<%--
<uc1:Podcast ID="Podcast1" runat="server" />
--%>
</Content>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Panel>
</Center>
</ext:BorderLayout>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Server-Sideusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
namespace WebClientTrackerII.App.Projects.RequestForms
{
public partial class ProjectRequestForms : WebClientTrackerII.App.Projects.ProjectController
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BusinessAccessLayer.Projects.ProjectsBO prjcBO = new BusinessAccessLayer.Projects.ProjectsBO();
string trackernumber = Request.QueryString["trackerNumber"];
string projectTypeName = string.Empty;
if (!string.IsNullOrEmpty(trackernumber))
{
projectTypeName = prjcBO.GetProjectTypeName(trackernumber);
}
switch (projectTypeName)
{
case "DVC/Webcast":
this.cmbBoxSelect.SelectedItem.Value = "DVCWebcast";
this.ChangePanel(0);
break;
case "Webchat":
this.cmbBoxSelect.SelectedItem.Value = "Webchat";
ChangePanel(1);
break;
case "Podcast":
this.cmbBoxSelect.SelectedItem.Value = "Podcast";
ChangePanel(2);
break;
default:
break;
}
}
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void cmbBoxSelectEvent(object sender, DirectEventArgs e)
{
string selectedValue = e.ExtraParams["selectedValue"];
switch (selectedValue)
{
case "DVC/Webcast":
ChangePanel(0);
break;
case "Webchat":
ChangePanel(1);
break;
case "Podcast":
ChangePanel(2);
break;
}
}
protected void ChangePanel(int ActiveIndex)
{
WizardPanel.ActiveIndex = ActiveIndex;
}
}
}