Added checkbox list, modified form validation

This commit is contained in:
Severin Münger
2013-09-06 01:20:41 +02:00
parent c67a7f4982
commit 59a12dcac1
7 changed files with 60 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ class
inherit
WSF_MULTI_CONTROL
WSF_MULTI_CONTROL [WSF_CONTROL]
create
make_form_control
@@ -22,8 +22,24 @@ feature {NONE}
tag_name := "form"
end
feature
feature -- Validation
validate: BOOLEAN
do
Result := True
across
controls as c
until
Result = False
loop
-- TODO: Change generic parameter of elm from ANY to <WILDCARD> if something like that is available in Eiffel.
-- Otherwise, check separately for STRING, LIST...
if attached {WSF_FORM_ELEMENT_CONTROL[ANY]} c.item as elem then
if not elem.is_valid then
Result := False
end
end
end
end
end