public
Description: JavaScript Application Framework - JS library only
Home | Edit | New

Text_field_view

A text view creates a text box into the page. It can be editable.

Syntax:

<%= text_field_view :text_field_id, :hint => “Place Holder Text”, :enabled => true/false, :bind => { :value => ‘MyApp.ObjectController.property’ } %>

Where:

  • :hint :: The hint to display while the field is not active.
  • :enabled :: If set to false, the view is grayed out and it cannot get focus. Entering data can only be done using the value property.

Normally you would bind the value of the text field view (the actual contents) to a property of an object controller.
The contents of this object controller in this case is of type SC.Record. To have the set of text_field_views listen to a selection of a specific record, bind the content of the object controller to the selection property of a list_view.

Last edited by mauritslamers, Thu Sep 25 04:37:29 -0700 2008
Home | Edit | New
Versions: