l.a.b.l.LaunchpadFormView(LaunchpadView) : class documentation

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.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

No class docstring
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.
def __init__(self, context, request):
Undocumented
def initialize(self):
overridden in lp.answers.browser.question.QuestionConfirmAnswerView, lp.answers.browser.question.QuestionRejectView, lp.blueprints.browser.specification.NewSpecificationView, lp.blueprints.browser.specificationbranch.SpecificationBranchStatusView, lp.bugs.browser.bug.MaloneView, lp.bugs.browser.bugalsoaffects.ChooseProductStep, lp.bugs.browser.bugattachment.BugAttachmentPatchConfirmationView, lp.bugs.browser.bugbranch.BugBranchDeleteView, lp.bugs.browser.buglisting.BugTaskSearchListingView, lp.bugs.browser.bugnomination.BugNominationEditView, lp.bugs.browser.bugnomination.BugNominationView, lp.bugs.browser.bugsubscription.BugMuteSelfView, lp.bugs.browser.bugsubscription.BugSubscriptionSubscribeSelfView, lp.bugs.browser.bugtarget.FileBugViewBase, lp.bugs.browser.bugtask.BugTaskEditView, lp.code.browser.branch.RegisterBranchMergeProposalView, lp.code.browser.branchlisting.ProductBranchSummaryView, lp.code.browser.branchmergeproposal.BranchMergeProposalAddVoteView, lp.code.browser.branchmergeproposal.BranchMergeProposalResubmitView, lp.code.browser.branchmergeproposal.BranchMergeProposalView, lp.code.browser.branchmergeproposal.MergeProposalEditView, lp.code.browser.branchmergeproposallisting.ActiveReviewsView, lp.code.browser.branchsubscription.BranchSubscriptionEditView, lp.code.browser.codeimport.CodeImportEditView, lp.code.browser.gitref.GitRefRegisterMergeProposalView, lp.code.browser.gitsubscription.GitSubscriptionEditView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestDailyBuildView, lp.coop.answersbugs.browser.QuestionMakeBugView, lp.registry.browser.distroseries.DistroSeriesInitializeView, lp.registry.browser.distroseries.DistroSeriesLocalDifferencesView, lp.registry.browser.distroseries.DistroSeriesLocalDifferencesView, lp.registry.browser.distroseries.DistroSeriesMissingPackagesView, lp.registry.browser.distroseries.DistroSeriesMissingPackagesView, lp.registry.browser.distroseries.DistroSeriesUniquePackagesView, lp.registry.browser.distroseries.DistroSeriesUniquePackagesView, lp.registry.browser.person.BeginTeamClaimView, lp.registry.browser.person.EmailToPersonView, lp.registry.browser.person.PersonEditEmailsView, lp.registry.browser.person.PersonEditMailingListsView, lp.registry.browser.product.ProductEditView, lp.registry.browser.product.ProjectAddStepTwo, lp.registry.browser.productrelease.ProductReleaseAddView, lp.registry.browser.team.TeamAddMyTeamsView, lp.services.oauth.browser.OAuthAuthorizeTokenView, lp.services.temporaryblobstorage.browser.TemporaryBlobStorageAddView, lp.services.verification.browser.logintoken.ClaimTeamView, lp.services.verification.browser.logintoken.ValidateEmailView, lp.services.verification.browser.logintoken.ValidateGPGKeyView, lp.services.webhooks.browser.WebhookView, lp.snappy.browser.snap.SnapAddView, lp.soyuz.browser.archive.ArchiveEditDependenciesView, lp.soyuz.browser.archive.ArchiveView, lp.soyuz.browser.archivesubscription.ArchiveSubscribersView, lp.soyuz.browser.build.BuildRescoringView, lp.soyuz.browser.livefs.LiveFSAddView, lp.testopenid.browser.server.TestOpenIDLoginView, lp.translations.browser.distroseries.DistroSeriesLanguagePackView, lp.translations.browser.hastranslationimports.HasTranslationImportsView, lp.translations.browser.language.LanguageSetView, lp.translations.browser.translationimportqueue.TranslationImportQueueEntryView
Undocumented
def _processNotifications(self, request):
Add any notification messages to the response headers.
def render(self):
Return the body of the response.

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.

def _abort(self):
Abort the form edit.

This will be called in the case of a validation error.

