examples_web

package
v3.0.0-...-a09109a Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CompositeComponentSample1PagePath = "/samples/composite-component-sample1"
View Source
const EventExamplePagePath = "/samples/event_handling/example"
View Source
const EventHandlingPagePath = "/samples/event_handling"
View Source
const FormHandlingPagePath = "/samples/form_handling"
View Source
const HelloButtonPath = "/samples/hello_button"
View Source
const HelloWorldPath = "/samples/hello_world"
View Source
const HelloWorldReloadPath = "/samples/hello_world_reload"
View Source
const HelloWorldTipTapPath = "/samples/hello_world_tiptap"
View Source
const MultiStatePagePath = "/samples/multi_state_page"
View Source
const Page1Path = "/samples/page_1"
View Source
const Page2Path = "/samples/page_2"
View Source
const PartialReloadPagePath = "/samples/partial_reload"
View Source
const PartialUpdatePagePath = "/samples/partial_update"
View Source
const ReloadWithFlashPath = "/samples/reload_with_flash"
View Source
const ShortCutSamplePath = "/samples/shortcut-sample"
View Source
const TypeSafeBuilderSamplePath = "/samples/type_safe_builder_sample"
View Source
const WebScopeUseLocalsPagePath = "/samples/web-scope-use-locals"
View Source
const WebScopeUsePlaidFormPagePath = "/samples/web-scope-use-plaid-form"

Variables

View Source
var CompositeComponentSample1PagePB = web.Page(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 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 HelloWorldTipTapPB = web.Page(HelloWorldTipTap).
	EventFunc("refresh", refresh)
View Source
var MultiStatePagePB = web.Page(MultiStatePage).
	EventFunc("openPanel", openPanel).
	EventFunc("update5", update5)
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 PartialUpdatePagePB = web.Page(PartialUpdatePage).
	EventFunc("edit1", edit1).
	EventFunc("reload2", reload2)
View Source
var ReloadWithFlashPB = web.Page(ReloadWithFlash).EventFunc("update2", update2)
View Source
var ShortCutSamplePB = web.Page(ShortCutSample)
View Source
var TypeSafeBuilderSamplePFPB = web.Page(TypeSafeBuilderSamplePF)
View Source
var UseLocalsPB = web.Page(UseLocals)
View Source
var UsePlaidFormPB = web.Page(UsePlaidForm).
	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 TypeSafeBuilderSamplePF

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

func UseLocals

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

@snippet_begin(WebScopeUseLocalsSample1)

func UsePlaidForm

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

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