Sep 18, 2009, 6:06 PM
File Path for in Extention Project
I have a VB project: Coolite.Ext.UX - based off of the example found in the Coolite Toolkit. It compiles correctly but I get a JS error Object Expected when adding the 1 extension in the project to a aspx page. When I debug the WebResource file is created but it is empty. I believe that the js file is not getting found.
The css file is Coolite.Ext.Ux -> Extensions/MyPluginPanel/resources/css/mypluginpanel.css
The js file is Coolite.Ext.Ux -> Extensions/MyPluginPanel/resources/mypluginpanel.js
The vb file is Coolite.Ext.Ux -> Extensions/MyPluginPanel/mypluginpanel.vb
code for mypluginpanel.vb
Someone did something very similar with lockinggridpanel and I have modeled after that one also. The only difference I can see is the project name (Coolite.UX) and the folder structure.
Some FilePath variations I have tried with no luck:
/Extensions/MyPluginPanel/MyPluginPanel.js
Extensions/MyPluginPanel/MyPluginPanel.js
../Extensions/MyPluginPanel/MyPluginPanel.js
~/Extensions/MyPluginPanel/MyPluginPanel.js
ux/Extensions/MyPluginPanel/MyPluginPanel.js
Coolite/Ext/UX/Extensions/MyPluginPanel/MyPluginPanel.js
/Coolite/Ext/UX/Extensions/MyPluginPanel/MyPluginPanel.js
I've also tried using Fiddler to see if it could help narrow it down and no luck with that either.
Thanks~
The css file is Coolite.Ext.Ux -> Extensions/MyPluginPanel/resources/css/mypluginpanel.css
The js file is Coolite.Ext.Ux -> Extensions/MyPluginPanel/resources/mypluginpanel.js
The vb file is Coolite.Ext.Ux -> Extensions/MyPluginPanel/mypluginpanel.vb
code for mypluginpanel.vb
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Drawing
Imports Coolite.Ext.Web
<Assembly: WebResource("Coolite.Ext.UX.Extensions.MyPluginPanel.resources.MyPluginPanel.js", "text/javascript")>
<Assembly: WebResource("Coolite.Ext.UX.Extensions.MyPluginPanel.resources.MyPluginPanel.css", "text/css")>
<Designer(GetType(EmptyDesigner))> _
<DefaultProperty("")> _
<Xtype("mypluginpanel")> _
<InstanceOf(ClassName:="Ext.grid.MyPluginPanel")> _
<ClientScript(Type:=GetType(MyPluginPanel), WebResource:="Coolite.Ext.UX.Extensions.MyPluginPanel.resources.MyPluginPanel.js")> _
<ClientStyle(Type:=GetType(MyPluginPanel), WebResource:="Coolite.Ext.UX.Extensions.MyPluginPanel.resources.MyPluginPanel.css")> _
<ToolboxData("<{0}:mypluginpanel runat=""server"" ></{0}:mypluginpanel>")> _
<Description("Testing a plugin Grid Panel")> _
Public Class MyPluginPanel
Inherits Coolite.Ext.Web.GridPanel
Private Sub MyPluginPanel_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
End Sub
End Class
I believe I have to add FilePath:= in the ClientStyle and ClientScript attribute but I can not figure out what it should be. If do have <Assembly: TagPrefix("Coolite.Ext.UX", "ux")> set it the AssemblyInfo.vbSomeone did something very similar with lockinggridpanel and I have modeled after that one also. The only difference I can see is the project name (Coolite.UX) and the folder structure.
Some FilePath variations I have tried with no luck:
/Extensions/MyPluginPanel/MyPluginPanel.js
Extensions/MyPluginPanel/MyPluginPanel.js
../Extensions/MyPluginPanel/MyPluginPanel.js
~/Extensions/MyPluginPanel/MyPluginPanel.js
ux/Extensions/MyPluginPanel/MyPluginPanel.js
Coolite/Ext/UX/Extensions/MyPluginPanel/MyPluginPanel.js
/Coolite/Ext/UX/Extensions/MyPluginPanel/MyPluginPanel.js
I've also tried using Fiddler to see if it could help narrow it down and no luck with that either.
Thanks~