Class: SWS::TextArea

Inherits:
FormElement show all
Defined in:
lib/sws/Core/components/TextArea/TextArea.rb

Overview

Represents <TEXTAREA> tag
Bindings:

  • value (required,settable) - contents of the tag

  • cols - number of textarea cols

  • rows - number of textarea rows

  • other_tag_string - generic string to add to the tag

Instance Attribute Summary

Attributes inherited from Component

#action_components, #definition_component, #encoding, #html_attrs, #method_to_call, #name, #parameters, #parent, #request, #request_number, #slots, #subcomponents, #tokens

Instance Method Summary collapse

Methods inherited from FormElement

#container?, #element_name

Methods inherited from Component

#api_filename, #app, #awake, #container?, #content?, create, #create_component_tree, #definition_filename, #initialize, #page, #perform_action, #process_bindings, #process_parameters, #process_request, #remove_subcomponents, #session, #set_request_subcomponents, #sleep, #slot_bound?, #subcomponent_for_name, synchronize_slot, #synchronize_slot?, #synchronize_slots, #template_filename, #tokenize_binding, #update_binding, #url_string

Constructor Details

This class inherits a constructor from SWS::Component

Instance Method Details

#append_to_response(response) ⇒ Object



12
13
14
# File 'lib/sws/Core/components/TextArea/TextArea.rb', line 12

def append_to_response ( response )
	response << generate_html()
end

#generate_htmlObject



17
18
19
20
21
22
23
24
# File 'lib/sws/Core/components/TextArea/TextArea.rb', line 17

def generate_html ()
	
	string = "<TEXTAREA name=\"#{element_name()}.value\""
	string << bound_slot_string( "cols","rows" )
	string << "#{generic_attr_string()}>#{@slots["value"].value}</TEXTAREA>"
	return string
	
end