E0324: A deferred field has no loader
A field marked @ui.Defer("group") is loaded after the first render by the group's loader: the method marked @ui.Loads("group"), which takes a context.Context and returns an error. The page has none. A method named Load<Group> isn't one: a loader is declared with its attribute, never found by its name. Reported by vuka vet, the editor, at boot, and by vukavet.
Wrong
vuka
@web.Live("/applicants/{id}")
@ui.Island
type ApplicantDetail struct {
ui.Live
Name string
CV *CV @ui.Defer("profile")
}
func (p *ApplicantDetail) LoadProfile(ctx context.Context) error { … }Right
vuka
@web.Live("/applicants/{id}")
@ui.Island
type ApplicantDetail struct {
ui.Live
Name string
CV *CV @ui.Defer("profile")
}
@ui.Loads("profile")
func (p *ApplicantDetail) loadProfile(ctx context.Context) error { … }