def extendFields(self):
Allow subclasses to extend the form fields.
def setUpFields(self):
overridden in lp.answers.browser.question.QuestionAddView, lp.answers.browser.question.QuestionCreateFAQView, lp.answers.browser.question.QuestionEditView, lp.answers.browser.question.QuestionWorkflowView, lp.answers.browser.questiontarget.ManageAnswerContactView, lp.answers.browser.questiontarget.SearchQuestionsView, lp.blueprints.browser.specification.SpecificationSupersedingView, lp.bugs.browser.bug.BugMarkAsDuplicateView, lp.bugs.browser.bugalsoaffects.BugAlsoAffectsProductWithProductCreationView, lp.bugs.browser.bugsubscription.BugSubscriptionAddView, lp.bugs.browser.bugsubscription.BugSubscriptionSubscribeSelfView, lp.bugs.browser.bugsubscriptionfilter.BugSubscriptionFilterEditViewBase, lp.bugs.browser.bugtarget.FileBugViewBase, lp.bugs.browser.bugtask.BugTaskCreateQuestionView, lp.bugs.browser.bugtask.BugTaskEditView, lp.bugs.browser.bugtask.BugTaskRemoveQuestionView, lp.bugs.browser.bugtracker.BugTrackerEditView, lp.bugs.browser.structuralsubscription.StructuralSubscriptionView, lp.code.browser.branch.BranchEditView, lp.code.browser.branchmergeproposal.BranchMergeProposalAddVoteView, lp.code.browser.branchmergeproposal.BranchMergeProposalChangeStatusView, lp.code.browser.codeimport.CodeImportEditView, lp.code.browser.codeimport.CodeImportNewView, lp.code.browser.gitrepository.GitRepositoryEditView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView, lp.registry.browser.distribution.DistributionAddView, lp.registry.browser.distribution.DistributionEditView, lp.registry.browser.distroseries.DistroSeriesAdminView, lp.registry.browser.distroseries.DistroSeriesDifferenceBaseView, lp.registry.browser.distroseries.DistroSeriesEditView, lp.registry.browser.milestone.MilestoneEditView, lp.registry.browser.objectreassignment.ObjectReassignmentView, lp.registry.browser.person.EmailToPersonView, lp.registry.browser.person.PersonEditEmailsView, lp.registry.browser.person.PersonEditJabberIDsView, lp.registry.browser.person.PersonEditMailingListsView, lp.registry.browser.person.PersonVouchersView, lp.registry.browser.product.ProductAdminView, lp.registry.browser.product.ProductConfigureBase, lp.registry.browser.product.ProductSetBranchView, lp.registry.browser.product.ProjectAddStepOne, lp.registry.browser.product.ProjectAddStepTwo, lp.registry.browser.productrelease.ProductReleaseAddView, lp.registry.browser.productrelease.ProductReleaseFromSeriesAddView, lp.registry.browser.productseries.ProductSeriesUbuntuPackagingView, lp.registry.browser.project.ProjectReviewView, lp.registry.browser.sourcepackage.SourcePackageAssociationPortletView, lp.registry.browser.sourcepackage.SourcePackageChangeUpstreamStepOne, lp.registry.browser.sourcepackage.SourcePackageChangeUpstreamStepTwo, lp.registry.browser.team.TeamAddMyTeamsView, lp.registry.browser.team.TeamAddView, lp.registry.browser.team.TeamContactAddressView, lp.registry.browser.team.TeamEditView, lp.snappy.browser.snap.SnapAddView, lp.snappy.browser.snap.SnapEditView, lp.soyuz.browser.archive.ArchiveActivateView, lp.soyuz.browser.archive.ArchiveEditDependenciesView, lp.soyuz.browser.archive.ArchiveEditView, lp.soyuz.browser.archive.ArchivePackageCopyingView, lp.translations.browser.hastranslationimports.HasTranslationImportsView
Undocumented
def setUpWidgets(self, context=None):
overridden in lp.answers.browser.question.QuestionAddView, lp.answers.browser.question.QuestionLinkFAQView, lp.answers.browser.question.QuestionWorkflowView, lp.answers.browser.questiontarget.SearchQuestionsView, lp.blueprints.browser.specification.NewSpecificationView, lp.blueprints.browser.sprint.SprintAddView, lp.blueprints.browser.sprint.SprintEditView, lp.blueprints.browser.sprintattendance.BaseSprintAttendanceAddView, lp.bugs.browser.bug.BugEditViewBase, lp.bugs.browser.bugalsoaffects.BugTaskCreationStep, lp.bugs.browser.buglisting.BugTaskSearchListingView, lp.bugs.browser.bugsubscription.BugSubscriptionSubscribeSelfView, lp.bugs.browser.bugtarget.FileBugViewBase, lp.bugs.browser.bugtracker.BugTrackerAddView, lp.code.browser.branchlisting.BranchListingView, lp.code.browser.codeimport.CodeImportNewView, lp.code.browser.gitrepository.GitRepositoryEditView, lp.code.browser.sourcepackagerecipe.RecipeRelatedBranchesMixin, lp.registry.browser.person.PersonEditMailingListsView, lp.registry.browser.person.PersonRenameFormMixin, lp.registry.browser.product.ProductSetBranchView, lp.registry.browser.product.ProjectAddStepOne, lp.registry.browser.product.ProjectAddStepTwo, lp.registry.browser.team.TeamAddMyTeamsView, lp.registry.browser.team.TeamJoinView, lp.services.verification.browser.logintoken.ClaimTeamView, lp.snappy.browser.snap.BaseSnapEditView, lp.snappy.browser.snap.SnapAddView, lp.soyuz.browser.archive.ArchiveSourceSelectionFormView, lp.translations.browser.hastranslationimports.HasTranslationImportsView
Set up the widgets using the view's form fields and the context.

