Part of lp.app.browser.launchpadform View In Hierarchy
Known subclasses: lp.answers.browser.faqcollection.SearchFAQsView, lp.answers.browser.faqtarget.FAQCreateView, lp.answers.browser.person.PersonLatestQuestionsView, lp.answers.browser.question.QuestionAddView, lp.answers.browser.question.QuestionChangeStatusView, lp.answers.browser.question.QuestionCreateFAQView, lp.answers.browser.question.QuestionLinkFAQView, lp.answers.browser.question.QuestionRejectView, lp.answers.browser.question.QuestionSetView, lp.answers.browser.question.QuestionWorkflowView, lp.answers.browser.questiontarget.ManageAnswerContactView, lp.answers.browser.questiontarget.SearchQuestionsView, lp.app.browser.launchpad.AppFrontPageSearchView, lp.app.browser.launchpadform.LaunchpadEditFormView, lp.app.browser.multistep.StepView, lp.app.browser.root.LaunchpadSearchView, lp.app.browser.tests.test_launchpadform.TestHelpLinksView, lp.app.browser.tests.test_launchpadform.TestView, lp.app.browser.tests.test_launchpadform.TestWidgetDivView, lp.blueprints.browser.specification.NewSpecificationView, lp.blueprints.browser.specification.SpecificationGoalDecideView, lp.blueprints.browser.specification.SpecificationInformationTypeEditView, lp.blueprints.browser.specification.SpecificationLinkBranchView, lp.blueprints.browser.specification.SpecificationRetargetingView, lp.blueprints.browser.specification.SpecificationSprintAddView, lp.blueprints.browser.specification.SpecificationSupersedingView, lp.blueprints.browser.specificationbranch.BranchLinkToSpecificationView, lp.blueprints.browser.specificationdependency.SpecificationDependencyAddView, lp.blueprints.browser.specificationdependency.SpecificationDependencyRemoveView, lp.blueprints.browser.specificationsubscription.SpecificationSubscriptionAddView, lp.blueprints.browser.specificationsubscription.SpecificationSubscriptionDeleteView, lp.blueprints.browser.sprint.SprintAddView, lp.blueprints.browser.sprint.SprintDeleteView, lp.blueprints.browser.sprintattendance.BaseSprintAttendanceAddView, lp.bugs.browser.bug.BugMarkAsAffectingUserView, lp.bugs.browser.bug.BugSecrecyEditView, lp.bugs.browser.bug.MaloneView, lp.bugs.browser.bugalsoaffects.BugAlsoAffectsProductWithProductCreationView, lp.bugs.browser.bugattachment.BugAttachmentEditView, lp.bugs.browser.bugattachment.BugAttachmentPatchConfirmationView, lp.bugs.browser.bugbranch.BranchLinkToBugView, lp.bugs.browser.bugbranch.BugBranchAddView, lp.bugs.browser.buglinktarget.BugLinkView, lp.bugs.browser.buglinktarget.BugsUnlinkView, lp.bugs.browser.buglisting.BugTaskSearchListingView, lp.bugs.browser.bugmessage.BugMessageAddFormView, lp.bugs.browser.bugnomination.BugNominationEditView, lp.bugs.browser.bugnomination.BugNominationView, lp.bugs.browser.bugsubscription.BugMuteSelfView, lp.bugs.browser.bugsubscription.BugSubscriptionAddView, lp.bugs.browser.bugsubscription.BugSubscriptionSubscribeSelfView, lp.bugs.browser.bugtarget.FileBugViewBase, lp.bugs.browser.bugtarget.ProjectGroupFileBugGuidedView, lp.bugs.browser.bugtask.BugTaskCreateQuestionView, lp.bugs.browser.bugtask.BugTaskDeletionView, lp.bugs.browser.bugtask.BugTaskRemoveQuestionView, lp.bugs.browser.bugtracker.BugTrackerAddView, lp.bugs.browser.bugwatch.BugWatchActivityPortletView, lp.bugs.browser.bugwatch.BugWatchEditView, lp.bugs.browser.cve.CveLinkView, lp.bugs.browser.structuralsubscription.StructuralSubscriptionView, lp.buildmaster.browser.builder.BuilderSetAddView, lp.code.browser.branch.BranchDeletionView, lp.code.browser.branch.BranchMirrorStatusView, lp.code.browser.branch.BranchUpgradeView, lp.code.browser.branch.RegisterBranchMergeProposalView, lp.code.browser.branchlisting.BranchListingView, lp.code.browser.branchmergeproposal.BranchMergeProposalAddVoteView, lp.code.browser.branchmergeproposal.BranchMergeProposalResubmitView, lp.code.browser.branchmergeproposal.BranchMergeProposalView, lp.code.browser.branchmergeproposallisting.BranchMergeProposalListingView, lp.code.browser.branchsubscription._BranchSubscriptionView, lp.code.browser.codeimport.CodeImportBaseView, lp.code.browser.codeimport.RequestImportView, lp.code.browser.codeimport.TryImportAgainView, lp.code.browser.codeimportmachine.CodeImportMachineView, lp.code.browser.codereviewcomment.CodeReviewCommentAddView, lp.code.browser.codereviewvote.CodeReviewVoteReassign, lp.code.browser.gitref.GitRefRegisterMergeProposalView, lp.code.browser.gitrepository.GitRepositoryDeletionView, lp.code.browser.gitrepository.GitRepositoryPermissionsView, lp.code.browser.gitsubscription._GitSubscriptionView, lp.code.browser.sourcepackagerecipe.RecipeRelatedBranchesMixin, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeDeleteView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestBuildsView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestDailyBuildView, lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildCancelView, lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildRescoreView, lp.coop.answersbugs.browser.QuestionMakeBugView, lp.hardwaredb.browser.hwdb.HWDBUploadView, lp.registry.browser.announcement.AnnouncementAddView, lp.registry.browser.announcement.AnnouncementDeleteView, lp.registry.browser.announcement.AnnouncementEditView, lp.registry.browser.announcement.AnnouncementPublishView, lp.registry.browser.announcement.AnnouncementRetargetView, lp.registry.browser.announcement.AnnouncementRetractView, lp.registry.browser.codeofconduct.SignedCodeOfConductAckView, lp.registry.browser.codeofconduct.SignedCodeOfConductActiveView, lp.registry.browser.codeofconduct.SignedCodeOfConductAddView, lp.registry.browser.distribution.DistributionAddView, lp.registry.browser.distribution.DistributionPublisherConfigView, lp.registry.browser.distributionmirror.DistributionMirrorAddView, lp.registry.browser.distributionmirror.DistributionMirrorDeleteView, lp.registry.browser.distroseries.DistroSeriesAddView, lp.registry.browser.distroseries.DistroSeriesDifferenceBaseView, lp.registry.browser.distroseries.DistroSeriesInitializeView, lp.registry.browser.distroseries.DistroSeriesLocalDifferencesView, lp.registry.browser.distroseries.DistroSeriesMissingPackagesView, lp.registry.browser.distroseries.DistroSeriesUniquePackagesView, lp.registry.browser.distroseriesdifference.DistroSeriesDifferenceView, lp.registry.browser.featuredproject.FeaturedProjectsView, lp.registry.browser.milestone.MilestoneAddView, lp.registry.browser.milestone.MilestoneDeleteView, lp.registry.browser.milestone.MilestoneTagView, lp.registry.browser.nameblacklist.NameBlacklistAddView, lp.registry.browser.objectreassignment.ObjectReassignmentView, lp.registry.browser.peoplemerge.ValidatingMergeView, lp.registry.browser.person.BeginTeamClaimView, lp.registry.browser.person.EmailToPersonView, lp.registry.browser.person.PersonAccountAdministerView, lp.registry.browser.person.PersonDeactivateAccountView, lp.registry.browser.person.PersonEditEmailsView, lp.registry.browser.person.PersonEditIRCNicknamesView, lp.registry.browser.person.PersonEditJabberIDsView, lp.registry.browser.person.PersonEditMailingListsView, lp.registry.browser.person.PersonEditTimeZoneView, lp.registry.browser.person.PersonLanguagesView, lp.registry.browser.person.PersonVouchersView, lp.registry.browser.poll.PollAddView, lp.registry.browser.poll.PollOptionAddView, lp.registry.browser.product.ProductAddSeriesView, lp.registry.browser.product.ProductSetBranchView, lp.registry.browser.product.ProductSetReviewLicensesView, lp.registry.browser.productrelease.ProductReleaseAddDownloadFileView, lp.registry.browser.productrelease.ProductReleaseAddViewBase, lp.registry.browser.productrelease.ProductReleaseDeleteView, lp.registry.browser.productseries.ProductSeriesUbuntuPackagingView, lp.registry.browser.project.ProjectAddView, lp.registry.browser.sourcepackage.SourcePackageAssociationPortletView, lp.registry.browser.sourcepackage.SourcePackageRemoveUpstreamView, lp.registry.browser.team.MailingListTeamBaseView, lp.registry.browser.team.ProposedTeamMembersEditView, lp.registry.browser.team.TeamAddMyTeamsView, lp.registry.browser.team.TeamAddView, lp.registry.browser.team.TeamInvitationView, lp.registry.browser.team.TeamJoinView, lp.registry.browser.team.TeamLeaveView, lp.registry.browser.team.TeamMemberAddView, lp.registry.browser.team.TeamMembershipSelfRenewalView, lp.services.features.browser.edit.FeatureControlView, lp.services.oauth.browser.OAuthAuthorizeTokenView, lp.services.oauth.browser.OAuthRequestTokenView, lp.services.temporaryblobstorage.browser.TemporaryBlobStorageAddView, lp.services.verification.browser.logintoken.ValidateEmailView, lp.services.verification.browser.logintoken.ValidateGPGKeyView, lp.services.webhooks.browser.WebhookAddView, lp.services.webhooks.browser.WebhookDeleteView, lp.snappy.browser.snap.SnapAddView, lp.snappy.browser.snap.SnapRequestBuildsView, lp.snappy.browser.snapbuild.SnapBuildCancelView, lp.snappy.browser.snapbuild.SnapBuildRescoreView, lp.snappy.browser.snapbuild.SnapBuildView, lp.soyuz.browser.archive.ArchiveActivateView, lp.soyuz.browser.archive.ArchiveDeleteView, lp.soyuz.browser.archive.ArchiveEditDependenciesView, lp.soyuz.browser.archive.ArchiveSourcePackageListViewBase, lp.soyuz.browser.archivesubscription.ArchiveSubscribersView, lp.soyuz.browser.build.BuildCancelView, lp.soyuz.browser.build.BuildRescoringView, lp.soyuz.browser.distroarchseries.DistroArchSeriesAddView, lp.soyuz.browser.livefs.LiveFSAddView, lp.soyuz.browser.livefsbuild.LiveFSBuildCancelView, lp.soyuz.browser.livefsbuild.LiveFSBuildRescoreView, lp.testopenid.browser.server.TestOpenIDLoginView, lp.translations.browser.customlanguagecode.CustomLanguageCodeAddView, lp.translations.browser.customlanguagecode.CustomLanguageCodeRemoveView, lp.translations.browser.hastranslationimports.HasTranslationImportsView, lp.translations.browser.language.LanguageAddView, lp.translations.browser.language.LanguageSetView, lp.translations.browser.person.PersonTranslationRelicensingView, lp.translations.browser.productseries.ProductSeriesTranslationsBzrImportView, lp.translations.browser.translationgroup.TranslationGroupAddTranslatorView, lp.translations.browser.translationgroup.TranslationGroupAddView, lp.translations.browser.translationimportqueue.TranslationImportQueueEntryView, lp.translations.browser.translator.TranslatorRemoveView
Method | __init__ | Undocumented |
Method | initialize | Undocumented |
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 | help_links | Dictionary mapping field names to help links. |
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 | ajax_failure_handler | Called by the form if validate() finds any errors. |
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 | _processNotifications | Add any notification messages to the response headers. |
Method | _abort | Abort the form edit. |
Method | _validate | Check all widgets and perform any custom validation. |
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 ajax requests the standard Launchpad form template is not available to render any errors. We simply convert the errors to json and return that data to the caller so the errors can be rendered.
For each error encountered, the addError() method should be called to log the problem.
You can use this in your Form views by simply setting validator='validate_cancel' in the @action line of your cancel button.