0

I am using a WebDialogResult defined on a SmartPanel by calling AskExt() that is used to prompt for a password.

Unfortunately, it caches the password that's entered, so it keeps pre-filling the dialog and I want it to be blank every time the dialog is called.

I've tried a variety of different things, such as calling with .AskExt(true), which is supposed to refresh the dialog and invoked .ClearDialog() before calling .AskExt(), and numerous other things including .Cache.Clear(), .Cache.ClearQueryCache(), .Reset(), .Update(new PwdFields()), .Delete(.Current) as well as the more direct .Current.Pwd = null and .Current.Pwd = "", but nothing works.

4

2 回答 2

0

那是浏览器的问题。为了解决它,我建议您在 firefox 或 chrome 开发人员工具栏的帮助下找到控件的 id,并使用将清除值的 javascript。

然后你可以像这样添加jquery:

$( document ).ready(function() {
     $("#ctl00_phG_PXSPanelVerify2_PXFormViewVerify2_CustEdPwd2").focus()
    {
        $("#ctl00_phG_PXSPanelVerify2_PXFormViewVerify2_CustEdPwd2").text("");    
    }
});
于 2015-04-01T10:10:08.053 回答
0

最终,无论何时重新显示,下面的组合始终清除密码对话框。

if (this.PasswordLookup1Status.AskExt(true) == WebDialogResult.OK)
{
    string currentPassword = this.PasswordLookup1Filter.Current.Pwd;
    this.PasswordLookup1Filter.Current.Pwd = "";
    this.PasswordLookup1Filter.Update(this.PasswordLookup1Filter.Current);
    if (currentPassword  == "1234")
    {
        Base.Transactions.Ask("Information", "Password [" + currentPassword  + "] is correct.", MessageButtons.OK);
        Base.Transactions.ClearDialog();
    }
    else
    {
        throw new PXException("Password [" + currentPassword  + "] is incorrect.");
    }
    this.PasswordLookup1Filter.ClearDialog();
}
于 2015-04-10T17:45:33.187 回答