Part of canonical.launchpad.webapp View In Hierarchy
Known subclasses: canonical.launchpad.webapp.__init__.LaunchpadEditFormView
Method | __init__ | Undocumented |
Method | initialize | Override this in subclasses. |
Method | render | Return the body of the response. |
Method | extendFields | Allow subclasses to extend the form fields. |
Method | setUpFields | Undocumented |
Method | setUpWidgets | Set up the widgets using the view's form fields and the context. |
Method | adapters | Provide custom adapters for use when setting up the widgets. |
Method | action_url | Set the default action URL for the form. |
Method | has_available_actions | Does the view have any available actions that will render? |
Method | initial_values | Override this in your subclass if you want any widgets to have |
Method | addError | Add a form wide error. |
Method | getFieldError | Get the error associated with a particular field. |
Method | setFieldError | Set the error associated with a particular field. |
Static Method | validate_none | Do not do any validation. |
Method | validate_widgets | Validate the named form widgets. |
Method | error_count | Undocumented |
Method | validate | Validate the form. |
Method | validate_cancel | Noop validation in case we cancel. |
Method | focusedElementScript | Helper function to construct the script element content. |
Method | isSingleLineLayout | Undocumented |
Method | isMultiLineLayout | Undocumented |
Method | isCheckBoxLayout | Undocumented |
Method | showOptionalMarker | Should the (Optional) marker be shown? |
Method | _abort | Abort the form edit. |
Method | _validate | Check all widgets and perform any custom validation. |
Inherited from LaunchpadView:
Method | template | The page's template, if configured in zcml. |
Method | __call__ | Undocumented |
Method | _isRedirected | Return True if a redirect was requested. |
Method | _getErrorMessage | Property getter for error_message . |
Method | _setErrorMessage | Property setter for error_message . |
Method | _getInfoMessage | Property getter for info_message . |
Method | _setInfoMessage | Property setter for info_message . |
Inherited from UserAttributeCache (via LaunchpadView):
Method | account | Undocumented |
Method | user | The logged-in Person, or None if there is no one logged in. |
Method | isBetaUser | Return True if the user is in the beta testers team. |
By default, this method will execute the template attribute to render the content. But if an action handler was executed and it returned a value other than None, that value will be used as the rendered content.
See LaunchpadView.render() for other information.
If no context is given, the view's context is used.
If False is returned, the view or template probably needs to explain why no actions can be performed and offer a cancel link.
The 'message' parameter is CGI-escaped in accordance with the
INotificationResponse.addNotification()
API. Please see it
for details re: internationalized and markup text.
If an error message is available in widget_errors, it is returned. As a fallback, the corresponding widget's error() method is called.
If the validator for the field also flagged an error, the message passed to this method will be used in preference.
The 'message' parameter is CGI-escaped in accordance with the
INotificationResponse.addNotification()
API. Please see it
for details re: internationalized and markup text.
This is to be used in subclasses that have actions in which no validation is wanted (e.g. a cancel action).
Parameters | names | Names of widgets to validate. If None, all widgets will be validated. |
For each error encountered, the addError() method should be called to log the problem.