[CLOSED] TriggerField Text property is empty

  1. #1

    [CLOSED] TriggerField Text property is empty

    Hi!

    TriggerField.Text property is empty in DirectEvents TriggerClick

    I made a little example:

    1 - Run example!
    2 - Click in 'Find' button
    3 - Fill the triggerfield 'Find what?'
    4 - click in 'search' trigger button in trigger field!
    5 - The text you typed in did not return the txtSearchValue.text property

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Test2.aspx.vb" Inherits="WebApplication3.Test2" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
    
        ''ESTES COMANDOS SÃO PERTENCENTES AO GRID E AO STORE, E ESTÃO AQUI PARA ATUALIZAR O MESMO COM A NOVA ESTRUTURA
        Protected Sub Page_Load(sender As Object, E As EventArgs) Handles Me.Load
            If (Not ExtNet.IsAjaxRequest) Then
                           
            End If
        End Sub
        
        Protected Sub txtSearchValue_Click(sender As Object, e As DirectEventArgs)
            Dim mb As Ext.Net.MessageBox = New Ext.Net.MessageBox
            mb.Alert("txtSearchValue.Text", "txtSearchValue.text value is: " & txtSearchValue.Text)
            mb.Show()
        End Sub
        
    </script>
    
    <!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></title>
    </head>
    <body>
        <ext:ResourceManager ID="resManagerSGCO" runat="server" Namespace="SuperaWeb.SGCO" />    
        <form id="form1" runat="server">
            <ext:Panel runat="server" ID="panelExplorerWebTab" Layout="FitLayout" Flex="1">
                <TopBar>
                    <ext:Toolbar ID="tbWebExplorer" runat="server">
                        <Items>
                            <ext:Button ID="btnFind" runat="server" Icon="Find" Text="Find" ToolTip="Find records" >
                                <Menu>
                                    <ext:Menu ID="Menu1" runat="server">
                                        <Items>
                                            <ext:ComboBox ID="cmbSearchField" runat="server" FieldLabel="Find in" LabelWidth="80" Width="265">
                                                <Items>
                                                    <ext:ListItem Text="ID" Value="ID" />
                                                    <ext:ListItem Text="Name" Value="Name" />
                                                </Items>
                                                <SelectedItems>
                                                    <ext:ListItem Text="ID" />
                                                </SelectedItems>
                                            </ext:ComboBox>
                                            <ext:ComboBox ID="cmbSearchMatch" runat="server" FieldLabel="Math" LabelWidth="80" Width="265">
                                                <Items>
                                                    <ext:ListItem Text="Any" Value="Any" />
                                                    <ext:ListItem Text="Start" Value="Start" />
                                                    <ext:ListItem Text="Equal" Value="Equal" />
                                                </Items>
                                                <SelectedItems>
                                                    <ext:ListItem Text="Any" />
                                                </SelectedItems>
                                            </ext:ComboBox>
                                            <ext:TriggerField ID="txtSearchValue" runat="server" FieldLabel="Find what?" LabelWidth="80" Width="265" EmptyText="text/value to search" >
                                                <Triggers>
                                                    <ext:FieldTrigger Icon="Search" />
                                                </Triggers>
                                                <DirectEvents>
                                                    <TriggerClick OnEvent="txtSearchValue_Click" />
                                                </DirectEvents>
                                            </ext:TriggerField>
                                        </Items>
                                    </ext:Menu>
                                </Menu>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                </Items>
            </ext:Panel>
        </form>
    </body>
    </html>
    Last edited by Daniil; Feb 09, 2012 at 9:18 AM. Reason: [CLOSED]
  2. #2
    Please set RenderToForm="true" for Menu, please ensure that form height is enough to show the menu (for example, set height="200" for top panel)
  3. #3
    Hi Vladmir...

    Thanks for your reply!

    I´m following the steps, but not working yet! I forgot something?

    Follow the code with your suggestions.

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Test2.aspx.vb" Inherits="WebApplication3.Test2" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
    
        ''ESTES COMANDOS SÃO PERTENCENTES AO GRID E AO STORE, E ESTÃO AQUI PARA ATUALIZAR O MESMO COM A NOVA ESTRUTURA
        Protected Sub Page_Load(sender As Object, E As EventArgs) Handles Me.Load
            If (Not ExtNet.IsAjaxRequest) Then
                           
            End If
        End Sub
        
        Protected Sub txtSearchValue_Click(sender As Object, e As DirectEventArgs)
            Dim mb As Ext.Net.MessageBox = New Ext.Net.MessageBox
            mb.Alert("txtSearchValue.Text", "txtSearchValue.text value is: " & txtSearchValue.Text)
            mb.Show()
        End Sub
        
    </script>
    
    <!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></title>
    </head>
    <body>
        <ext:ResourceManager ID="resManagerSGCO" runat="server" Namespace="SuperaWeb.SGCO" />    
        <form id="form1" runat="server">
            <ext:Panel runat="server" ID="panelExplorerWebTab" Layout="FitLayout" Height="300">
                <TopBar>
                    <ext:Toolbar ID="tbWebExplorer" runat="server" >
                        <Items>
                            <ext:Button ID="btnFind" runat="server" Icon="Find" Text="Find" ToolTip="Find records" >
                                <Menu>
                                    <ext:Menu ID="Menu1" runat="server" RenderToForm="true">
                                        <Items>
                                            <ext:ComboBox ID="cmbSearchField" runat="server" FieldLabel="Find in" LabelWidth="80" Width="265">
                                                <Items>
                                                    <ext:ListItem Text="ID" Value="ID" />
                                                    <ext:ListItem Text="Name" Value="Name" />
                                                </Items>
                                                <SelectedItems>
                                                    <ext:ListItem Text="ID" />
                                                </SelectedItems>
                                            </ext:ComboBox>
                                            <ext:ComboBox ID="cmbSearchMatch" runat="server" FieldLabel="Math" LabelWidth="80" Width="265">
                                                <Items>
                                                    <ext:ListItem Text="Any" Value="Any" />
                                                    <ext:ListItem Text="Start" Value="Start" />
                                                    <ext:ListItem Text="Equal" Value="Equal" />
                                                </Items>
                                                <SelectedItems>
                                                    <ext:ListItem Text="Any" />
                                                </SelectedItems>
                                            </ext:ComboBox>
                                            <ext:TriggerField ID="txtSearchValue" runat="server" FieldLabel="Find what?" LabelWidth="80" Width="265" EmptyText="text/value to search" >
                                                <Triggers>
                                                    <ext:FieldTrigger Icon="Search" />
                                                </Triggers>
                                                <DirectEvents>
                                                    <TriggerClick OnEvent="txtSearchValue_Click" />
                                                </DirectEvents>
                                            </ext:TriggerField>
                                        </Items>
                                    </ext:Menu>
                                </Menu>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                </Items>
            </ext:Panel>
        </form>
    </body>
    </html>
  4. #4
    I guess you have to wait next public release, we made many changes therefore i cannot post simple fix
    I tested your sample with last code and all works correctly
  5. #5
    Thanks for your reply Vladimir...

    If I download the source again, I already have these changes?

    Thanks for your help!
  6. #6
    Well, no.

    It will be available with the next release which is imminent.
  7. #7
    Ok, thanks for your help ... I'm waiting for the next version then.

Similar Threads

  1. [CLOSED] [1.0] TriggerField TriggerIcon property not working?
    By smmille1 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 25, 2010, 10:00 PM
  2. [CLOSED] Combo SelectedItem.Text Property Empty
    By CMA in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 19, 2010, 10:19 AM
  3. [CLOSED] MultiSelect and text items with comma in Text property
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 15, 2009, 2:30 PM
  4. Property Height - TriggerField
    By Kaido in forum 1.x Help
    Replies: 2
    Last Post: Feb 11, 2009, 4:44 AM

Posting Permissions