Adapted rendering of multi control
This commit is contained in:
@@ -13,11 +13,11 @@ feature
|
|||||||
|
|
||||||
tag_name: STRING
|
tag_name: STRING
|
||||||
|
|
||||||
css_class: LINKED_LIST[STRING]
|
css_class: LINKED_LIST [STRING]
|
||||||
|
|
||||||
feature {NONE}
|
feature {NONE}
|
||||||
|
|
||||||
make (n,a_tag_name: STRING)
|
make (n, a_tag_name: STRING)
|
||||||
do
|
do
|
||||||
control_name := n
|
control_name := n
|
||||||
tag_name := a_tag_name
|
tag_name := a_tag_name
|
||||||
@@ -72,16 +72,17 @@ feature --EVENT HANDLING
|
|||||||
end
|
end
|
||||||
|
|
||||||
feature
|
feature
|
||||||
render_tag(body,attributes:STRING):STRING
|
|
||||||
|
render_tag (body, attributes: STRING): STRING
|
||||||
do
|
do
|
||||||
Result:="<"+tag_name+" data-name=%"" + control_name + "%" data-type=%""+generator+"%" "+attributes
|
Result := "<" + tag_name + " data-name=%"" + control_name + "%" data-type=%"" + generator + "%" " + attributes
|
||||||
if not body.is_empty then
|
if not body.is_empty then
|
||||||
Result:= Result + " />"
|
Result := Result + " />"
|
||||||
else
|
else
|
||||||
Result:= Result + " >" + body + "</"+tag_name+">"
|
Result := Result + " >" + body + "</" + tag_name + ">"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
render: STRING
|
render: STRING
|
||||||
-- Return html representaion of control
|
-- Return html representaion of control
|
||||||
deferred
|
deferred
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ feature
|
|||||||
loop
|
loop
|
||||||
Result := c.item.render + Result
|
Result := c.item.render + Result
|
||||||
end
|
end
|
||||||
|
Result := render_tag (Result, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
add_control (c: WSF_CONTROL)
|
add_control (c: WSF_CONTROL)
|
||||||
|
|||||||
Reference in New Issue
Block a user