Skip to content

XRX plus plus widget

NTsch edited this page Mar 16, 2021 · 10 revisions

A "widget" defines a part of the application visible to the user.

The XRX++-widget returns a HTML fragment. The HTML fragment to be returned is defined in xrx:view. xrx:view can

  • contain explicit HTML,
  • refer to
    • definitions of html-divisions (xrx:divs),
    • XRX++-embedded widgets (xrx:subwidget), or
    • a XRX++-template. The necessary CSS and JavaScript can be coded explicitly or imported via a reference to XRX++ CSS and XRX++ JavaScript objects (xrx:csss resp. xrx:jss).

xrx:variables defines the locally defined variables. xrx:constructor defines parameters to be passed to the widget.

It can have two modes:

  • main widget: The returned HTML will be inserted into the XRX++-portal referenced in the XRX++-widget.
  • embedded widget: The returned HTML will be inserted into another XRX++-widget.

The widget builds its HTML page via the widget module which evaluates the references to CSS and JavaScripts defined in the widget and integrates it into the portal

  • xrx:model defines XForms models which bind input elements to data. The references to the model in the xrx:view are handled by BetterForm.

TODO: To be added:

  • xrx:init
  • widgets only with xrx:div but no xrx:view?
  • extend on xrx:model in particular how BetterForm is part of the processing.

For further development see

The XRX++-widget is a XRX++ object

Clone this wiki locally