[CLOSED] Coolite.Ext.Web.Menu cast error

  1. #1

    [CLOSED] Coolite.Ext.Web.Menu cast error

    Hi all,

    after update to new revision, I get this error:

    Unable to cast object of type 'Coolite.Ext.Web.Menu' to type
    'Coolite.Ext.Web.Component'


    Am I missing something?

    
    <ext:Button ID="ToolbarSplitQuestionario" Icon="Report" runat="server" Text="QUESTIONARIO"
                        MenuAlign="br-tr">
                        <Menu>
                            <ext:Menu ID="MenuQuestionario" runat="server"></ext:Menu>
                        </Menu>
                    </ext:Button>
    Previously I correctly server side add menu items to ext:Menu, now code breaks.

    Thanx

    Matteo
  2. #2

    RE: [CLOSED] Coolite.Ext.Web.Menu cast error

    Hi Matteo,

    Vladimir and I both tried to reproduce this error but were unable. Could you post a full (but simplified) .aspx sample demonstrating how to reproduce?




    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Coolite.Ext.Web.Menu cast error

    Hi Geoff,

    very hard to say, anyway it gives me always error. Maybe I have some conflicts in my project.
    I'm at revision 870 now.

    I'll try to reproduce my code and let you know.

    Anyway I commited my project from my Vista 32bit to server, and Updated to my Vista 64bit pc, and then I got the error

    very strange.... If there is some DLL conflict I think it should give me several errors, not only the Coolite.Ext.Web.Menu?

    Matteo
  4. #4

    RE: [CLOSED] Coolite.Ext.Web.Menu cast error

    Geoff,

    I replaced the new DLL with the previous one I used and code works fine as expected.
    This is my code:

    In WUC file:

    
    <ext:PagingToolBar ID="PagingTB" runat="server" PageSize="6" StoreID="ricercaStore"
                AfterPageText="di {0}" DisplayMsg="Pagine {0} - {1} di {2}" EmptyMsg="Nessun dato disponibile"
                StyleSpec="color:#425063;">
                <Items>
                    <ext:ToolbarSeparator />
                    <ext:Button ID="ToolbarSplitQuestionario" Icon="Report" runat="server" Text="QUESTIONARIO"
                        MenuAlign="br-tr">
                        <Menu>
                            <ext:Menu ID="MenuQuestionario" runat="server"></ext:Menu>
                        </Menu>
                    </ext:Button>
                    <ext:ToolbarSeparator />
                    
                </Items>
            </ext:PagingToolBar>
    WUC code behind:

    
    private void BuildMenuQuestionario(Coolite.Ext.Web.Menu menu)
            {
                Coolite.Ext.Web.MenuItem _mi;
                Coolite.Ext.Web.Parameter _prm;
                XPCollection<MyLib.crm.questionario.Questionario> _collQuestionario = new XPCollection<MyLib.crm.questionario.Questionario>(this.PersistentSession);
    
                foreach (MyLib.crm.questionario.Questionario quest in _collQuestionario)
                {
                    _mi = new Coolite.Ext.Web.MenuItem();
                    _mi.ID = "mi_" + quest.Oid.ToString();
                    _mi.Icon = Icon.BulletBlue;
                    _mi.Text = "Questionario: " + quest.Titolo;
                    _mi.AjaxEvents.Click.Event += new ComponentAjaxEvent.AjaxEventHandler(this.MenuQuestionario_Click);
                    _prm = new Coolite.Ext.Web.Parameter("prm", quest.Oid.ToString());
                    _mi.AjaxEvents.Click.ExtraParams.Add(_prm);
                    menu.Items.Add(_mi);
                }
            }
    Thanx

    Matteo
  5. #5

    RE: [CLOSED] Coolite.Ext.Web.Menu cast error

    Hi Matteo,

    We have found and fixed the bug, see*http://forums.ext.net/showthread.php...4631-16-1.aspx


    Hope this helps.


    Geoffrey McGill
    Founder
  6. #6

    RE: [CLOSED] Coolite.Ext.Web.Menu cast error

    very good, thanx!

    Matteo

Similar Threads

  1. [CLOSED] PlugIn cast error
    By Edward in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 30, 2010, 11:07 AM
  2. Replies: 4
    Last Post: Apr 12, 2010, 1:01 PM
  3. [CLOSED] Specified cast is not valid runing menu example for v1.0
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 28, 2010, 11:54 AM
  4. Coolite MVC dynamic menu
    By elosegui36 in forum 1.x Help
    Replies: 0
    Last Post: Sep 24, 2009, 1:39 PM
  5. Coolite Menu
    By erey in forum 1.x Help
    Replies: 1
    Last Post: May 18, 2009, 6:09 PM

Posting Permissions