-
Notifications
You must be signed in to change notification settings - Fork 0
/
groupcontainer.go
57 lines (41 loc) · 1.36 KB
/
groupcontainer.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
53
54
55
56
57
package wajaf
type GroupContainer struct {
NodeDef
}
func NewGroupContainer(id string) *GroupContainer {
c := &GroupContainer{
NodeDef: NewNode("container", "groupContainer"),
}
c.SetID(id)
c.RegisterKnownAttributes([]string{"display", "style", "classname", "classnamezone",
"left", "width", "right", "top", "height", "bottom", "haslistener",
"varmode", "varorder", "varkey", "maingroup",
"mode", "authmodes", "key"})
// c.RegisterKnownMessages([]string{"alertmessage", "servermessage", "titleinsert", "titleupdate", "titledelete", "titleview", "insertok", "updateok", "deleteok"})
c.RegisterKnownChildren([]string{"zone", "dataset", "event", "help"})
return c
}
func (c *GroupContainer) NewZone(ztype string, id string) NodeDef {
z := NewGroupZone(ztype, id)
c.AddChild(z)
return z
}
type GroupZone NodeDef
func NewGroupZone(ztype string, id string) GroupZone {
z := NewNode("zone", ztype)
z.SetID(id)
z.RegisterKnownAttributes([]string{"style", "classname", "application", "params"})
z.RegisterKnownChildren([]string{"container", "element", "event", "help"})
return z
}
func (c *GroupContainer) NewDataset(dtype string, data string) NodeDef {
z := NewGroupDataset(dtype, data)
c.AddChild(z)
return z
}
type GroupDataset NodeDef
func NewGroupDataset(dtype string, data string) GroupDataset {
d := NewNode("dataset", dtype)
d.SetData(data)
return d
}