[CLOSED] Desktop problem & question

Threaded View

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

    [CLOSED] Desktop problem & question

    Hi,

    in my MVC application I have a desktop with the follong DesktopWindow:

     <ext:DesktopWindow 
      ID="winChangePassword" 
      runat="server" 
      Title="Modifica Password" 
      Icon="Lock"
      InitCenter="true"
      ShowInTaskbar="false"       
      Width="490"
      Height="170"
      Modal="true"
      Maximizable="false"
      Minimizable="false"
      Closable="false">
      <AutoLoad Url="/EasyRapp/Home/ChangePassword/" Mode="IFrame" />
     </ext:DesktopWindow>
    and this is the ChangePassword.aspx page:

    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
    <%@ 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 id="PwdHead" runat="server">
            <title></title>
     
            <ext:ResourcePlaceHolder ID="PwdResourcePlaceHolder" runat="server" />
            <script type="text/javascript">
                setButton = function () {
                    var f = PwdMainFormPanel.getForm();
                    btnChangePwdWinOK.setDisabled(!(f.isValid() && f.isDirty()));
                };
                checkPassword = function () {
                    if (newPassword.getValue() != verifyPassword.getValue()) {
                        Ext.Msg.show({
                            title: 'Attenzione',
                            msg: 'Nuova password e verifica password non coincidono.',
                            buttons: Ext.Msg.OK,
                            icon: Ext.MessageBox.WARNING
                        });
                        return false;
                    }
                    if (oldPassword.getValue() == newPassword.getValue()) {
                        Ext.Msg.show({
                            title: 'Attenzione',
                            msg: 'Vecchia password e nuova password devono essere differenti.',
                            buttons: Ext.Msg.OK,
                            icon: Ext.MessageBox.WARNING
                        });
                        return false;
                    }
                    return true;
                };
            </script>
        </head>
        <body>
            <ext:ResourceManager ID="PwdScriptManager" runat="server" RemoveViewState="true"/>
            <ext:ViewPort ID="PwdViewPort" runat="server" Layout="fit">
                <Items>
                    <ext:FormPanel 
                        ID="PwdMainFormPanel"
                        runat="server"
                        FormID="TheChangePasswordForm"
                        Frame="true"
                        MonitorValid="true"
                        MonitorPoll="500"
                        BodyStyle="padding:17px 10px 17px 10px;background-color:transparent;" 
                        Border="false"
                        LabelWidth="120">
                        <Defaults>
                            <ext:Parameter Name="anchor" Value="100%" Mode="Value" />
                        </Defaults>
                        <Items>
                            <ext:TextField
                                ID="oldPassword"
                                runat="server"
                                FieldLabel="Vecchia Password"
                                InputType="Password"
                                AllowBlank="false"
                                MaxLength="40" />
                            <ext:TextField
                                ID="newPassword"
                                runat="server"
                                FieldLabel="Nuova Password"
                                InputType="Password"
                                AllowBlank="false"
                                MaxLength="40" />
                            <ext:TextField
                                ID="verifyPassword"
                                runat="server"
                                FieldLabel="Verifica Password"
                                AllowBlank="false"
                                InputType="Password"
                                MaxLength="40" />
                        </Items>
                        <Buttons>
                            <ext:Button runat="server" ID="btnChangePwdWinOK" Text="Esegui" Icon="Accept">
                                <Listeners>
                                    <Click Fn="checkPassword" />
                                </Listeners>
                                <DirectEvents>
                                    <Click
                                        Url="~/Account/ChangePassword/"
                                        FormID="TheChangePasswordForm"
                                        CleanRequest="true"
                                        Method="POST"
                                        Before="Ext.Msg.wait('Operazione in corso...', 'Modifica Password');"
                                        Success="Ext.Msg.hide();parent.MyDesktop.getDesktop().getManager().getActive().hide();"
                                        Failure="Ext.Msg.show({
                                           title:   'Errore in fase di modifica Password',
                                           msg:     result.errorMessage,
                                           buttons: Ext.Msg.OK,
                                           icon:    Ext.MessageBox.ERROR
                                        });">
                                        <EventMask MinDelay="200" />
                                        <Confirmation ConfirmRequest="true" Title="Modifica Password" Message="Al termine dell'operazione ti verrĂ  nuovamente presentata la maschera di login.<br />Confermi la modifica della password?" />
     
                                    </Click>
                                </DirectEvents>
                            </ext:Button>
                            <ext:Button runat="server" ID="btnChangePwdWinExit" Text="Esci" Icon="ApplicationGo">
                                <Listeners>
                                    <Click Handler="#{PwdMainFormPanel}.getForm().reset();parent.MyDesktop.getDesktop().getManager().getActive().hide();" />
                                </Listeners>
                            </ext:Button>
                        </Buttons>
                        <Listeners>
                            <ClientValidation Fn="setButton" />
                        </Listeners>
                    </ext:FormPanel>
                </Items>
     
                <Listeners>
                    <Show Handler="alert('Hello!');" />
                </Listeners>
     
            </ext:ViewPort>
        </body>
    </html>
    1) When the confirmation message is displayed it's truncated, how you can see in the attached image. How can I display a message larger then the window dimensions?

    2) The ViewPort Show Listener doesn't fire

    3) parent.MyDesktop.getDesktop().getManager().getActi ve().hide(); is the right way to hide the window or there is a simpler way?

    Bye,
    Stefano
    Last edited by Daniil; Mar 08, 2011 at 11:50 AM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] Question about desktop window
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: May 25, 2012, 8:00 AM
  2. [CLOSED] Another question about Desktop Menu
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 19, 2012, 6:14 PM
  3. Desktop Problem
    By snouto in forum 1.x Help
    Replies: 1
    Last Post: May 24, 2010, 10:44 AM
  4. Question about using Desktop control
    By vali1993 in forum 1.x Help
    Replies: 2
    Last Post: Jan 20, 2010, 3:15 PM
  5. [CLOSED] Desktop bug and question.
    By juanpablo.belli@huddle.com.ar in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 09, 2009, 11:40 AM

Posting Permissions