examples_web

package
v3.0.0-...-f10d631 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Page1Path = "/samples/page_1"
	Page2Path = "/samples/page_2"
)

Variables

View Source
var (
	EventHandlingPagePath = examples.URLPathByFunc(EventHandlingPage)
	EventExamplePagePath  = examples.URLPathByFunc(ExamplePage)
)
View Source
var (
	WebScopeUseLocalsPath = examples.URLPathByFunc(WebScopeUseLocals)
	WebScopeUseFormPath   = examples.URLPathByFunc(WebScopeUseForm)
)
View Source
var CompositeComponentSample1PagePB = web.Page(CompositeComponentSample1Page)
View Source
var CompositeComponentSample1PagePath = examples.URLPathByFunc(CompositeComponentSample1Page)
View Source
var EventHandlingPagePB = web.Page(EventHandlingPage).
	EventFunc("form", func(ctx *web.EventContext) (r web.EventResponse, err error) {
		r.RunScript = fmt.Sprintf(`alert("form data is %s")`, ctx.R.FormValue("name"))
		return
	}).
	EventFunc("hello", func(ctx *web.EventContext) (r web.EventResponse, err error) {
		r.RunScript = `alert("Hello World")`
		return
	})
View Source
var ExamplePagePB = web.Page(ExamplePage)
View Source
var FormHandlingPagePB = web.Page(FormHandlingPage).
	EventFunc("checkvalue", checkvalue)
View Source
var FormHandlingPagePath = examples.URLPathByFunc(FormHandlingPage)
View Source
var HelloButtonPB = web.Page(HelloButton).
	EventFunc("reload", reload)
View Source
var HelloWorldPB = web.Page(HelloWorld) // this is already a http.Handler
View Source
var HelloWorldReloadPB = web.Page(HelloWorldReload).
	EventFunc(reloadEvent, update)
View Source
var HelloWorldReloadPath = examples.URLPathByFunc(HelloWorldReload)
View Source
var HelloWorldTipTapPB = web.Page(HelloWorldTipTap).
	EventFunc("refresh", refresh)
View Source
var HelloWorldTipTapPath = examples.URLPathByFunc(HelloWorldTipTap)
View Source
var MultiStatePagePB = web.Page(MultiStatePage).
	EventFunc("openPanel", openPanel).
	EventFunc("update5", update5)
View Source
var MultiStatePagePath = examples.URLPathByFunc(MultiStatePage)
View Source
var Page1PB = web.Page(Page1)
View Source
var Page2PB = web.Page(Page2).
	EventFunc("doAction1", doAction1).
	EventFunc("doAction2", doAction2)
View Source
var PartialReloadPagePB = web.Page(PartialReloadPage).
	EventFunc("related", related).
	EventFunc("reload3", reload3).
	EventFunc("autoReload", autoReload).
	EventFunc("loadData", loadData)
View Source
var PartialReloadPagePath = examples.URLPathByFunc(PartialReloadPage)
View Source
var PartialUpdatePagePB = web.Page(PartialUpdatePage).
	EventFunc("edit1", edit1).
	EventFunc("reload2", reload2)
View Source
var PartialUpdatePagePath = examples.URLPathByFunc(PartialUpdatePage)
View Source
var ReloadWithFlashPB = web.Page(ReloadWithFlash).EventFunc("update2", update2)
View Source
var ReloadWithFlashPath = examples.URLPathByFunc(ReloadWithFlash)
View Source
var ShortCutSamplePB = web.Page(ShortCutSample)
View Source
var ShortCutSamplePath = examples.URLPathByFunc(ShortCutSample)
View Source
var TypeSafeBuilderSamplePFPB = web.Page(TypeSafeBuilderExample)
View Source
var TypeSafeBuilderSamplePath = examples.URLPathByFunc(TypeSafeBuilderExample)
View Source
var UseLocalsPB = web.Page(WebScopeUseLocals)
View Source
var UsePlaidFormPB = web.Page(WebScopeUseForm).
	EventFunc("updateValue", updateValue)

Functions

func Carousel(carouselId string, activeIndex int, items []*CarouselItem) HTMLComponent

