Ext common problem of summing up

scripts / ext / resources / css / ext-all.css / / EXT generic CSS, contains all the style (must)
scripts / ext / resources / css / icon.css / / custom menu item or other storage page icon
scripts / utils / HiTRUST-CMS.css / / old version of the payment system CSS
scripts / ext / ext-base.js / / the framework of basic library (required)
scripts / ext / ext-all.js / / contains all the EXT library (required)
scripts / ext / ext-lang-zh_CN.js / / EXT prompted all the Chinese (required)
Files Ext order to try at least to the top mark for the JS and CSS must be included in the page, and, please note that the order of import, because of ext-all.js is dependent on the ext-base.js, so ext Import-base.js first, js inside styles are used from the ext-all.css, so the first question into allehanda
1: about the trial (docs.js) tab page can not show, or the prohibition of JS solution to the problem, in the instantiated object autoload, scripts need to set up inside the property, the default is false, that is, loading the tab sub-page, non - implementation of javascript, need to be adjusted into as follows:
A: Var autoLoad = (url: heaf, scripts: true);
Of course, can also be nested An iframe ,
B: html: '<iframe src="+url+" width="100%" height="100%"/>',
In that case, it means that every time load EXT library, but a single page become detachable, coupling reduced

2: about email authentication problem
xtype: 'textfield',
fieldLabel: 'E-mail',
id: 'edit_SPEmail',
name: 'sPEmail',
vtype: 'email', / / this can be verified after adding the EMAIL
anchor:'95% '

