Source code for ll.xist.ns.struts_html

# -*- coding: utf-8 -*-
# cython: language_level=3, always_allow_keywords=True

## Copyright 1999-2018 by LivingLogic AG, Bayreuth/Germany
## Copyright 1999-2018 by Walter Dörwald
##
## All Rights Reserved
##
## See ll/xist/__init__.py for the license


"""
A module that allows you to embed tags from Struts__ html custom tag library.

__ http://jakarta.apache.org/struts/
"""


from ll.xist import xsc, sims


__docformat__ = "reStructuredText"


xmlns = "http://jakarta.apache.org/struts/tags-html"


[docs]class taglib(xsc.ProcInst): """ Creates a standard struts taglib header """ xmlns = xmlns
[docs] def publish(self, publisher): yield publisher.encode('<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="') yield publisher.encode(publisher.getobjectprefix(self)) yield publisher.encode('" %>')
[docs]class Element(xsc.Element): """ Common base class for all the struts html elements """ register = False
[docs]class PartMouseElement(Element): xmlns = xmlns
[docs] class Attrs(Element.Attrs):
[docs] class onblur(xsc.TextAttr): pass
[docs] class onchange(xsc.TextAttr): pass
[docs] class onclick(xsc.TextAttr): pass
[docs] class ondblclick(xsc.TextAttr): pass
[docs] class onfocus(xsc.TextAttr): pass
[docs] class onkeydown(xsc.TextAttr): pass
[docs] class onkeypress(xsc.TextAttr): pass
[docs] class onkeyup(xsc.TextAttr): pass
[docs] class onmousedown(xsc.TextAttr): pass
[docs] class onmousemove(xsc.TextAttr): pass
[docs] class onmouseout(xsc.TextAttr): pass
[docs] class onmouseover(xsc.TextAttr): pass
[docs] class onmouseup(xsc.TextAttr): pass
[docs] class style(xsc.TextAttr): pass
[docs] class styleClass(xsc.TextAttr): pass
[docs] class alt(xsc.TextAttr): pass
[docs] class altKey(xsc.TextAttr): pass
[docs] class title(xsc.TextAttr): pass
[docs] class titleKey(xsc.TextAttr): pass
[docs] class value(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs] class styleId(xsc.TextAttr): pass
[docs]class MouseElement(PartMouseElement): """ Common base class for all the struts elements which have mouse attributes """ xmlns = xmlns
[docs] class Attrs(PartMouseElement.Attrs):
[docs] class accesskey(xsc.TextAttr): pass
[docs] class tabindex(xsc.TextAttr): pass
[docs] class disabled(xsc.TextAttr): pass
[docs]class base(Element): """ Document base URI """ xmlns = xmlns model = sims.Empty()
[docs] class Attrs(Element.Attrs):
[docs] class target(xsc.URLAttr): pass
[docs] class server(xsc.TextAttr): pass
[docs]class button(MouseElement): """ A button """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class indexed(xsc.TextAttr): pass
[docs]class cancel(MouseElement): """ A cancel button """ xmlns = xmlns model = sims.Any()
[docs]class checkbox(MouseElement): """ A html checkbox element """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class indexed(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs]class errors(Element): """ Displays error messages which have been generated from an action or a validation method """ xmlns = xmlns model = sims.Empty()
[docs] class Attrs(Element.Attrs):
[docs] class bundle(xsc.TextAttr): pass
[docs] class locale(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs]class file(MouseElement): """ HTML input element of type file """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class accept(xsc.TextAttr): pass
[docs] class indexed(xsc.TextAttr): pass
[docs] class maxlength(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class size(xsc.TextAttr): pass
[docs]class form(Element): """ HTML form """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(Element.Attrs):
[docs] class action(xsc.TextAttr): pass
[docs] class enctype(xsc.TextAttr): pass
[docs] class focus(xsc.TextAttr): pass
[docs] class focusIndex(xsc.TextAttr): pass
[docs] class method(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class onreset(xsc.TextAttr): pass
[docs] class onsubmit(xsc.TextAttr): pass
[docs] class scope(xsc.TextAttr): pass
[docs] class style(xsc.TextAttr): pass
[docs] class styleClass(xsc.TextAttr): pass
[docs] class styleId(xsc.TextAttr): pass
[docs] class target(xsc.TextAttr): pass
[docs] class type(xsc.TextAttr): pass
[docs]class frame(Element): """ Render an HTML frame element """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(Element.Attrs):
[docs] class action(xsc.TextAttr): pass
[docs] class anchor(xsc.TextAttr): pass
[docs] class forward(xsc.TextAttr): pass
[docs] class frameborder(xsc.TextAttr): pass
[docs] class frameName(xsc.TextAttr): pass
[docs] class href(xsc.URLAttr): pass
[docs] class longdesc(xsc.TextAttr): pass
[docs] class marginheight(xsc.TextAttr): pass
[docs] class marginwidth(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class noresize(xsc.TextAttr): pass
[docs] class page(xsc.TextAttr): pass
[docs] class paramId(xsc.TextAttr): pass
[docs] class paramName(xsc.TextAttr): pass
[docs] class paramProperty(xsc.TextAttr): pass
[docs] class paramScope(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs] class scope(xsc.TextAttr): pass
[docs] class scrolling(xsc.TextAttr): pass
[docs] class style(xsc.TextAttr): pass
[docs] class styleClass(xsc.TextAttr): pass
[docs] class styleId(xsc.TextAttr): pass
[docs] class title(xsc.TextAttr): pass
[docs] class titleKey(xsc.TextAttr): pass
[docs] class transaction(xsc.TextAttr): pass
[docs]class hidden(PartMouseElement): """ hidden form field """ xmlns = xmlns model = sims.Empty()
[docs] class Attrs(PartMouseElement.Attrs):
[docs] class accesskey(xsc.TextAttr): pass
[docs] class indexed(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class write(xsc.TextAttr): pass
[docs]class html(Element): """ Render a HTML html element """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(Element.Attrs):
[docs] class locale(xsc.TextAttr): pass
[docs] class xhtml(xsc.TextAttr): pass
[docs]class image(MouseElement): """ image input """ xmlns = xmlns model = sims.Empty()
[docs] class Attrs(MouseElement.Attrs):
[docs] class align(xsc.TextAttr): pass
[docs] class border(xsc.TextAttr): pass
[docs] class bundle(xsc.TextAttr): pass
[docs] class indexed(xsc.TextAttr): pass
[docs] class locale(xsc.TextAttr): pass
[docs] class page(xsc.TextAttr): pass
[docs] class pageKey(xsc.TextAttr): pass
[docs] class src(xsc.TextAttr): pass
[docs] class srcKey(xsc.TextAttr): pass
[docs]class img(Element): """ html img tag """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(Element.Attrs):
[docs] class align(xsc.TextAttr): pass
[docs] class alt(xsc.TextAttr): pass
[docs] class altKey(xsc.TextAttr): pass
[docs] class border(xsc.TextAttr): pass
[docs] class bundle(xsc.TextAttr): pass
[docs] class height(xsc.TextAttr): pass
[docs] class hspace(xsc.TextAttr): pass
[docs] class imageName(xsc.TextAttr): pass
[docs] class ismap(xsc.TextAttr): pass
[docs] class locale(xsc.TextAttr): pass
[docs] class lowsrc(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class onclick(xsc.TextAttr): pass
[docs] class ondblclick(xsc.TextAttr): pass
[docs] class onkeydown(xsc.TextAttr): pass
[docs] class onkeypress(xsc.TextAttr): pass
[docs] class onkeyup(xsc.TextAttr): pass
[docs] class onmousedown(xsc.TextAttr): pass
[docs] class onmousemove(xsc.TextAttr): pass
[docs] class onmouseout(xsc.TextAttr): pass
[docs] class onmouseover(xsc.TextAttr): pass
[docs] class onmouseup(xsc.TextAttr): pass
[docs] class paramId(xsc.TextAttr): pass
[docs] class page(xsc.TextAttr): pass
[docs] class pageKey(xsc.TextAttr): pass
[docs] class paramName(xsc.TextAttr): pass
[docs] class paramProperty(xsc.TextAttr): pass
[docs] class paramScope(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs] class scope(xsc.TextAttr): pass
[docs] class src(xsc.TextAttr): pass
[docs] class srcKey(xsc.TextAttr): pass
[docs] class style(xsc.TextAttr): pass
[docs] class styleClass(xsc.TextAttr): pass
[docs] class styleId(xsc.TextAttr): pass
[docs] class title(xsc.TextAttr): pass
[docs] class titleKey(xsc.TextAttr): pass
[docs] class usemap(xsc.TextAttr): pass
[docs] class vspace(xsc.TextAttr): pass
[docs] class width(xsc.TextAttr): pass
[docs]class javascript(Element): """ Render JavaScript validation based on the validation rules loaded by the ValidatorPlugIn. """ xmlns = xmlns model = sims.Empty()
[docs] class Attrs(Element.Attrs):
[docs] class cdata(xsc.TextAttr): pass
[docs] class dynamicJavascript(xsc.TextAttr): pass
[docs] class formName(xsc.TextAttr): pass
[docs] class method(xsc.TextAttr): pass
[docs] class page(xsc.TextAttr): pass
[docs] class src(xsc.TextAttr): pass
[docs] class staticJavascript(xsc.TextAttr): pass
[docs] class htmlComment(xsc.TextAttr): pass
[docs]class messages(Element): """ Conditionally display a set of accumulated messages. """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(Element.Attrs):
[docs] class id(xsc.TextAttr): pass
[docs] class bundle(xsc.TextAttr): pass
[docs] class locale(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs] class header(xsc.TextAttr): pass
[docs] class footer(xsc.TextAttr): pass
[docs] class message(xsc.TextAttr): pass
[docs]class multibox(MouseElement): """ multiple checkbox element """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class name(xsc.TextAttr): pass
[docs]class option(Element): """ option element """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(Element.Attrs):
[docs] class bundle(xsc.TextAttr): pass
[docs] class dir(xsc.TextAttr): pass
[docs] class disabled(xsc.TextAttr): pass
[docs] class filter(xsc.TextAttr): pass
[docs] class lang(xsc.TextAttr): pass
[docs] class key(xsc.TextAttr): pass
[docs] class locale(xsc.TextAttr): pass
[docs] class style(xsc.TextAttr): pass
[docs] class styleId(xsc.TextAttr): pass
[docs] class styleClass(xsc.TextAttr): pass
[docs] class value(xsc.TextAttr): pass
[docs]class options(Element): """ struts html options element """ xmlns = xmlns model = sims.Empty()
[docs] class Attrs(Element.Attrs):
[docs] class collection(xsc.TextAttr): pass
[docs] class filter(xsc.TextAttr): pass
[docs] class labelName(xsc.TextAttr): pass
[docs] class labelProperty(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs] class style(xsc.TextAttr): pass
[docs] class styleClass(xsc.TextAttr): pass
[docs]class optionsCollection(Element): """ Render a collection of select options """ xmlns = xmlns model = sims.Empty()
[docs] class Attrs(Element.Attrs):
[docs] class filter(xsc.TextAttr): pass
[docs] class label(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs] class style(xsc.TextAttr): pass
[docs] class styleClass(xsc.TextAttr): pass
[docs] class value(xsc.TextAttr): pass
[docs]class password(MouseElement): """ a password text input field """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class indexed(xsc.TextAttr): pass
[docs] class maxlength(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class readonly(xsc.TextAttr): pass
[docs] class redisplay(xsc.TextAttr): pass
[docs] class size(xsc.TextAttr): pass
[docs]class radio(MouseElement): """ html input radio """ xmlns = xmlns
[docs] class Attrs(MouseElement.Attrs):
[docs] class indexed(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class idName(xsc.TextAttr): pass
[docs]class reset(MouseElement): """ a reset button """ xmlns = xmlns model = sims.Any()
[docs]class rewrite(Element): """ render a request uri like html link """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(Element.Attrs):
[docs] class anchor(xsc.TextAttr): pass
[docs] class forward(xsc.TextAttr): pass
[docs] class href(xsc.URLAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class page(xsc.TextAttr): pass
[docs] class paramId(xsc.TextAttr): pass
[docs] class paramName(xsc.TextAttr): pass
[docs] class paramProperty(xsc.TextAttr): pass
[docs] class paramScope(xsc.TextAttr): pass
[docs] class property(xsc.TextAttr): pass
[docs] class scope(xsc.TextAttr): pass
[docs] class transaction(xsc.TextAttr): pass
[docs]class select(PartMouseElement): """ a select element text input field """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(PartMouseElement.Attrs):
[docs] class disabled(xsc.TextAttr): pass
[docs] class indexed(xsc.TextAttr): pass
[docs] class multiple(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class tabindex(xsc.TextAttr): pass
[docs] class size(xsc.TextAttr): pass
[docs]class submit(MouseElement): """ a submit button """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class indexed(xsc.TextAttr): pass
[docs]class text(MouseElement): """ a text input field """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class indexed(xsc.TextAttr): pass
[docs] class maxlength(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class readonly(xsc.TextAttr): pass
[docs] class size(xsc.TextAttr): pass
[docs]class textarea(MouseElement): """ a textarea """ xmlns = xmlns model = sims.Any()
[docs] class Attrs(MouseElement.Attrs):
[docs] class cols(xsc.TextAttr): pass
[docs] class indexed(xsc.TextAttr): pass
[docs] class name(xsc.TextAttr): pass
[docs] class readonly(xsc.TextAttr): pass
[docs] class rows(xsc.TextAttr): pass
[docs]class xhtml(Element): """ Render HTML tags as XHTML """ xmlns = xmlns model = sims.Empty()