From 422b73058c27114a9d6424b6fdbe16a1fcb22fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Severin=20M=C3=BCnger?= Date: Thu, 5 Sep 2013 15:12:22 +0200 Subject: [PATCH] Adapted rendering of multi control --- library/server/wsf_html/webcontrol/wsf_control.e | 15 ++++++++------- .../wsf_html/webcontrol/wsf_multi_control.e | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/library/server/wsf_html/webcontrol/wsf_control.e b/library/server/wsf_html/webcontrol/wsf_control.e index 92b3ca62..b4b2c791 100644 --- a/library/server/wsf_html/webcontrol/wsf_control.e +++ b/library/server/wsf_html/webcontrol/wsf_control.e @@ -13,11 +13,11 @@ feature tag_name: STRING - css_class: LINKED_LIST[STRING] + css_class: LINKED_LIST [STRING] feature {NONE} - make (n,a_tag_name: STRING) + make (n, a_tag_name: STRING) do control_name := n tag_name := a_tag_name @@ -72,16 +72,17 @@ feature --EVENT HANDLING end feature - render_tag(body,attributes:STRING):STRING + + render_tag (body, attributes: STRING): STRING 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 - Result:= Result + " />" + Result := Result + " />" else - Result:= Result + " >" + body + "" + Result := Result + " >" + body + "" end end - + render: STRING -- Return html representaion of control deferred diff --git a/library/server/wsf_html/webcontrol/wsf_multi_control.e b/library/server/wsf_html/webcontrol/wsf_multi_control.e index ae3bbae2..d82611cc 100644 --- a/library/server/wsf_html/webcontrol/wsf_multi_control.e +++ b/library/server/wsf_html/webcontrol/wsf_multi_control.e @@ -103,6 +103,7 @@ feature loop Result := c.item.render + Result end + Result := render_tag (Result, "") end add_control (c: WSF_CONTROL)