[CLOSED] Create web server control (composite control)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Create web server control (composite control)

    I created a web server control (composite control) that contains an Ext: TextField.

    The following structure was encapsulated in Web server control:
    <ext:CompositeField ID="CompositeField1" runat="server"
                        FieldLabel="Usuário" LabelAlign="Right" 
                        IndicatorIconCls="form-icon-mandatory" 
                        MsgTarget="Side" Width="227" >
        <Items>
            <ext:TextField ID="TextField1" runat="server"
                 AllowBlank="false" 
                 Width="200" >
            </ext:TextField>
    </ext:CompositeField>
    I have a page that implements the Web server control and an Ex: Button that runs the validation of information.

        <form id="form1" runat="server">
             <ext:ResourceManager ID="ResourceManager1" runat="server"/>
             <ext:Viewport runat="server" ID="ViewPort1" >
                <Items>
                    <ext:FormPanel ID="frmDetails" runat="server" Border="false" BodyStyle="background-color:transparent;"
                                Width="1120" Height="670" >
                        <Items>
                            <ext:Panel ID="Panel1" runat="server" Border="false" EnableViewState="true">
                                <Items>
                                    <ext:Button ID="btnApply" runat="server" Text="Aplicar" IconCls="toolbar-icon-apply-n">
                                        <DirectEvents>
                                            <Click OnEvent="ToolBarClick" Before="return #{frmDetails}.getForm().isValid();">
                                            </Click>
                                        </DirectEvents>
                                    </ext:Button>
                                </Items>
                                <Content>
                                    <Sispro:SUtText ID="SUtText1" runat="server" FieldLabel="teste" Width="100" >
                                    </Sispro:SUtText>
                                </Content>
                            </ext:Panel>
                        </Items>
                    </ext:FormPanel>
                </Items>
            </ext:Viewport>
        </form>
    When I type an invalid content in the text, the field is marked as invalid, but clicking the button "btnApply", the code "getForm().isValid()" returns "true", allowing the execution of the event "ToolBarClick".

    If I place the structure of the "ext:CompositeField" right on the page rather than the Web server control "SUtText1", by clicking the "btnApply", the command "getForm().isValid()" returns "false", not allowing the execution of the event "ToolBarClick". This is the correct procedure.

    I need to implement some code in the web server control for the correct functioning of the "isValid()"?

    Is there any example that makes this type of implementation?
    Last edited by Daniil; May 17, 2011 at 2:07 PM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] Need for a composite control extending Ext.NET
    By Aparna_B in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 10, 2011, 5:38 PM
  2. [CLOSED] [1.0] Help with composite control
    By russ in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 16, 2011, 10:16 AM
  3. Replies: 2
    Last Post: Apr 20, 2010, 1:50 PM
  4. COMPOSITE SERVER SIDE CONTROL(gridPanel)
    By marcmvc in forum 1.x Help
    Replies: 1
    Last Post: Apr 15, 2010, 4:45 PM
  5. Replies: 6
    Last Post: Sep 01, 2009, 1:06 PM

Posting Permissions