Class WFSubmit

Description

A Submit widget for our framework.

PHOCOA Builder Setup:

Required:

  • label The label for the button.
  • WFLink::$postSubmitLabel The label for the button that will be shown after the button is clicked. Requires JS. This does NOT prevent duplicate submission.
  • WFLink::$duplicateSubmitMessage The message that will be displayed if the submit button is pressed more than once. This also prevents duplicate submission. NOTE: with AJAX forms, you cannot prevent duplicate submission.
Optional:
  • class The class of the <a> tag.
Bindable Properties: label The text value to display.

Located in /framework/widgets/WFSubmit.php (line 27)

WFObject
   |
   --WFView
      |
      --WFWidget
         |
         --WFSubmit
Variable Summary
Method Summary
static void exposedProperties ()
WFSubmit __construct ( $id,  $page)
void label ()
void render ([ $blockContent = NULL])
void setAction ( $action)
void setDuplicateMessage ( $str)
void setImagePath ( $path)
void setLabel ( $label)
void setTarget ( $target)
void submitAction ()
void useAjax ()
Variables
string $duplicateSubmitMessage (line 44)
  • var: The message to display if someone presses the button more than once.
  • access: protected
string $imagePath (line 40)
  • var: THe image path to use. By default empty. If non-empty, turns the submit into an image submit.
  • access: protected
string $label (line 36)
  • var: The label to show.
  • access: protected
string $postSubmitLabel (line 48)
  • var: The new text for the button once submit is pressed.
  • access: protected

Inherited Variables

Inherited from WFWidget

WFWidget::$bindings
WFWidget::$class
WFWidget::$errors
WFWidget::$formatter
WFWidget::$hasRestoredState
WFWidget::$hidden
WFWidget::$name
WFWidget::$value
WFWidget::$widgetLabel

Inherited from WFView

WFView::$children
WFView::$cssImports
WFView::$enabled
WFView::$id
WFView::$importInHead
WFView::$jsActions
WFView::$jsEvents
WFView::$jsImports
WFView::$originalOnEvent
WFView::$page
WFView::$parent
Methods
static method exposedProperties (line 74)
  • access: public
static void exposedProperties ()

Redefinition of:
WFWidget::exposedProperties()
Constructor __construct (line 53)

Constructor.

WFSubmit __construct ( $id,  $page)
  • $id
  • $page

Redefinition of:
WFWidget::__construct()
Constructor.
allConfigFinishedLoading (line 69)
void allConfigFinishedLoading ()

Redefinition of:
WFView::allConfigFinishedLoading()
After WFPage has completed the loading of all config for all widgets, it will call this function on each widget.
canPushValueBinding (line 203)
void canPushValueBinding ()

Redefinition of:
WFWidget::canPushValueBinding()
Does this widget use the "value" binding to WRITE data back to the bindings?
label (line 121)
void label ()
render (line 131)
void render ([ $blockContent = NULL])
  • $blockContent

Redefinition of:
WFView::render()
Render the view into HTML.
renderDefaultButton (line 184)

Renders the button as hidden (for use with defaultSubmitID).

  • return: The HTML of the button's core attrs with no ID.
string renderDefaultButton ()
setAction (line 96)
void setAction ( $action)
  • $action
setDuplicateMessage (line 126)
void setDuplicateMessage ( $str)
  • $str
setImagePath (line 86)
void setImagePath ( $path)
  • $path
setLabel (line 116)
void setLabel ( $label)
  • $label
setTarget (line 100)
void setTarget ( $target)
  • $target
setupExposedBindings (line 196)

******************* BINDINGS SETUP ***********************

void setupExposedBindings ()

Redefinition of:
WFWidget::setupExposedBindings()
Set up all exposed bindings for this widget.
submitAction (line 91)
void submitAction ()
useAjax (line 111)

Switch the submit widget to using AJAX for submission.

This function is really only here so that we can preserve the action/rpc setup when WFForm isAjax is true. Previously, WFForm would just re-create the click event, but that created a bug where any customization of the action was lost. Particuarly, custom "action" methods were getting blown away.

void useAjax ()

Inherited Methods

Inherited From WFWidget

WFWidget::__construct()
WFWidget::addError()
WFWidget::addErrors()
WFWidget::bind()
WFWidget::bindingByName()
WFWidget::bindings()
WFWidget::canPushValueBinding()
WFWidget::errors()
WFWidget::exposedBindings()
WFWidget::exposedProperties()
WFWidget::formattedValue()
WFWidget::formatter()
WFWidget::hasRestoredState()
WFWidget::hidden()
WFWidget::name()
WFWidget::processBindingOptions()
WFWidget::propagateValueToBinding()
WFWidget::pullBindings()
WFWidget::pushBindings()
WFWidget::restoreState()
WFWidget::setFormatter()
WFWidget::setHidden()
WFWidget::setName()
WFWidget::setupExposedBindings()
WFWidget::setValue()
WFWidget::setWidgetLabel()
WFWidget::unbind()
WFWidget::value()
WFWidget::valueForBinding()
WFWidget::widgetLabel()

Inherited From WFView

WFView::__construct()
WFView::addChild()
WFView::allConfigFinishedLoading()
WFView::children()
WFView::cloneWithID()
WFView::enabled()
WFView::exposedProperties()
WFView::getForm()
WFView::getJSActions()
WFView::getListenerJS()
WFView::getListenerJSInScriptTag()
WFView::getOnEvent()
WFView::getWidgetDir()
WFView::getWidgetWWWDir()
WFView::id()
WFView::importCSS()
WFView::importJS()
WFView::jsEndHTML()
WFView::jsStartHTML()
WFView::page()
WFView::parent()
WFView::removeChild()
WFView::render()
WFView::setEnabled()
WFView::setId()
WFView::setJSonBlur()
WFView::setJSonClick()
WFView::setListener()
WFView::setOnEvent()
WFView::setParent()
WFView::yuiPath()

Inherited From WFObject

WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()

Documentation generated on Thu, 14 May 2009 16:20:32 -0400 by phpDocumentor 1.4.2