窗体 < 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 //在加载完毕前是否禁止操作, 默认 True property LockOnSubmit: Boolean //是否禁止重复提交, 默认 True property StyleSheet: TIWFileReference //要使用的 CSS 文件; 文件须在 wwwroot 下(或嵌套) property ShowHint // property ServerOnResize: Boolean        //暂未使用; only write property 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; //执行一次 OnDefaultAction procedure 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 read property 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 read property Released: Boolean              //是否执行过 Release, 但执行过后很快就 Free 了, 这个属性没多少意义; only read property WebApplication: TIWApplication //only read property FormState: TIWFormState        //当前状态: fsUndefined, fsRendering, fsExecuting, fsCreating, fsCreated; only read property ExecCount: Cardinal            //命令执行次数; only read property AllowPageAccess: Boolean //好像也未使用 property ConnectionMode: TIWConnectionMode //读取连接模式: cmAny, cmSecure, cmNonSecure property PreHeader: TStringList     //插入到 Head 靠前的内容 property ExtraHeader: TStringList  //插入到 Head 靠后的内容 property ContentFiles: TStringList  //包含 js、css  property HiddenFields: TStringList  //隐藏字段 property Title: string     //网页标题 property PreventBackButton: Boolean //是否禁用后退按钮; 默认 False property OnAfterRender: TNotifyEvent //呈现后, 发生在 OnCreate > OnRender 之后 property OnCreate: TNotifyEvent property OnDestroy: TNotifyEvent procedure Hide // procedure Show // procedure Release //释放; 它会先把窗体添加到 WebApplicaiton 内部的列表(FReleasedForms)中, 同时 Hide 掉; 等新的 ActiveForm 就绪后再 Free procedure ReleaseAndRedirect(const aUrl: string) //释放并转向 class function TextToHTMLStringLiteral(const AText: string): string; //在 Html 中有些字符需要转码, 用这个函数很方便 

 

10-06 08:54