-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlovfieldelement.go
52 lines (42 loc) · 1.4 KB
/
lovfieldelement.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package wajaf
type LOVFieldElement NodeDef
func NewLOVFieldElement(id string) LOVFieldElement {
e := NewNode("element", "lovfieldElement")
e.SetID(id)
e.RegisterKnownAttributes([]string{"display", "style", "classname", "left", "width", "right", "top", "height", "bottom",
"size", "visible", "info", "disabled", "readonly", "notnull", "helpmode", "multiselect", "radiobutton"})
// e.RegisterKnownMessages([]string{"defaultvalue", "helpdescription", "statusnotnull", "statuscheck"})
e.RegisterKnownChildren([]string{"options", "code"})
return e
}
/*
namespace wajaf;
class lovfieldElement extends Xelement
{
protected $Options = null;
public function __construct($id = null, $text = null)
{
parent::__construct("lovfieldElement");
$this->registerAttributes( array("size", "visible", "info", "disabled", "readonly", "notnull", "helpmode") );
$this->registerPossibleMessages( array("defaultvalue", "helpdescription", "statusnotnull", "statuscheck") );
$this->setId($id);
$this->setData($text);
}
public function setOptions($options)
{
$this->Options = $options;
}
protected function compilelocal()
{
$txt = "";
if ($this->Options)
{
$txt .= "<options>";
foreach($this->Options as $k => $m)
$txt .= "<option key="".htmlentities($k, ENT_COMPAT, "UTF-8").""><![CDATA[".$m."]]></option>";
$txt .= "</options>";
}
return $txt;
}
}
*/