using afIoc::Injectusing afPillow::Pageusing afEfanXtra::InitRenderusing afBedSheet::Textusing afBedSheet::ValueEncoder** (Pillow page) The main application page.constmixin IndexPage : Page { @Inject abstract VisitorBookService visitorBook @Inject abstract SampleData sampleDataabstract Visitor sample @InitRender Void initRender(){ sample = sampleData.createSampleVisitor} Str version(){ IndexPage#.pod.version.toStr}}** Returns the given source file as plain text.** Note this is not a Pillow Page but a Route Request handler.constclass SourceCodePage {// Ensure a plain text Mime Type, as most browsers don't know what 'text/fandoc' is! Obj service(Uri file){return Text.fromPlain(file.toFile.readAllStr)}}** (Pillow page) Displays a `Visitor` entity in full.constmixin VisitorPage : Page {abstract Visitor visitor @InitRender Void initRender(Visitor visitor){this.visitor = visitor}}** Converts `Visitor` objects to and from a 'Str'.** By registering this ValueEncoder (in `AppModule`) methods, such as ** '@InitRender' above, can take Visitor entities as InitRender arguments.constclass VisitorValueEncoder : ValueEncoder { @Inject privateconst VisitorBookService visitorBooknew make(|This|in){ in(this)}override Str toClient(Obj value){ visitor := (Visitor) valuereturn visitor.id.toStr}override Obj toValue(Str clientValue){return visitorBook.get(clientValue.toInt)}}