If no context is given, the view's context is used.

@property
def help_links(self):
Dictionary mapping field names to help links.
@property
def adapters(self):
Provide custom adapters for use when setting up the widgets.
@property
def action_url(self):
Set the default action URL for the form.
@property
def has_available_actions(self):
Does the view have any available actions that will render?

If False is returned, the view or template probably needs to explain why no actions can be performed and offer a cancel link.

@property
def initial_values(self):
overridden in lp.answers.browser.question.QuestionChangeStatusView, lp.answers.browser.question.QuestionCreateFAQView, lp.answers.browser.question.QuestionLinkFAQView, lp.answers.browser.questiontarget.ManageAnswerContactView, lp.blueprints.browser.specification.NewSpecificationView, lp.blueprints.browser.specification.SpecificationGoalProposeView, lp.blueprints.browser.specification.SpecificationInformationTypeEditView, lp.blueprints.browser.specification.SpecificationSupersedingView, lp.blueprints.browser.sprintattendance.SprintAttendanceAttendView, lp.blueprints.browser.sprintattendance.SprintAttendanceRegisterView, lp.bugs.browser.bug.BugMarkAsAffectingUserView, lp.bugs.browser.bug.BugMarkAsDuplicateView, lp.bugs.browser.bug.BugSecrecyEditView, lp.bugs.browser.bugalsoaffects.DistroBugTaskCreationStep, lp.bugs.browser.bugattachment.BugAttachmentEditView, lp.bugs.browser.bugmessage.BugMessageAddFormView, lp.bugs.browser.bugtarget.FileBugViewBase, lp.bugs.browser.bugtask.BugTaskEditView, lp.bugs.browser.bugtracker.BugTrackerEditComponentView, lp.bugs.browser.bugwatch.BugWatchEditView, lp.bugs.browser.structuralsubscription.StructuralSubscriptionView, lp.code.browser.branch.BranchReviewerEditView, lp.code.browser.branchlisting.BranchListingView, lp.code.browser.branchmergeproposal.BranchMergeProposalAddVoteView, lp.code.browser.branchmergeproposal.BranchMergeProposalMergedView, lp.code.browser.branchmergeproposal.BranchMergeProposalRequestReviewView, lp.code.browser.branchmergeproposal.BranchMergeProposalResubmitView, lp.code.browser.branchmergeproposallisting.BranchMergeProposalListingView, lp.code.browser.branchsubscription.BranchSubscriptionEditOwnView, lp.code.browser.codeimport.CodeImportEditView, lp.code.browser.codeimport.CodeImportNewView, lp.code.browser.codereviewcomment.CodeReviewCommentAddView, lp.code.browser.gitrepository.GitRepositoryEditReviewerView, lp.code.browser.gitsubscription.GitSubscriptionEditOwnView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestBuildsView, lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildRescoreView, lp.coop.answersbugs.browser.QuestionMakeBugView, lp.registry.browser.announcement.AnnouncementEditView, lp.registry.browser.distribution.DistributionAddView, lp.registry.browser.distribution.DistributionEditView, lp.registry.browser.distribution.DistributionPublisherConfigView, lp.registry.browser.distroseriesdifference.DistroSeriesDifferenceView, lp.registry.browser.milestone.MilestoneEditView, lp.registry.browser.milestone.MilestoneTagView, lp.registry.browser.person.PersonAccountAdministerView, lp.registry.browser.person.PersonEditEmailsView, lp.registry.browser.person.PersonEditMailingListsView, lp.registry.browser.person.PersonEditTimeZoneView, lp.registry.browser.product.ProductSetBranchView, lp.registry.browser.product.ProductSetReviewLicensesView, lp.registry.browser.product.ProjectAddStepTwo, lp.registry.browser.productseries.ProductSeriesUbuntuPackagingView, lp.registry.browser.team.TeamContactAddressView, lp.registry.browser.team.TeamMailingListConfigurationView, lp.services.features.browser.edit.FeatureControlView, lp.services.verification.browser.logintoken.ClaimTeamView, lp.services.webhooks.browser.WebhookAddView, lp.snappy.browser.snap.SnapAddView, lp.snappy.browser.snap.SnapEditView, lp.snappy.browser.snap.SnapRequestBuildsView, lp.snappy.browser.snapbuild.SnapBuildRescoreView, lp.soyuz.browser.archive.ArchiveActivateView, lp.soyuz.browser.archive.ArchiveEditView, lp.soyuz.browser.livefs.LiveFSAddView, lp.soyuz.browser.livefs.LiveFSAdminView, lp.soyuz.browser.livefs.LiveFSEditView, lp.soyuz.browser.livefsbuild.LiveFSBuildRescoreView, lp.translations.browser.hastranslationimports.HasTranslationImportsView, lp.translations.browser.person.PersonTranslationRelicensingView, lp.translations.browser.translationimportqueue.TranslationImportQueueEntryView
Override this in your subclass if you want any widgets to have initial values.
def addError(self, message):
Add a form wide error.

