render* ( value name renderer -- xml )
Furnace framework » Furnace presentation layer » HTML components

Prev:textarea


Vocabulary
html.components

Inputs
valuea value
namea value name
renderera component renderer


Outputs
xmlan XML chunk


Generic word contract
Renders an HTML component, outputting an XHTML snippet.

Definition

GENERIC: render* ( value name renderer -- xml )


Methods

M: checkbox render*
[ "true" and ] [ ] [ label>> ] tri* 3 nenum T{ xml-chunk
{ seq
V{
""
T{ tag
{ name ~name~ }
{ attrs ~attrs~ }
{ children ~vector~ }
}
""
}
}
} interpolate-xml ;



M:: choice render* ( value name choice -- xml )
choice size>> :> size choice multiple>> "true" and
:> multiple value choice render-options :> contents H{
{ "name" name }
{ "multiple" multiple }
{ "contents" contents }
{ "size" size }
} T{ xml-chunk
{ seq
V{
""
T{ tag
{ name ~name~ }
{ attrs ~attrs~ }
{ children ~vector~ }
}
""
}
}
} interpolate-xml ;















M: hidden render*
drop 2 nenum T{ xml-chunk
{ seq
V{
""
T{ tag { name ~name~ } { attrs ~attrs~ } }
""
}
}
} interpolate-xml ;












M: link render*
nip swap
[ target>> ] [ [ link-href ] [ link-title ] bi ] bi* 3 nenum
T{ xml-chunk
{ seq
V{
""
T{ tag
{ name ~name~ }
{ attrs ~attrs~ }
{ children ~vector~ }
}
""
}
}
} interpolate-xml ;






M:: textarea render* ( value name area -- xml )
area rows>> :> rows area cols>> :> cols H{
{ "name" name }
{ "value" value }
{ "cols" cols }
{ "rows" rows }
} T{ xml-chunk
{ seq
V{
""
T{ tag
{ name ~name~ }
{ attrs ~attrs~ }
{ children ~vector~ }
}
""
}
}
} interpolate-xml ;