[CLOSED] Issues with Fieldlable in Coolite 1.0

  1. #1

    [CLOSED] Issues with Fieldlable in Coolite 1.0

    Hi Team,

    We are migrating our project from 0.8 to 1.0.while migrating we are facing fallowing issues.

    1.FieldLable value is getting displayed everywhere.we tried with hidelable property ,it works fine but events are not getting fired.if we change fieldlabel tag to text everything works.We are using feildlabel for supporting multiple languages. Fieldlabel contains fixed strings and text contains language variant text.

    2. in menuitem can we active item? Previously we could get it by menu.activeitem. We Want to avoid handler for each checkmenuitem.

    
    
      <ext:Menu ID="mnuTheme" runat="server" HideLabels="true">
                            <DirectEvents>
                                <ItemClick OnEvent="cbTheme_Change">
                                    <EventMask ShowMask="true" />
                                    <ExtraParams>
                                        <ext:Parameter Name="selectedTheme" Value="hdnSelectedItem.getValue()" Mode="Raw">
                                        </ext:Parameter>
                                    </ExtraParams>
                                </ItemClick>
                            </DirectEvents>
                            <Items>
                                <ext:CheckMenuItem ID="CheckMenuItem1" runat="server" IconUrl="common/Images/Blue.png"
                                    Group="theme1" FieldLabel="default" Handler="onThemeItemClick">
                                </ext:CheckMenuItem>
                                <ext:CheckMenuItem ID="CheckMenuItem2" runat="server" IconUrl="common/Images/light-blue.png"
                                    Group="theme1" FieldLabel="blue" Handler="onThemeItemClick">
                                </ext:CheckMenuItem>
                               
                            </Items>
                        </ext:Menu>
    
    //script
    var onThemeItemClick = function(item) {
        switch (item.id) {
            case "CheckMenuItem1":
                hdnSelectedItem.setValue("default");
                break;
            case "CheckMenuItem2":
                hdnSelectedItem.setValue("blue");
                break;
          
        }
    
    }
    Last edited by Daniil; Sep 03, 2010 at 6:26 PM. Reason: [CLOSED]
  2. #2
    Hello!

    The first issue

    Please look at this quote from ExtJS docs
    fieldLabel : String

    The label text to display next to this Component (defaults to '').

    Note: this config is only used when this Component is rendered by a Container which has been configured to use the FormLayout layout manager (e.g. Ext.form.FormPanel or specifying layout:'form').


    The second issue

    What about this event of Menu?
    itemclick : ( Ext.menu.BaseItem baseItem, Ext.EventObject e )
    Fires when a menu item contained in this menu is clicked
    Listeners will be called with the following arguments:
    • baseItem : Ext.menu.BaseItemThe BaseItem that was clicked
    • e : Ext.EventObject
  3. #3
    Hello again!

    Please note there is menuItem name of argument in Ext.Net instead of baseItem in ExtJS.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!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>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" ScriptMode="Debug"/>
        <ext:SplitButton runat="server" Text="Test button">
            <Menu>
                <ext:Menu runat="server">
                    <Items>
                        <ext:CheckMenuItem ID="CheckMenuItem1" runat="server" Text="Item 1"/>
                        <ext:CheckMenuItem ID="CheckMenuItem2" runat="server" Text="Item 2"/>
                    </Items>
                    <Listeners>
                        <ItemClick Handler="alert(menuItem.id)" />
                    </Listeners>
                </ext:Menu>
            </Menu>
        </ext:SplitButton>
        </form>
    </body>
    </html>
  4. #4
    1.FieldLable value is getting displayed everywhere.we tried with hidelable property ,it works fine but events are not getting fired.if we change fieldlabel tag to text everything works.We are using feildlabel for supporting multiple languages. Fieldlabel contains fixed strings and text contains language variant text.
    In Ext.Net a FieldLabel is still showed even if it's out of FormLayout.
    I would suggest you to use your own property for supporting multiple languages purpose. In the markup it can look something like this:

    Example 1
    <ext:CheckMenuItem ID="CheckMenuItem1" runat="server" Text="Item 1" YourProperty="propertyValue"/>
    or

    Example 2
    <ext:CheckMenuItem ID="CheckMenuItem2" runat="server" Text="Item 2">
        <CustomConfig>
            <ext:ConfigItem Name="propertyValue" Value="propertyValue" Mode="Value"/>
        </CustomConfig>
    </ext:CheckMenuItem>
    These ways are identical.

    On server side please use the control's CustomConfig property.

Similar Threads

  1. [CLOSED] IE9 Issues
    By pint in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 19, 2011, 12:03 PM
  2. [CLOSED] IE9 issues
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 13
    Last Post: Mar 28, 2011, 7:06 PM
  3. [CLOSED] Issues when upgrading to coolite 1.0
    By vedagopal2004 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 04, 2010, 2:47 PM
  4. [CLOSED] help files for coolite? (extjs verses coolite)
    By pkellner in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 25, 2008, 12:19 PM
  5. Replies: 5
    Last Post: Sep 19, 2008, 6:21 PM

Posting Permissions