The 'message' parameter is CGI-escaped in accordance with the INotificationResponse.addNotification() API. Please see it for details re: internationalized and markup text.

def getFieldError(self, field_name):
Get the error associated with a particular field.

If an error message is available in widget_errors, it is returned. As a fallback, the corresponding widget's error() method is called.

def setFieldError(self, field_name, message):
Set the error associated with a particular field.

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.

@staticmethod
def validate_none(form, action, data):
Do not do any validation.

This is to be used in subclasses that have actions in which no validation is wanted (e.g. a cancel action).

def validate_widgets(self, data, names=None):
Validate the named form widgets.
ParametersnamesNames of widgets to validate. If None, all widgets will be validated.
def _validate(self, action, data):
Check all widgets and perform any custom validation.
@property
def error_count(self):
Undocumented
def ajax_failure_handler(self, action, data, errors):
Called by the form if validate() finds any errors.

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.

def validate(self, data):
overridden in lp.answers.browser.question.QuestionAddView, lp.answers.browser.question.QuestionChangeStatusView, lp.answers.browser.question.QuestionLinkFAQView, lp.answers.browser.question.QuestionRejectView, lp.answers.browser.question.QuestionWorkflowView, lp.answers.browser.questiontarget.SearchQuestionsView, lp.app.browser.multistep.StepView, lp.app.browser.root.LaunchpadSearchView, lp.app.browser.tests.test_launchpadform.TestFormView, lp.blueprints.browser.specification.NewSpecificationView, lp.blueprints.browser.specification.SpecificationLinkBranchView, lp.blueprints.browser.specification.SpecificationRetargetingView, lp.blueprints.browser.specification.SpecificationSupersedingView, lp.blueprints.browser.specificationdependency.SpecificationDependencyAddView, lp.blueprints.browser.sprint.SprintAddView, lp.blueprints.browser.sprint.SprintEditView, lp.blueprints.browser.sprintattendance.BaseSprintAttendanceAddView, lp.bugs.browser.buglisting.BugTaskSearchListingView, lp.bugs.browser.bugmessage.BugMessageAddFormView, lp.bugs.browser.bugtarget.FileBugViewBase, lp.bugs.browser.bugtarget.ProductConfigureBugTrackerView, lp.bugs.browser.bugtask.BugTaskEditView, lp.bugs.browser.bugtracker.BugTrackerEditView, lp.bugs.browser.bugwatch.BugWatchEditView, lp.bugs.browser.cve.CveLinkView, lp.code.browser.branch.BranchEditView, lp.code.browser.branch.RegisterBranchMergeProposalView, lp.code.browser.branchmergeproposal.BranchMergeProposalMergedView, lp.code.browser.branchmergeproposal.BranchMergeProposalRequestReviewView, lp.code.browser.branchsubscription.BranchSubscriptionAddOtherView, lp.code.browser.codeimport.CodeImportEditView, lp.code.browser.codeimport.CodeImportNewView, lp.code.browser.codereviewvote.CodeReviewVoteReassign, lp.code.browser.gitref.GitRefRegisterMergeProposalView, lp.code.browser.gitrepository.GitRepositoryEditView, lp.code.browser.gitsubscription.GitSubscriptionAddOtherView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView, lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestBuildsView, lp.registry.browser.announcement.AnnouncementRetargetView, lp.registry.browser.distribution.DistributionEditView, lp.registry.browser.objectreassignment.ObjectReassignmentView, lp.registry.browser.peoplemerge.ValidatingMergeView, lp.registry.browser.person.BeginTeamClaimView, lp.registry.browser.person.PersonDeactivateAccountView, lp.registry.browser.person.PersonEditJabberIDsView, lp.registry.browser.person.PersonEditView, lp.registry.browser.person.PersonEditView, lp.registry.browser.product.ProductAddSeriesView, lp.registry.browser.product.ProductEditPeopleView, lp.registry.browser.product.ProductEditView, lp.registry.browser.product.ProductSetBranchView, lp.registry.browser.productrelease.ProductReleaseAddDownloadFileView, lp.registry.browser.productseries.ProductSeriesEditView, lp.registry.browser.productseries.ProductSeriesUbuntuPackagingView, lp.registry.browser.team.TeamAddMyTeamsView, lp.registry.browser.team.TeamContactAddressView, lp.registry.browser.team.TeamMemberAddView, lp.services.features.browser.edit.FeatureControlView, lp.services.verification.browser.logintoken.ValidateEmailView, lp.services.verification.browser.logintoken.ValidateGPGKeyView, lp.snappy.browser.snap.SnapAddView, lp.snappy.browser.snap.SnapAdminView, lp.snappy.browser.snap.SnapEditView, lp.soyuz.browser.archive.ArchiveActivateView, lp.soyuz.browser.archive.ArchiveEditView, lp.soyuz.browser.livefs.LiveFSAddView, lp.soyuz.browser.livefs.LiveFSEditView, lp.testopenid.browser.server.TestOpenIDLoginView, lp.translations.browser.customlanguagecode.CustomLanguageCodeAddView, lp.translations.browser.language.LanguageAddView, lp.translations.browser.language.LanguageAdminView, lp.translations.browser.potemplate.POTemplateEditView, lp.translations.browser.productseries.ProductSeriesTranslationsBzrImportView, lp.translations.browser.translationgroup.TranslationGroupAddTranslatorView, lp.translations.browser.translationgroup.TranslationGroupAddView, lp.translations.browser.translationgroup.TranslationGroupEditView, lp.translations.browser.translationimportqueue.TranslationImportQueueEntryView, lp.translations.browser.translator.TranslatorAdminView
Validate the form.

For each error encountered, the addError() method should be called to log the problem.

def validate_cancel(self, action, data):
Noop validation in case we cancel.

You can use this in your Form views by simply setting validator='validate_cancel' in the @action line of your cancel button.

def focusedElementScript(self):
Helper function to construct the script element content.
def isSingleLineLayout(self, field_name):
Undocumented
def isMultiLineLayout(self, field_name):
Undocumented
def isCheckBoxLayout(self, field_name):
Undocumented
def showOptionalMarker(self, field_name):
Should the (Optional) marker be shown?
API Documentation for Launchpad, generated by pydoctor at 2018-12-17 00:00:06.