lib/spiderfw/widget/widget.rb in spiderfw-0.6.26.pre1 vs lib/spiderfw/widget/widget.rb in spiderfw-0.6.26
- old
+ new
@@ -417,11 +417,11 @@
# Instantiates this widget's own subwidgets.
def load_widgets(template=@template)
if self.class.scene_attributes
self.class.scene_attributes.each do |name|
- @scene[name] = instance_variable_get("@#{name}")
+ @scene[name] = instance_variable_get("@#{name}") || attributes[name]
end
end
template.request = @request
template.response = @response
template.runtime_overrides += @runtime_overrides
@@ -754,10 +754,10 @@
end
def set_scene_vars(scene)
if self.class.scene_attributes # Repeat for new instance variables
self.class.scene_attributes.each do |name|
- @scene[name] = instance_variable_get("@#{name}")
+ @scene[name] = instance_variable_get("@#{name}") || attributes[name]
end
end
end
def css_class