def set_property(name, attr_map, value)
case (name)
when 'action'
@page and raise PropertyError, "conflicted `page' and `action' property at #{widget_id.inspect}"
@href and raise PropertyError, "conflicted `href' and `action' property at #{widget_id.inspect}"
@action = get_property(attr_map, value, 'method', 'eval')
when 'page'
@action and raise PropertyError, "conflicted `action' and `page' property at #{widget_id.inspect}"
@href and raise PropertyError, "conflicted `href' and `page' property at #{widget_id.inspect}"
@page = get_property(attr_map, value, 'string', 'accessor', 'eval')
when 'href'
@action and raise PropertyError, "conflicted `action' and `href' property at #{widget_id.inspect}"
@page and raise PropertyError, "conflicted `page' and `href' property at #{widget_id.inspect}"
@href = get_property(attr_map, value, 'string', 'accessor', 'eval')
when 'target'
@target = get_property(attr_map, value, 'string', 'accessor', 'eval')
when 'string'
@string = get_property(attr_map, value, 'string', 'accessor', 'eval')
when 'query'
@query = get_property(attr_map, value, 'accessor', 'eval')
else
raise PropertyError, "unknown property: #{name.inspect}: at #{widget_id.inspect}"
end
nil
end