[OPEN] [#95] [2.5.3] ValidationStatus shows Message behind Window

Page 1 of 2 12 LastLast
  1. #1

    [OPEN] [#95] [2.5.3] ValidationStatus shows Message behind Window

    Hi,

    I'm creating a registration window with ValidationStatus. But the Message shows behind Window:

    @(Html.X().Window()
        .Icon(Icon.LockGo)
        .ID("RegisterWindow")
        .Title("Register")
        .Closable(false)
        .Resizable(false)
        .Height(230)
        .Width(350)
        .BodyPadding(5)
                .Items(it => 
                    it.Add(Html.X().FormPanel()
                    .ID("registerForm")
                    .Border(false)
                    .Layout("form")
                    .BodyStyle("background:transparent;")
                        .Items(item =>
                                   {
    
                                       item.Add(Html.X().TextField()
                                                    .ID("firstname")
                                                    .FieldLabel("First Name")
                                                    .AllowBlank(false).MsgTarget(MessageTarget.Side)
                                                    .AnchorHorizontal("100%")
                                                    .Focus(true));
                                       item.Add(Html.X().TextField()
                                                    .ID("lastname")
                                                    .AllowBlank(false).MsgTarget(MessageTarget.Side)
                                                    .AnchorHorizontal("100%")
                                                    .FieldLabel("Last Name"));
                                       item.Add(Html.X().TextField()
                                                    .ID("email")
                                                    .Vtype("email")
                                                    .AllowBlank(false).MsgTarget(MessageTarget.Side)
                                                    .AnchorHorizontal("100%")
                                                    .FieldLabel("Email"));
                                       item.Add(Html.X().TextField()
                                                    .ID("newpwd")
                                                    .FieldLabel("Password")
                                                    .AllowBlank(false).MsgTarget(MessageTarget.Side)
                                                    .AnchorHorizontal("100%")
                                                    .InputType(Ext.Net.InputType.Password)
                                           );
                                       item.Add(Html.X().TextField()
                                                    .ID("confirmnewpwd")
                                                    .AllowBlank(false).MsgTarget(MessageTarget.Side)
                                                    .AnchorHorizontal("100%")
                                                    .FieldLabel("Confirm Password")
                                                    .InputType(Ext.Net.InputType.Password)
                                                    .EnableKeyEvents(true)
                                                    .Listeners(l => l.KeyPress.Handler = "if(e.getKey() == Ext.EventObject.ENTER){e.stopEvent();#{btnRegister}.fireEvent('click');}")
                                           );
                                   })
                                   .BottomBar(b => b.Add(Html.X().StatusBar()
                                       .DefaultText("Ready")
                                       .Plugins(p => p.Add(new ValidationStatus() { FormPanelID = "registerForm", ValidIcon = Icon.Accept, ErrorIcon = Icon.Exclamation }))))
                                   )))
    How can I resolve this problem?

    Click image for larger version. 

Name:	ValidationStatus.png 
Views:	141 
Size:	5.5 KB 
ID:	4289
    Last edited by Daniil; Dec 27, 2012 at 5:57 AM. Reason: [OPEN] [#95]
  2. #2
    Hi,

    Thanks for the report. I have report it to Sencha as well.
    http://www.sencha.com/forum/showthre...10568&p=814994

    You can fix it this way.

    Markup
    new ValidationStatus() 
    { 
        FormPanelID = "registerForm", 
        ValidIcon = Icon.Accept, 
        ErrorIcon = Icon.Exclamation,
        ErrorListCls = "x-status-error-list my-fix"
    })
    CSS
    <style type="text/css">
        .my-fix {
            z-index: 99999;
        }
    </style>
  3. #3
    Thanks for your help.
    But when I close the window, the ValidationStatus still exist
  4. #4
    It should be closed manully within a Window Close listener.

    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 v2 Example</title>
    
        <style type="text/css">
            .my-fix {
                z-index: 99999;
            }
        </style>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <ext:Window runat="server">
            <Items>
                <ext:FormPanel ID="FormPanel1" runat="server">
                    <Items>
                        <ext:TextField runat="server" AllowBlank="false" />
                    </Items>
                    <BottomBar>
                        <ext:StatusBar ID="StatusBar1" runat="server">
                            <Plugins>
                                <ext:ValidationStatus 
                                    runat="server" 
                                    FormPanelID="FormPanel1" 
                                    ErrorListCls="x-status-error-list my-fix" />
                            </Plugins>
                        </ext:StatusBar>
                    </BottomBar>
                </ext:FormPanel>
            </Items>
            <Listeners>
                <Close Handler="App.StatusBar1.plugins[0].msgEl.hide();" />
            </Listeners>
        </ext:Window>
    </body>
    </html>
  5. #5
    Thank you,

    I have just updated Ext.net and there are some errors with javascript:

    Uncaught ReferenceError: Ext is not defined ext.axd:63
    Uncaught Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.ux.statusbar.ValidationStatus ext.axd:21
    <style type="text/css">
            .my-fix
            {
                width: 250px;
                z-index: 99999;
            }
        </style>
    .BottomBar(b => b.Add(Html.X().StatusBar().ID("StatusBar1")
                                            .Plugins(p => p.Add(new ValidationStatus()
                                                                    {
                                                                        FormPanelID = "registerForm",
                                                                        ValidIcon = Icon.Accept,
                                                                        ErrorIcon = Icon.Exclamation,
                                                                        ErrorListCls = "x-status-error-list my-fix"
                                                                    }))
                                                                    ))
    All is OK when I comment this code
  6. #6
    Please clarify how did you update? From SVN or Nuget? If Nuget then which package you downloaded via nuget?
  7. #7
    Hi,
    I updated :
    -SVN revision 4063
    -asp.net_mvc_4_rc_for_visual_studio_2010_sp1
    Before I use asp.net mvc 4 beta.
  8. #8
    I cannot reproduce the problem
    Please post own test case
  9. #9
    Here is my test:

    View:
    @using Ext.Net
    @using Ext.Net.MVC
    @{
        Layout = null;
    }
    <!DOCTYPE html>
    <html>
    <head>
        <meta name="viewport" content="width=device-width" />
        <title>Test</title>
        <style type="text/css">
            .my-fix
            {
                width: 250px;
                z-index: 99999;
            }
        </style>
    </head>
    <body>
        <div>
            @Html.X().ResourceManager()
            @(Html.X().Window()
               .ID("RegisterWindow")
               .Title("Register")
               .Height(250)
               .Width(450)
               .BodyPadding(5)
               .Items(it =>
                      it.Add(Html.X().FormPanel()
                                 .ID("registerForm")
                                 .Border(false)
                                 .Layout("form")
                                 .BodyStyle("background:transparent;")
                                 .Items(item =>
                                        item.Add(Html.X().TextField()
                                                     .ID("firstname")
                                                     .FieldLabel("First Name")
                                                     .AllowBlank(false).MsgTarget(MessageTarget.Side)
                                                     .AnchorHorizontal("100%")
                                                     .Focus(true))
                                 )
                                 .BottomBar(b => b.Add(Html.X().StatusBar().ID("StatusBar1")
                                                           .Plugins(p => p.Add(new ValidationStatus()
                                                                                   {
                                                                                       FormPanelID = "registerForm",
                                                                                       ValidIcon = Icon.Accept,
                                                                                       ErrorIcon = Icon.Exclamation,
                                                                                       ErrorListCls = "x-status-error-list my-fix"
                                                                                   }))
                                                     ))
                          )))
        </div>
    </body>
    </html>
    Controllers:
    public ActionResult Test()
            {
                return View();
            }
    Test in Chrome:
    Uncaught ReferenceError: Ext is not defined ext.axd:63
    Uncaught Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.ux.statusbar.ValidationStatusClick image for larger version. 

Name:	Test.png 
Views:	120 
Size:	27.8 KB 
ID:	4317
  10. #10
    Your test case works correctly for me.
    Can you post generated HTML?
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Notification Window shows no Text
    By Peter.Treier in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 19, 2013, 5:35 PM
  2. Replies: 3
    Last Post: Dec 12, 2012, 2:10 PM
  3. [CLOSED] DateField calendar shows behind window
    By jchau in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 09, 2011, 5:37 PM
  4. ext:Store shows error message "Object expected"
    By stephan1985 in forum 1.x Help
    Replies: 0
    Last Post: Jan 09, 2010, 8:38 AM
  5. AutoLoadIFrame - load only when window shows
    By jchau in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Nov 18, 2008, 8:31 AM

Tags for this Thread

Posting Permissions