heitml Source Display
File: /usr/local/httpd/htdocs/heitml2.0/lib/sesform.hei
// Advanced Form Components for Session Mode
// $Id: sesform.hei,v 1.39 2000/04/30 09:03:50 heitml Exp $
// Copyright (C) 1996-2000 by H.E.I. Informationssysteme GmbH and suppliers.
// This file is part of heitml. All licensing conditions of the
// heitml package apply. See the license file contained in the heitml
// distribution.
<includeonce>//
<include ses.hei>//
<include formbase.hei>//
<
// Form environments
// Session-mode panel.
// Controls' initial values default to VALUE[name].
// STATE is the default for its fields' state attribute.
defenv sespanel **oid value=null state=null @rest ...;
inherit _panelbase;
def save_value name value; /def; // Nothing to do in session mode.
this.form = gl._curpanel.form;
this.state = state;
this.ff=default (value, this.ff, emptytuple);
dopanel;
_marker;
if htmlbool(fieldset);
><fieldset <? rest "Pn">><hei
defbody;
></fieldset><hei
else
defbody;
/if;
/_marker;
/dopanel;
/defenv
// Session-mode form.
// Controls' initial values default to VALUE[name].
// STATE is the default for its fields' state attribute.
// METHOD, ENCTYPE and ACTION are as in HTML's FORM element.
// The init environment of ACTION's <session> element processes
// the control data set, see _formbase for details.
// Optional SUCCESSURI redirects after successful control data set
// processing.
defenv sesform **oid value=null state=null method=null enctype=null successuri=null
action=null onsubmit=null name=null @rest ...;
inherit interactive, _formbase, sespanel; defpara; defcontpara;
// Note: _formbase.check() must override interactive.check(), process() dto.
def onSuccess; /def;
def process msg;
res = _formbase_process (msg); // EXTEND use _formbase.process (msg) when heitml supports this
if this.success && !isnull(this.successuri);
sessionRedirect this.successuri;
/if;
if this.success; onSuccess (); /if;
return res;
/def;
registerme "f";
name = default (name,this._bid);
this.form = this;
this.successuri = successuri;
doformbase value state method enctype action onsubmit name rest;
_marker st="hrtbr" end="hrbbr";
defbody;
/_marker;
/doformbase;
/defenv
>