使用 IntraWeb (38) - TIWAppForm、TIWForm、TIWBaseHTMLForm、TIWBaseForm

來源:互聯網
上載者:User

標籤:des   style   http   java   color   使用   


表單 < TIWAppForm < TIWForm < TIWBaseHTMLForm < TIWBaseForm.
TIWAppForm 所在單元及繼承鏈:
IWAppForm.TIWAppForm < TIWForm < TIWBaseHTMLForm < TIWBaseForm < TIWModuleDsn < TIWContainer < TIWBaseContainer < TScrollingWinControl < TWinControl < TControl < TComponent < TPersistent < TObject

主要成員:
property OnURLRequest: TOnURLRequest //響應下面的 DoURLRequest 方法procedure DoURLRequest(aRequest: THttpRequest) //執行 OnURLRequest 事件; 如: DoURLRequest(WebApplication.Request);function MessageForm: TIWMessageFormClass  //函數擷取個類而不是對象; 它是個虛函數, 或許是為了在繼承時美化快顯視窗class procedure SetAsMainForm              //設定為主視窗; 須用在 initialization 區class procedure SetURL(const aPath: string; const aDocument: string) //設定虛擬位址class function RequestAuth(aRequest: THttpRequest; var rGroup: string): Boolean//安全判斷; 它是虛函數, 可以繼承並增加安全條件 


TIWForm 所在單元及繼承鏈:
IWForm.TIWForm < TIWBaseHTMLForm < TIWBaseForm < TIWModuleDsn < TIWContainer < TIWBaseContainer < TScrollingWinControl < TWinControl < TControl < TComponent < TPersistent < TObject

{TIWForm = class(TIWBaseHTMLForm, IIWHTML40Container, IIWHTML40Form) //它同時實現了兩個介面}主要成員:
property ActiveControl: TIWCustomControl //當前被啟用的控制項property Background: TIWBackground //背景映像設定property LayoutMgr: TIWContainerLayout   //指定布局管理器property HandleTabs: Boolean //暫未使用property LeftToRight: Boolean //文字方向property LockUntilLoaded: Boolean //在載入完畢前是否禁止操作, 預設 Trueproperty LockOnSubmit: Boolean //是否禁止重複提交, 預設 Trueproperty StyleSheet: TIWFileReference //要使用的 CSS 檔案; 檔案須在 wwwroot 下(或嵌套)property ShowHint //property ServerOnResize: Boolean         //暫未使用; only writeproperty ProgressIndicator: TIWProgressIndicator //指定進度提示器property Theme: string    //暫未使用property XPTheme: Boolean //property JavaScript: TStringList //js 代碼property DocType: string    //現在預設 ; 譬如可以指定為:   property KeepAlive: Boolean //保持啟用, 以保證 Session 不到期; 應該是用在非同步事件用時較長時, 但要慎用, 它會把 SessionTimeout 弄成四百多天; 預設 False;property OnDefaultAction: TNotifyEvent //預設事件; 譬如在 TIWEdit 編輯後斷行符號, 如果沒有給它寫 OnSubmit 事件, 將執行預設事件property OnResize; //在 ServerOnResize 暫時棄用的情況下, 它只執行一次constructor Create(aOwner: TComponent); override;procedure AddToInitProc(const ACode: string); //添加用於初始化的 js 代碼procedure DoDefaultAction; //執行一次 OnDefaultActionprocedure SetIWAJAXNotifier(aIWAJAXNotifier: TIWBaseHTML40Component); //TIWAJAXNotifier 就是調用它和下面的 SendAJAXNotification, 感覺直接調用它們應該比 TIWAJAXNotifier 控制項更靈活.function SendAJAXNotification: Boolean;       //function GetIWAJAXNotificationJSCode: string; //function GetIsStrictMode: Boolean; //好像是判斷是不是 IE 相容模式class function FindParentForm(Control: TControl): TIWForm;property PageContext: TIWPageContext40;        //該對象有更多頁面相關的操作; only readproperty ContainerContext: TIWContainerContext //該對象有更多容器相關的操作property JavaScriptOnce: string //只執行一次的 js 代碼property CacheFiles: TStrings   //快取檔案列表; only read


TIWBaseHTMLForm 所在單元及繼承鏈:
IWBaseHTMLForm.TIWBaseHTMLForm < TIWBaseForm < TIWModuleDsn < TIWContainer < TIWBaseContainer < TScrollingWinControl < TWinControl < TControl < TComponent < TPersistent < TObject

主要成員:
property BGColor: TIWColor    //背景色        property LinkColor: TIWColor  //連結色        property TextColor: TIWColor  //普通文本色    property VLinkColor: TIWColor //訪問過的連結色


TIWBaseForm 所在單元及繼承鏈:
IWBaseForm.TIWBaseForm < TIWModuleDsn < TIWContainer < TIWBaseContainer < TScrollingWinControl < TWinControl < TControl < TComponent < TPersistent < TObject

主要成員:
property FormAction: string  //對應 Html Form 的 action 屬性property Params: TStringList //參數列表, 有點類似 WebApplication.Request.ContentFields, 但後者更全; only readproperty Released: Boolean              //是否執行過 Release, 但執行過後很快就 Free 了, 這個屬性沒多少意義; only readproperty WebApplication: TIWApplication //only readproperty FormState: TIWFormState        //目前狀態: fsUndefined, fsRendering, fsExecuting, fsCreating, fsCreated; only readproperty ExecCount: Cardinal            //命令執行次數; only readproperty AllowPageAccess: Boolean //好像也未使用property ConnectionMode: TIWConnectionMode //讀取串連模式: cmAny, cmSecure, cmNonSecureproperty PreHeader: TStringList    //插入到 Head 靠前的內容property ExtraHeader: TStringList   //插入到 Head 靠後的內容property ContentFiles: TStringList  //包含 js、css property HiddenFields: TStringList  //隱藏欄位property Title: string    //網頁標題property PreventBackButton: Boolean //是否禁用後退按鈕; 預設 Falseproperty OnAfterRender: TNotifyEvent //呈現後, 發生在 OnCreate > OnRender 之後property OnCreate: TNotifyEventproperty OnDestroy: TNotifyEventprocedure Hide //procedure Show //procedure Release //釋放; 它會先把表單添加到 WebApplicaiton 內部的列表(FReleasedForms)中, 同時 Hide 掉; 等新的 ActiveForm 就緒後再 Freeprocedure ReleaseAndRedirect(const aUrl: string) //釋放並轉向class function TextToHTMLStringLiteral(const AText: string): string; //在 Html 中有些字元需要轉碼, 用這個函數很方便

樣本:
//待續...

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.