3: questions about the use of select
/ / Create JSON data
var statusArray = [
[ 'Normal', 'normal'],
[ 'Written off', 'write-off'],
[ 'Freeze', 'freeze']
/ / Use
xtype: 'combo',
store: new Ext.data.SimpleStore ((
fields: [ 'value', 'descp'],
data: statusArray
fieldLabel: 'Status',
loadingText: 'Loading ...',
displayField: 'descp', / / hidden data
valueField: 'value', / / display data
mode: 'local', / / read local data (remote express remote data)
triggerAction: 'all',
id: 'StatusID',
hiddenName: 'StatusName',
editable: true, / / whether you can edit, at the same time this also supports the importation of property search function

4: About text box to enter the basic authentication
allowBlank: false, / / if it is empty, then display a message
minLength: 6, / / at least permit the number of characters
minLengthText: 'Please enter at least 6 characters! ', / / Less than the minimum allowed number of characters, then suggesting that the information
maxLength: 12, / / the maximum allowable number of characters
maxLengthText: 'Please enter up to 50 characters! ', / / More than the maximum allowable number of characters, then suggesting that the information

5: EXT realize how PSOT
Reference code as follows:
buttons: [(
text: 'submit',
handler: function (){// click of a button when the implementation of this function
/ / Verify the validity of
if (win.getComponent ( 'form'). form.isValid ()) (
/ / login as from the id
win.getComponent ( 'form'). form.submit ((
url: 'login_chk.php',
waitTitle: 'tips',
method: 'POST',
waitMsg: 'is log in to verify, please wait ...',
success: function (form, action) (/ / if the successful implementation of post here
var loginResult = action.result.success;
if (loginResult == false) (
/ / Return false if the implementation of login_chk.php here
alert (action.result.message);
) Else if (loginResult == true) (/ / here the successful implementation of
alert (action.result.message);
failure: function (form, action) (/ / not implemented or POST failure, abnormal return
alert (action.result.message);
), (
text: 'Cancel',
handler: function () (simple.form.reset ();}// reset form
Return Backgrounds:
if (authentication success) (
out.print ( "(success: true, message: \" implementation success! \ "}");
) else (
out.print ( "(success: false, message: \" implementation of failure! \ "}");
Of course, we can not use this to use POST, can manually obtain the value of AJAX using DWR and other technology, can also achieve, in fact, the principle is the same, are asynchronous call

6: About garbled garbled solution has always been a headache, especially the JS and page, front and back-office interactions between the proposed uniform coding UTF-8, or GBK, can generally be a good solution, if not can realize a filter, and restoration of a unified information request implementation of the consistency of coding, of course, can also manually change the character encoding format, and then manually decode

7: Why do I set up a text box input prompt unlawful, but it should not display prompt text
Ext.QuickTips.init ();// initialize the display when the mouse stay box, support tips tips
/ / Prompt manner enumeration value of "qtip", "title", "under", "side", id (element id)
Ext.form.Field.prototype.msgTarget = 'side';
Qtip: such as the default "qtip" mouse up is automatically displayed
Side: used more, the right appears a red exclamation point, the mouse up an error prompt
Title: similar to an ordinary HTML control inside the property, as title suggests that the mouse hover on the show
Under: displayed on the control of the following and take the initiative to show that the premise does not require a mouse hover, the text box if you do not set up authentication, fails to show

8: EXT realize how like tested?
/ / form verification vType the default type of support
1.alpha / / can only enter letters, can not enter the others (such as the number of special symbols, etc.)
2.alphanum / / can only enter letters and numbers, are not able to enter other
3.email / / email to verify that the requirements are jack_luoting@126.com format
4.url / / url format to verify that the requirements are http://www.skywin.com format

Custom authentication implementation
/ / First way to add custom Ext.apply the password authentication function (you can also check the other's name)
Ext.apply (Ext.form.VTypes, (password: function (val, field) (/ / val here refers to the text box value, field refers to the text box if (field.confirmTo) (/ / confirmTo is our custom configuration parameters are generally used to preserve other components of the id value
var pwd = Ext.get (field.confirmTo); / / obtain confirmTo that the value of id
return (val == pwd.getValue ());// back comparison value
return true;
/ / Configuration parameters items
items: [(fieldLabel: "Password",
id: "pass1",
anchor: "90%"
), (
fieldLabel: "Confirm password"
id: "pass2",
vtype: "password", / / custom authentication types
vtypeText: "Two password prompts inconsistent unlawful !",//
confirmTo: "pass1", / / To compare another component of id
anchor: "90%"

9: implementation optional display

Examples of optional fieldset is actually take a chechbox, a bit like part of the Forum registration has the kind of information are optional effect, the main knowledge points:
1.checkboxToggle: true / / true then show a checkbox with the fieldset, select the start, otherwise the other hand, defaults to false
2.checkboxName: string / / When the above is true, as the checkbox of the name, form convenient operation
xtype: "fieldset",
checkboxToggle: true, / / key parameters, like the other and previous
checkboxName: "dfdf",
title: "optional information",
defaultType: 'textfield',
width: 330,
autoHeight: true, / / so adaptive to start publishing
items: [(
fieldLabel: "UserName",
name: "user",
anchor: "95%" / / 330px-labelWidth the width of the remaining 95 percent, leaving behind the 5% as mentioned in the verification error
), (
fieldLabel: "PassWord",
inputType: "password", / / password text
name: "pass",
anchor: "95%"

分类:AJAX 时间:2009-03-05 人气:727
blog comments powered by Disqus


  • Send email with Seam 3 Mail and JMS 2012-10-23

    Send email with Seam 3 Mail and JMS Seam 3 Mail module provides simple API to use Java Mail API to send email message. Basic Configuration Assume you have already created a Maven based Java EE 6 application. Add seam mail dependency to your pom.xml f

  • Foxmail mail client launched version 7.0, full support for Exchange accounts 2011-08-16

    China -mail network news recently, Tencent's Foxmail email client launched the latest version, and low-key beta for all users. For now, Foxmail 7.0 version does not support direct checks for updates from version 6.5 upgrade requires the user

  • javascript data validation js legal validation. js email verification. js url validation. js length of the authentication. js digital certification, etc. (pop-up dialog box form) 2009-01-06

    javascript data validation js legal validation, js email validation, js url validation, js length of the validation, js digital certification, etc. (pop-up dialog box form) 2008-11-07 02:51 / ** * To be in English and Chinese characters long * @ Para

  • Principles and implementation of sending and receiving e-mail (POP3, SMTP) [order] 2011-09-16

    <! - Occupational exposure to the recent development of the mailbox, sort learned to note -> Flow diagram of sending and receiving e-mail: Relative to the mail client's process is: Incoming mail - POP3 protocol POP3 (Post Office Protocol 3, Post Off

  • Send mail using common email 2011-05-04

    Finally http://commons.apache.org/email/ package org.Miao.Mail; import org.apache.commons.mail.EmailException; import org.apache.commons.mail.SimpleEmail; public class Mail { public static void main(String[] args) throws EmailException { SimpleEmail

  • Mail system of selection and structure 2011-08-08

    This e-mail system by analyzing the composition of the various parts selection, system architecture analysis and system security settings, a more complete coverage of the entire mail system design process, select or develop the enterprise mail system

  • java mail system 2010-03-29

    Morning classes start: ×××××××××××××××××××××××××××××××××××××××××××××××××× ×××××××××× We require knowledge and recall, as well as telnet to send e-mail process. Review: To specify the smtp server outlook in opening a mailbox server that is Sohu Sohu,

  • java mail api Xiangjie 2010-03-30

    JavaMail API Xiangjie Study: Source: Release Date: April 7, 2007 Views: 26 Abstract: JavaMail API is to read, write, send an electronic message optional package. We use it to build as Eudora, Foxmail, MS Outlook Express mail user agent generally (Mai

  • Mail:: SpamAssassin:: Conf - SpamAssassin Configuration Guide 2010-04-02

    Mail:: SpamAssassin:: Conf - SpamAssassin configuration guide English version of the same address - http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html Revision and the translator Notes 2004/11/13 first release for SpamAssassin

  • various operations javamail mail - sent. deleted. read 2011-05-07

    A: JavaMail API is to read, write, send electronic information optional package. We use it to create as Eudora, Foxmail, MS Outlook Express mail user agents in general (Mail User Agent, referred to as the MUA). Instead of sendmail or other mail trans

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.297 (s). 13 q(s)