lib/gloo/objs/web_svr/page.rb in gloo-3.2.0 vs lib/gloo/objs/web_svr/page.rb in gloo-3.3.0
- old
+ new
@@ -194,20 +194,24 @@
#
def run_on_render
o = find_child ON_RENDER
return unless o
+ @engine.log.debug "running on_render for page"
+
Gloo::Exec::Dispatch.message( @engine, 'run', o )
end
#
# Run the on rendered script if there is one.
#
def run_on_rendered
o = find_child ON_RENDERED
return unless o
+ @engine.log.debug "running on_rendered for page"
+
Gloo::Exec::Dispatch.message( @engine, 'run', o )
end
# ---------------------------------------------------------------------
@@ -319,26 +323,26 @@
#
def render request=nil
@request = request
set_id if @request
- # Set Params before running on render
- params = params_hash
-
run_on_render
return nil if redirect_set?
+ # Set Params before running on render
+ params = params_hash
+
if is_html?
contents = render_html params
elsif is_json?
contents = render_json
elsif is_text?
contents = render_text params
else
@engine.log.error "Unknown content type: #{content_type}"
return nil
end
-
+
run_on_rendered
@request = nil
return nil if redirect_set?
return contents