Small fix removed DOCTYPE

This commit is contained in:
Severin Münger
2013-09-13 00:41:31 +02:00
parent b1cf630443
commit 9c65194d91
3 changed files with 23 additions and 2 deletions

View File

@@ -10,6 +10,9 @@ deferred class
inherit
WSF_STATELESS_CONTROL
redefine
render_tag_with_tagname
end
feature
@@ -62,6 +65,24 @@ feature {WSF_PAGE_CONTROL, WSF_CONTROL} -- STATE MANAGEMENT
state_changes: JSON_OBJECT
feature -- Rendering
render_tag_with_tagname (tag, body, attributes, css_classes_string: STRING): STRING
local
l_attributes: STRING
do
l_attributes := attributes
if not css_classes_string.is_empty then
l_attributes := l_attributes + " class=%"" + css_classes_string + "%""
end
Result := "<" + tag + " id=%"" + control_name + "%" data-name=%"" + control_name + "%" data-type=%"" + generator + "%" " + l_attributes
if body.is_empty and not tag.is_equal ("textarea") then
Result := Result + " />"
else
Result := Result + " >" + body + "</" + tag + ">"
end
end
feature --EVENT HANDLING
handle_callback (cname: STRING; event: STRING)