func CompositeComponentSample1Page

func CompositeComponentSample1Page(ctx *web.EventContext) (pr web.PageResponse, err error)

func EventHandlingClearMergeQueryQuery

func EventHandlingClearMergeQueryQuery(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingClearMergeQuerySample)

func EventHandlingEventFunc

func EventHandlingEventFunc(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingEventFuncSample)

func EventHandlingFieldValue

func EventHandlingFieldValue(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingFieldValueSample)

func EventHandlingLocation

func EventHandlingLocation(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingLocationSample)

func EventHandlingMergeQuery

func EventHandlingMergeQuery(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingMergeQuerySample)

func EventHandlingPage

func EventHandlingPage(ctx *web.EventContext) (pr web.PageResponse, err error)

func EventHandlingPushState

func EventHandlingPushState(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingPushStateSample)

func EventHandlingPushStateURL

func EventHandlingPushStateURL(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingPushStateURLSample)

func EventHandlingQueries

func EventHandlingQueries(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingQueriesSample)

func EventHandlingQuery

func EventHandlingQuery(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingQuerySample)

func EventHandlingRaw

func EventHandlingRaw(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingRawSample)

func EventHandlingReload

func EventHandlingReload(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingReloadSample)

func EventHandlingScript

func EventHandlingScript(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingBeforeScriptSample)

func EventHandlingStringQuery

func EventHandlingStringQuery(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingStringQuerySample)

func EventHandlingURL

func EventHandlingURL(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(EventHandlingURLSample)

func ExamplePage

func ExamplePage(ctx *web.EventContext) (pr web.PageResponse, err error)

func FormHandlingPage

func FormHandlingPage(ctx *web.EventContext) (pr web.PageResponse, err error)

func HelloButton

func HelloButton(ctx *web.EventContext) (pr web.PageResponse, err error)

func HelloWorld

func HelloWorld(ctx *web.EventContext) (pr web.PageResponse, err error)

func HelloWorldReload

func HelloWorldReload(ctx *web.EventContext) (pr web.PageResponse, err error)

func HelloWorldTipTap

func HelloWorldTipTap(ctx *web.EventContext) (pr web.PageResponse, err error)

func MultiStatePage

func MultiStatePage(ctx *web.EventContext) (pr web.PageResponse, err error)
func Navbar(title string, activeIndex int, items ...HTMLComponent) HTMLComponent

func Page1

func Page1(ctx *web.EventContext) (pr web.PageResponse, err error)

func Page2

func Page2(ctx *web.EventContext) (pr web.PageResponse, err error)

func PartialReloadPage

func PartialReloadPage(ctx *web.EventContext) (pr web.PageResponse, err error)

func PartialUpdatePage

func PartialUpdatePage(ctx *web.EventContext) (pr web.PageResponse, err error)

func ReloadWithFlash

func ReloadWithFlash(ctx *web.EventContext) (pr web.PageResponse, err error)

func ShortCutSample

func ShortCutSample(ctx *web.EventContext) (pr web.PageResponse, err error)

func TypeSafeBuilderExample

func TypeSafeBuilderExample(ctx *web.EventContext) (pr web.PageResponse, err error)

func WebScopeUseForm

func WebScopeUseForm(ctx *web.EventContext) (pr web.PageResponse, err error)

func WebScopeUseLocals

func WebScopeUseLocals(ctx *web.EventContext) (pr web.PageResponse, err error)

@snippet_begin(WebScopeUseLocalsSample1)

Types

type CarouselItem

type CarouselItem struct {
	ImageSrc string
	ImageAlt string
}

type Data1

type Data1 struct {
	Msg string
}

type MyData

type MyData struct {
	Text1          string
	Checkbox1      string
	Color1         string
	Email1         string
	Radio1         string
	Range1         int
	Url1           string
	Tel1           string
	Month1         string
	Time1          string
	Week1          string
	DatetimeLocal1 string
	File1          []*multipart.FileHeader
	HiddenValue1   string
}

func (*MyData) File1Bytes

func (m *MyData) File1Bytes() string

type NestForm2

type NestForm2 struct {
	Email1 string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL