Class: Wee::Brush::ImageButtonTag

Inherits:
InputTag show all
Defined in:
lib/wee/renderer/html/brushes.rb

Overview

NOTE: The form-fields returned by a image-button-tag is browser-specific. Most browsers do not send the “name” key together with the value specified by “value”, only “name.x” and “name.y”. This conforms to the standard. But Firefox also sends “name”=“value”. This is why I raise an exception from the #value method. Note that it’s neccessary to parse the passed form-fields and generate a “name” fields in the request, to make this image-button work.

Instance Attribute Summary

Attributes inherited from Wee::Brush

#canvas, #parent

Instance Method Summary collapse

Methods inherited from InputTag

#with

Methods inherited from GenericTagBrush

#__action_callback, #__actionurl_callback, #__actionurl_named_callback, #__input_callback, #css_class, #css_class_for, #method_missing, #onclick_callback, #onclick_update, #with

Methods inherited from Wee::Brush

#close, #with

Constructor Details

#initializeImageButtonTag

Returns a new instance of ImageButtonTag.



515
516
517
518
# File 'lib/wee/renderer/html/brushes.rb', line 515

def initialize
  super
  type('image')
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Wee::Brush::GenericTagBrush

Instance Method Details

#value(v) ⇒ Object



522
523
524
# File 'lib/wee/renderer/html/brushes.rb', line 522

def value(v)
  raise "specified value will not be used in the request"
end