Antilia's Advanced Widgets
Reusable components for Apache Wicket, React and Svelte, with Ajax and real-time (websocket) support.
- 32 demos
- 3 frameworks
- 12 themes
The demos are for visitors who sign in. Sign in as user, password $Amigo_Mellon_Friend_4_3_2_1.
0 of 10 sessions in use. We keep no record of the people who visit this site.
Every demo, by category
Point at a demo to preview it, click it to open it.
Examples
Forms
Layout
Themes
Address Book
A realistic application built only from these widgets: 2,500 contacts searched by facets with live counts, find bars, a split panel and a JSON grid you can sort, page, rearrange and export as CSV.
Examples Wicket
- A SplitPanel holds the filters on the left and the contacts on the right. Drag its divider to share the space differently, or collapse the filters with the arrows on it
- Each category of the filters, the country, the year of birth and the profession, is a CollapsiblePanel: click its title to fold it. Its header holds an action, an eraser on the right that clears the filters of the category; it shows only while there is something to clear. The actions of a CollapsiblePanel are new: addAction adds them, outside the summary, so a click on one neither folds nor unfolds the panel
- On top of each category, a FindAutocomplete, a find bar, finds any of its values not chosen yet as you type, with how many contacts have it. What you pick is not kept in the bar as a chip: it becomes a checked box below, and the bar is empty for the next one. Below, the values chosen come first, then the most common others; uncheck a box to deselect its value
- The counts are those of faceted search: a category counts the contacts the other categories leave, so choosing Spain leaves the counts of the other countries as they were, while the years and the professions count the contacts in Spain only
- Above the table, the filters chosen are chips too, each with an x, and "Clear all" on the left clears every category
- The table is a JsonBasedDynamicDataTable, its rows rendered in the browser from JSON: rows to select, sortable columns, pages of 25, 50 or 100 rows, a search by name or email in its navigation, columns to resize, to move by their handle and to hide or show with the column chooser (City is hidden at first), and an export of the selected contacts, or of all, as CSV
- The card in each row shows the contact in a Modal; the arrow saves the contact as a vCard, the file address books import
JSON Grid
A data grid whose rows are rendered in the browser from JSON and per-column HTML templates instead of Wicket components: one light component that sorts, pages, edits in a modal and repaints rows pushed live over a websocket. The same grid in React and Svelte.
Data Wicket React Svelte
- Most columns read their template from an .html file next to the page, found like a panel's markup: IdColumn.html, FirstNameColumn.html, LastNameColumn.html, AddressColumn.html and PhonesColumn.html. Switching to German picks the _de or _es variants where they exist, and the headers come from the page's properties
- "Push the rows" sends the rows of the current page, in reverse order, as JSON over the web socket connection, and the table repaints them in the browser without any request to the server. The server always serves the rows sorted by first name, so the reversed order can only have come from the push; a refresh restores it
- The edit, delete and download buttons are IconBasedRowActions: plain markup, not components, with their tooltip as title. A click goes to the table, which looks the row up by its key and hands it to the action registered for the button
- The pencil opens a form in the Modal of ui-components, the dialog the React and Svelte tabs use too: a title, the form and a × that closes it, over the dimmed page; drag the title to move the dialog, double-click it to fold it. Escape closes it too, and once a field was changed it asks first whether to discard the changes. Every field is required; the address column shows the street, city and country in one line, the form edits them separately. Saving updates the user and repaints the rows
- The bin asks to confirm the deletion in the same dialog before it deletes the user
- While a request of the table runs, for example saving, deleting or paging, a veil blocks the table and, if it takes a while, shows a spinner in the theme's colors. The hourglass in the navigation runs a slow action, which takes two seconds on the server, to show it
- The body of the table is 800 pixels high and scrolls, while the headers, the toolbars above them and the navigation below stay in view; a page with fewer rows leaves the rest empty, so the table keeps its height. "Body height" and its unit above change it: pixels, percent of the window's height, or percent of the parent's height, which needs a parent with a height of its own and is as high as the rows here; a negative height lets the body take the height of its rows
- Double-click a phone number to copy it to the clipboard: a ClipboardCopyBehavior script copies it and shows a check mark on it. Whatever is typed into the form, such as markup or script in a name, is shown as text everywhere
- The download button saves the user as a jCard (RFC 7095), the JSON form of the vCard format address books exchange users in, through an AjaxDownloadActionColumnContributor shown as an icon: the browser fetches the file itself and hands it to its own download manager. Each row's element carries an id made of the table's id and the row key, so a row keeps its identity whatever happens to the rows around it
- The Progress column is a ProgressBarColumn, whose cells are the markup of the ProgressBar component, striped and moving. While the page is open, a timer of its own advances the progress of random users among those the page shows every 100 ms, and pushes the changed rows over the web socket connection every 3 seconds; each push repaints only its row. The table reports the rows it sends to the browser, so rows on other pages are neither advanced nor pushed. Clicks keep working while the rows repaint, because they are dispatched by the row key
- The first, last name and born columns sort the rows when their header is clicked, the highlighted arrow showing the order. Sorting queries the users again on the server, shows the first page, repaints every row and clears the selection; the # column numbers the rows across pages, and the navigation is shown above and below the table
- Columns can be resized by dragging the right edge of a header, or with the arrow keys on that edge, never narrower than 80 pixels. While dragging, a line with arrows shows where the edge will land, a shaded band the new extent of the column and a label its width in pixels. The columns are resizable because the page added a ResizableColumnsBehavior to the table, and the table grows with them; the "Resizable" option above adds or removes it. The selection, #, Actions and ID columns cannot be resized. Each resize is sent to the server, which renders the table with the same widths next time
- The table takes the full width of the page, sharing it among the columns by their content; "Width" switches to a table as wide as its columns. "Proportions" lets the page set the relative widths of the columns instead. While no column has been resized, a full-width table follows the size of the window
- The (i) next to every setting above says what it does; every change is posted via Ajax. The same settings and actions, with the rows rendered on the server, are in the BeanBasedDynamicDataTable example
- The options above also place the navigation and the selection bar on top, at the bottom or both, and choose the theme: the colors of the table, its progress bars and this explanation come from a theme of ui-components, switched by a CSS class only. The rows per page are chosen in the navigation, with the same Dropdown as the settings
- The database of this example holds a thousand users. The text field in front of the navigation filters them by first and last name as you type; it is a component the example plugs into the navigation, not a feature of the table
- "Rows from" chooses where the browser fetches the rows from: an Ajax behavior of the table on this page, or a JsonRowsResource mounted at /api/users, a stateless request that does not touch the page, with the page, the sort and the filter in its URL. Paging, sorting and selecting still go through the page
- The footer row under the rows tells how many users the filter lets through and their average age: the First Name and Born columns have a footer template, which the browser fills with the footer data that comes with the rows, given by the UsersProvider, an IFooterDataProvider; the JsonRowsResource sends it too. Its cells move, hide and resize with their columns
- The download button after the paging links exports the selected users as a CSV file, or all of them if none is selected, through a CsvExportToolbarAction; a file of all of them ends with the line of the footer, setExportFooter(true), its fields the footer export values of the columns
- The grid next to it exports the same users to Excel through an XlsxExportToolbarAction, with the same rules: a sheet whose header stays in view and filters, the ids as numbers, the dates of birth as dates, the progress as a number with a percent sign, from the export format of its column, and the footer in bold under the rows
- The checkboxes of the first column select rows; the selection is kept on the server, by key, so it survives paging, sorting and pushes. The header checkbox selects the page and shows whether all, some or none of its rows are selected. Once the whole page is selected, a bar below the top navigation offers to select every user; checking or unchecking a row afterwards turns the selection back into the rows the page shows checked. The navigation tells how many users the server holds as selected, such as "2 selected": a SelectionCountToolbarAction added to the table, which "Selection count" above turns off and on. The checkboxes are drawn by the table in the colors of the theme, the same in every browser and visible on the color of the headers
- Editing a user also selects it and shows it in the details panel below the table
- Delete a user in one tab and click it in another: the click still reaches the table, which reports that the user is gone instead of failing with a missing component
- The plus in the navigation is an IconBasedToolbarAction: it opens the same form as the pencil, empty, and adds the user it is saved with
- "Icons" switches the icons of the actions between the built-in ones, SvgIcon, the solid icons of Font Awesome as inline SVG read from its web jar, which need no style sheet or font, and FontAwesomeIcon, the same icons drawn by the Font Awesome font, which the page loads from its web jar. Every icon is an IIcon
- The button with the columns in the navigation is a ColumnChooserToolbarAction: it lists the columns implementing IHideableColumn, those after ID, with a tick on those shown. Click a column to tick or untick it and apply to show the ticked ones; Home phone, Cell phone, City and Country are hidden at first
- The page added a MovableColumnsBehavior to the table, and the columns after ID implement IMovableColumn: drag the dotted handle in front of their title, with the mouse, a pen or a finger, and drop the column between two others, a line with arrows showing where it will land, or move it with the arrow keys on the handle. The selection, #, Actions and ID columns keep their places, so no marker is shown where the column would move one of them. After a move the table is rendered again with its rows, without fetching them
- The table remembers the order, the visibility and the widths of its columns in its column state store, the session by default: reload the page and the columns are as you left them. "Column state" switches to a store of this example keeping the states in a file of the temporary directory, which survives restarts of the server; an application would keep them in its database, by user, through an IColumnStateStore of its own. "Reset the columns" brings back the order, visibility and widths the page starts with
- "Infinite scroll" turns the pages into one list: whenever the body is scrolled to its last row, the table fetches the next page of users and adds them, blocked by its veil meanwhile. The paging links and the rows per page are left out and the navigation tells how many users are shown; sorting or filtering starts over from the first page. It is JsonBasedDynamicDataTable.setInfiniteScroll(true)
- The scroll bar of the body looks the same in every browser: the native one is hidden and a ScrollbarBehavior script draws a slim one in the theme's colors, which can be dragged or clicked; the wheel, the keys and touch scroll as usual
- The settings take the whole width of the page in as many columns as fit. "Reset the columns" and "Push the rows" are AjaxActionButtons, the buttons of the Buttons demo
The React and Svelte tabs hold an empty element of this page each, which an app of @antilia/react or @antilia/svelte renders the same grid into, with its DataTable: the framework renders the headers, the navigation and the column chooser, the script of the Wicket grid renders the rows from the same column templates. Columns move, resize and hide as here, rows are selected with the same checkboxes, counted in the navigation. The drop-downs on top choose where the rows come from: the mounted resource /api/users, which creates, changes and deletes them too (POST, PUT and DELETE), so what the app saves is what this page shows; or a local list of JSON, the first 200 users the page gave the app, which the DataTable filters, sorts and pages in the browser and the app changes in the browser only. They also choose paging or infinite scrolling, the selection, its count and resizable columns.
Bean Grid
The same grid built the classic Wicket way: every row made of Wicket components and columns on the server and repainted via Ajax, looking and behaving exactly like the JSON grid.
Data Wicket
- The columns are Wicket's IColumns, here LambdaColumns. BeanSelectionColumn, BeanRowNumberColumn and BeanActionsColumn select, number and act on the rows; IFixedWidthColumn marks the columns that cannot be resized, IMovableColumn and IHideableColumn those the user can move and hide
- Paging, sorting, filtering, saving, adding and deleting render the rows again via Ajax, not the whole table, so the filter in front of the navigation keeps its focus
- The footer row under the rows tells how many users the filter lets through and their average age, under the First Name and Born columns, which implement IFooterColumn. Its cells move, hide and resize with their columns, and it is rendered again with the rows, so it follows the filter, saving, adding and deleting. A CSV or Excel export of all the users ends with its line, the footer export values of the columns
- The Progress column is a BeanProgressBarColumn: a ProgressBar component per row, in the look of the table and named after the column for screen readers; a CSV export writes the number, and an Excel export the number with a percent sign, as the column implements IExportFormatColumn. The JSON example draws the same bar in the browser with a ProgressBarColumn
- The last name is a BeanActionLinkColumn: the value of the cell is the link of the row's edit action, which the table runs as if its pencil were clicked, the row looked up again by its key
- The actions of a row are the same IconBasedRowActions as in the JSON example: plain markup whose clicks the table dispatches by the row's key, so a click on a user deleted in another tab still reaches the table
- The settings above are the same as in the JSON example, each explained by its (i). Every change is posted via Ajax
- The navigation tells how many users are selected, a SelectionCountToolbarAction, and the rows per page are chosen with the same Dropdown as the settings. "Reset the columns" is an AjaxActionButton; there is no web socket connection and no pushing of rows here
JSON Infinite List
An infinite list of a thousand cards: the server sends the users as JSON, 24 at a time as you scroll, and the browser renders each card from an HTML template; clicks on a card reach the server as actions.
Data Wicket React Svelte
- Wicket renders the list as one empty <div>: JsonBasedInfiniteList is a single component without children. The users come as JSON from the list's own endpoint, 24 at a time, and each card is the template UserCard.html, next to this page, evaluated in the browser against the JSON of a user; switching to German or Spanish picks UserCard_de.html or UserCard_es.html
- Scroll the list to its last card and it fetches the next 24 users and adds them, telling below the cards that it is loading and, at the end, that all of them are shown. The list is 70% of the window high and scrolls on its own, with the slim scroll bar of a ScrollbarBehavior in the theme's colors
- The cards are laid out in a grid by the CSS of this page only; the list lays its items out in a column by default
- A click on a card shows the user next to the list, the pencil edits the user and the bin deletes it. None of them is a component: they are plain markup with a data-dt-action attribute, and a click goes to the list, which looks the user up by its key and hands it to the IItemAction registered for the action, the same way the JSON table dispatches the clicks on its rows
- Since the list has no children, the edit form and the confirmation of a deletion are shown in the Modal of ui-components on the page. Saving an edited user repaints only its card, with JsonBasedInfiniteList.updateItem; adding or deleting a user has the list fetch the users it shows again, with refresh
- Delete a user in one tab and click it in another: the click still reaches the list, which reports that the user is gone instead of failing with a missing component
- The filter and the sort start over from the first page of users, scrolled to the top, with reset and refresh
- While the page is open, the server advances the progress of random users among those the list shows and pushes the changed users over the page's web socket connection every 3 seconds; each push repaints only its card. The list reports the users it sends to the browser, so the others are neither advanced nor pushed. The messages are those of the JSON table
- The list is a feed, as screen readers know it: every card is an article telling its position and the number of users. Tab to a card, press Enter to show its details, and Page Down and Page Up to move between the cards
The React and Svelte tabs show the same cards with the InfiniteList of @antilia/react and @antilia/svelte, from the same template, the users loaded from the mounted resource /api/users. The details, the edit form and the confirmation of a deletion are the app's own, and what the app changes stays in this browser.
Tree
The tree of life twice: as a tree of Wicket components expanded via Ajax, and as one component rendered in the browser from JSON, loading its branches on demand and driven fully by the keyboard (WAI-ARIA).
Data Wicket React Svelte
- On the left, Tree: a tree of Wicket components, a NestedTree of wicket-extensions whose nodes render the icons of ui-components, inline SVG drawn for the trees, instead of the images of the extensions' themes. Expanding a group repaints it through Ajax
- In the middle, JsonBasedTree: a single component without children, whose nodes are rendered in the browser from JSON with a template, as the rows of the JSON table are. The kingdoms and the children of the groups expanded come with the page; the children of another group come from the tree's own endpoint the first time it is expanded. The tree is told what the user expands, so it shows the same groups when it is rendered again
- Groups are selected as well as species, as both trees are told with setSelectBranches(true): click a group, such as the dinosaurs, and its card is shown on the right, repainted through Ajax by onSelect, the group expanded if it was not. Click a species, such as Tyrannosaurus rex, and the right shows its lineage, from the kingdom down, the card of its group and, below it, the card of the species. The arrow of a group still only expands or collapses it
- JsonBasedTree is a WAI-ARIA tree: Tab to it, then Up and Down move between the nodes, Right expands a group or moves to its first child, Left collapses it or moves to its parent, Home and End go to the first and the last node, and Enter or Space selects a group or a species. In Tree, Tab moves between the nodes, which are buttons telling whether their group is expanded
- The names, the descriptions, the ranks, the periods and the times are written in the language of the session; switch to German or Spanish to see them change, together with the texts of the trees, which are in the bundles of ui-components
- "Icons" above the trees chooses their icons: their own, the Font Awesome icons as inline SVG (SvgIcon), or the same drawn by the Font Awesome font (FontAwesomeIcon), given to the trees with setIcon(TreeIcon, IIcon). The arrows of the groups turn whatever icon they are; the React and Svelte tabs choose them the same way, through the icons of their trees
The React and Svelte tabs show the same tree in the Tree of @antilia/react and @antilia/svelte, with the prop selectBranches. The tree comes from the mounted resource /api/tree-of-life, the children of a group from /api/tree-of-life?parent=id, and the cards of what is selected are shown by the app itself. Ma stands for millions of years ago.
Tree Grid
A tree with columns: the scientific names, ranks and periods of the tree of life, as a Wicket table tree or rendered in the browser from JSON as a WAI-ARIA tree grid, with lazily loaded branches and resizable columns.
Data Wicket React Svelte
- The first pill, TreeGrid: a tree grid of Wicket components, a TableTree of wicket-extensions whose tree column renders the nodes of Tree, with the icons of ui-components. The other columns are ordinary columns of a DataTable; expanding a group repaints the table through Ajax
- The second pill, JsonBasedTreeGrid: a JsonBasedTree shown as a WAI-ARIA treegrid, a single component whose rows are rendered in the browser from JSON. The tree column renders the template of the node, each other column a template of its own from the same JSON; the children of a group follow its row, loaded the first time it is expanded
- The drop-down above them chooses whether the user can resize the columns of both by dragging the right edge of a header, and how: keeping the width of the table, a column taking its width from its neighbour (setResizableColumns(Mode.FIT)), or stretching the table as a column grows (Mode.STRETCH)
- Groups are selected as well as species (setSelectBranches(true)): click the row of a group, such as the dinosaurs, and its card is shown on the right, repainted through Ajax by onSelect, its row marked as selected and the group expanded if it was not. Click a species, such as Tyrannosaurus rex, and the right shows its lineage, the card of its group and, below it, the card of the species. The arrow of a group still only expands or collapses it
- In JsonBasedTreeGrid, Tab moves to the rows; Up and Down move between them, Right and Left expand and collapse a group or move to its first child and its parent, Home and End go to the first and the last row, and Enter or Space selects a group or a species
- The headers, the names, the ranks, the periods and the times are written in the language of the session
- "Icons" above the trees chooses their icons: their own, the Font Awesome icons as inline SVG (SvgIcon), or the same drawn by the Font Awesome font (FontAwesomeIcon), given to the trees with setIcon(TreeIcon, IIcon). The arrows of the groups turn whatever icon they are; the React and Svelte tabs choose them the same way, through the icons of their trees
The React and Svelte tabs show the same tree in the TreeGrid of @antilia/react and @antilia/svelte, with the same columns and the prop selectBranches, loaded from the mounted resource /api/tree-of-life; the cards of what is selected are shown by the app itself. Ma stands for millions of years ago.
Master and Detail
Two grids working together: choose a country in the master, rendered in the browser from JSON, and the detail, rendered on the server by Wicket components, shows its users via Ajax.
Data Wicket
- Select a country, with the check box of its row, and the table below shows its users; deselect it and it shows all of them. The master selects one row at most, setSelectionMode(SelectionMode.ONE), and onSelectionChanged refreshes the detail via Ajax
- The drop-downs above set both tables: whether their columns are resized, keeping the width of the table (ResizableColumnsBehavior with Mode.FIT) or stretching it (Mode.STRETCH); whether they take the full width (setAdjustToParentWidth(true)) or the width of their content; and whether they are stacked or side by side
- Resizing the columns of one table leaves the other alone. Stacked, the page grows with the wider table and scrolls sideways; side by side, each table scrolls sideways in its own column
Progress Bar
Known and unknown progress driven by an Ajax timer, on the native progress element with moving stripes, so it works under a strict Content Security Policy.
Feedback Wicket React Svelte
The ProgressBar component from ui-components shows a percentage as a native progress element, so it works under a strict Content Security Policy. Start advances it every 300 ms via an Ajax timer.
Its filled part is striped and the stripes move, unless your system asks for reduced motion. setStill(true) draws a still bar instead, solid at any percentage, for a bar that shows a figure, such as how much of a bill is paid, rather than something under way: the second bar follows the first one, still. A bar whose model holds null is indeterminate: it tells that something is going on without knowing how far it got. The colors come from the theme chosen in the top bar, the same themes the DynamicDataTable uses.
Notifications
Toasts in any corner of the window, of four types or the page's own, closed by the user or after a countdown; in Wicket the page's feedback messages become notifications by themselves.
Feedback Wicket React Svelte
Notifications from ui-components show short messages as toasts, stacked in a corner of the window or in the middle of its top or bottom edge. Each has a header, with the icon of its type, a title and a button closing it, and a body, text or HTML. It stays until the user closes it, or goes after a timeout, which a bar along its bottom counts down, 5 seconds by default, while errors stay until closed; the countdown waits while the pointer is over the notification or the focus in it, and Escape closes the one that has the focus. There are four types, success, error, warning and information, and the page may have its own: the note below is violet and has a light bulb, from a class of the page's style sheet. Notifications are in the colors of the theme, and work under a strict Content Security Policy.
Choose a notification in the first form and show it via Ajax with show(Notification). In Wicket the feedback messages of the page become notifications too: save the second form without a name, and the required field's error shows as one; with a name, the page's success() does. Every page of this demo shows its feedback messages this way, with the Notifications of its base page. The React and Svelte tabs show the same with their Notifications.
"Show after a redirect" keeps the notification in the session with SessionNotifications.show(Notification) and goes to a new page, whose Notifications show it, as after signing in elsewhere and coming back. The feedback messages of the session, such as getSession().success(), come over a redirect the same way. This is Wicket only: React and Svelte show their notifications in the page they are in.
Popovers
A bubble with an arrow pointing at what opened it: on any side, centered or along an edge, in nine designs and five variants of the theme; with text from the server, or components such as a form, help on fields and more on table rows.
Feedback Wicket React Svelte
Popover from ui-components shows a bubble with an arrow pointing at the button that opened it, telling more about it: a title and a text, or components of the page. The server shows it in the response to the click, so what it says can come from the server just then. It closes with its ×, Escape, a click outside it or a click on the button again, and gives the focus back to the button; it follows the button as the page scrolls.
It opens where you ask: on any side of the button, centered on it or along it from either edge, or on the side with the most room. Without room on its side it opens on the other one, and it slides to stay in the window, its arrow still pointing at the button. Nine designs, from a card with a stripe of its color to glass, neon or a comic speech bubble, each in five variants, take their colors from the theme, light or dark. The gallery draws each design open where its Position drop-down says, and Open it opens it there for real.
A popover can show any component: the facts below are rendered by the server as the popover opens, and the form renaming the project is a Wicket form in a popover, its error shown in it. React and Svelte render their own content into it. Everything works under a strict Content Security Policy, without inline style.
Dropdown
A drop-down in the colors of the theme that replaces the native select: one or many values as chips, opened, filtered and navigated by keyboard in the browser, while forms and Ajax work as with a plain select.
Forms Wicket React Svelte
Dropdown and MultiDropdown from ui-components are drop-downs that look the same in every browser and take the colors of the theme. Everything happens in the browser: the list opens, filters and is navigated with the keyboard without a request to the server. The native select stays in the page, hidden, and holds the choice, so a form posts it as always and an Ajax behavior on its change event is notified as with a native select.
Use the arrow keys to move through the options, Enter or Space to choose and Escape to close; type into the filter, which a list gets from eight options on, or always when asked to. A multiple drop-down stays open while options are toggled and shows the chosen ones as chips in the theme's colors, each with an x removing it; Backspace on the button removes the last one. The text below the form follows every choice via Ajax.
The countries chosen most come first, in a group of their own, and the others under them. The button below the form opens a modal dialog choosing a unit of measure from a long list of long options in groups, the few used most first and the others by what they measure: the open list reaches over the footer of the dialog rather than being cut by its body, a long option wraps onto more lines, and the filter hides a group none of whose options match.
Autocomplete
Suggestions fetched via Ajax as JSON and rendered in the browser from templates, flags and all: one or many values as chips, or a find bar handing each pick to the page.
Forms Wicket React Svelte
Autocomplete and MultiAutocomplete from ui-components suggest values as you type. The suggestions come from the server via Ajax as JSON, and each row is rendered in the browser from a template, the same way the cells of the JSON table are: the users show their name with their city and country below, the countries their flag and name. {{@label}} is the label of a value.
The chosen values are chips in the theme's colors with an x removing them, like those of the multiple drop-down; Backspace in the empty field removes the last one. One value: the chip stands in for the field until it is removed. The hidden input holds the ids of the chosen values, so a form posts them as always and an Ajax behavior on its change event is notified; the text below the form follows every choice.
FindAutocomplete is a find bar: what you pick is not kept as a chip but handed to the page, and the field is empty again for the next one. Here the countries you find are added to the list below it, each with an x removing it, and the bar no longer suggests those already listed. The Address Book example filters its contacts the same way.
Disabled, an autocomplete shows its values greyed out, without the x of the chips, and cannot be typed in; a form sending it leaves its values as they were.
The rows of the users end with actions, defined by the page as templates: the (i) shows a tooltip with their address, phones and birthday, itself a template rendered from the JSON of the row as the cells of the JSON table are, and the phone is reported to the page via Ajax, which says whom it calls below the form. Up and Down move from row to row, F1 toggles the tooltip of the active row, Enter chooses it and Escape closes the tooltip, then the list. The values are escaped by {{ }}, so a name holding markup shows as text.
SearchAutocomplete is a search box: its value is the text you type, which its own form sends, and the suggestions only complete it. Up and Down put the name of the user they reach into the field, Escape brings back what you typed; Enter sends the form by its default button unless Up or Down reached a suggestion, which Enter then chooses. Choosing one puts its name into the field and, with SubmitOnChooseBehavior, sends the form too; AjaxChooseBehavior would tell the server the user chosen instead. The page says how many users match the text sent.
Palette
Choosing several values out of many, even thousands: two lists with a filter, drag and drop, keyboard moves and their own order, drawn lazily in the browser and posted like a plain select.
Forms Wicket React Svelte
Palette from ui-components chooses several values out of many: the available ones on the left, the chosen ones on the right and arrows between them moving the highlighted ones, or all of them, from one side to the other. Click to highlight a choice, Ctrl or Shift with the click for several; a double click, Enter or dragging a choice to the other list moves it too. The available ones get a filter from eight choices on. Everything happens in the browser: the native select stays in the page, hidden, and holds the choice, so a form posts it as always and an Ajax behavior on its change event is notified as with a native select.
When the order matters, the chosen ones keep the order they were chosen in and are moved up and down with the buttons next to them, with Alt and the arrow keys or by dragging them to their place; the form posts them in that order and the model keeps it. Untick the check box and the columns show in the order of the choices again. Untick the check box of the skills and they have no filter: it filters in the browser, over the choices the page rendered, without asking the server. The columns' palette has titles of its own, and the other check box numbers its rows or not. The text below the form follows every change via Ajax.
The countries are many choices, some 250: each list draws the first 30 rows and 30 more each time it is scrolled to its end, so a palette with thousands of choices opens as fast as one with ten. setPageSize changes how many, 0 draws them all. The filter searches all countries, drawn or not, and draws its matches from the first one; the arrow keys, Shift, Ctrl+A and “add all” also reach the rows not drawn yet.
The filter matches anywhere in the names unless setMatcher says otherwise: from their start, anywhere, at their end or at the start of their words, with PaletteMatcher, or by a matcher of one’s own, an IPaletteMatcher whose script registers it among Wicket.Palette.matchers. The part of a name it matched is underlined.
Date and time pickers
Date and time pickers that speak every locale: the format of the field, the language of the calendar, the first day of the week and the 12- or 24-hour clock; typed or picked, by mouse or keyboard, checked on the server.
Forms Wicket React Svelte
DatePicker and DateTimePicker from ui-components take a date, or a date with a time, from a calendar or typed into their field. Everything they show follows the locale: the field writes the date in its order and with its separators, 09.10.2026 in Germany and 10/09/2026 in the United States, and reads it back typed so, with or without separators and with a year of two digits; the calendar names the months and the days in its language and starts the week on its first day; the time has its clock, 24 hours or 12 with AM and PM. The texts of the buttons come from the bundles, in the language of the page. The input holds the value as ISO text, which the form posts and the server converts into a LocalDate or LocalDateTime, checking the bounds the calendar keeps to.
Open the calendar with its button, or with Alt+Down in the field. The arrow keys move by a day or a week, Page Up and Page Down by a month, with Shift by a year, Enter chooses and Escape closes; the title shows the months of the year, and then the years. Choose another locale below to see the calendars change: the language of the page stays. Text that is no date is reported by the server, below the form, which follows every change via Ajax.
Buttons
One look for the buttons of Wicket, React and Svelte: four variants, three sizes, a text, an icon or both, actions via Ajax, and any link or form button turned into one by a behavior.
Forms Wicket React Svelte
Buttons in the colors of the theme chosen in the top bar, the same in Wicket, React and Svelte: one style sheet, antilia-button.css, draws them all.
In Wicket, an AjaxActionButton runs an action via Ajax and shows a text, an icon and a text, or only an icon, whose text is then its tooltip and the name screen readers say. A ButtonBehavior draws any link or form button as one. Each comes in four variants, primary, secondary, ghost and danger, and three sizes, small, medium and large. React and Svelte have a Button component taking the same variants and sizes.
"Icons" chooses the icons of the buttons: the Font Awesome icons as inline SVG (SvgIcon), or the same drawn by the Font Awesome font (FontAwesomeIcon). A button takes any IIcon, and the React and Svelte Button any markup.
Downloads
Files of every kind from the buttons of the theme: via Ajax into the browser, through a hidden iframe, in a new tab or the same window, busy while they come; links, a URL to share and the report a form describes.
Forms Wicket
Downloads of every kind, all from the buttons of the theme, in the look chosen in the top bar. The files are a report of the countries of the world in the language of the page, made on the server when they are asked for, in seven formats: a text, CSV, JSON, a chart as SVG and as PNG, a PDF, and a ZIP archive of them all.
Via Ajax: an AjaxDownloadButton from ui-components downloads with Wicket's AjaxDownloadBehavior: the page stays as it is and hears how the download ended, which a notification tells. Each button downloads in another Location of the behavior: into the browser, as a blob, through a hidden iframe, in a new tab or in the same window. While the file comes the button is busy: a spinner takes the place of its icon and it ignores clicks. Choose the file, and how the server answers: at once, slowly, to see the buttons busy, or with an error, to see which locations can tell.
Links: links the browser follows without Ajax, drawn as buttons by a ButtonBehavior: Wicket's DownloadLink of a file written on the server and deleted once downloaded, a ResourceLink to a resource of the page, a resource mounted at a URL of its own, which can be shared, the same resource showing a PDF in a new tab, and a file of the web application with the download attribute.
After a form: the buttons of a form send it via Ajax and, once it is valid, download the report it describes, or open it in a new tab, each with a ButtonDownloadBehavior, which makes any button busy while its download runs. The errors of the form are notifications.
Upload
Files sent in a form, by Ajax or to a resource, chosen with a button of the theme or dropped on a zone, with a progress bar of the theme, a guard keeping the user on the page, and a way to slow the uploads down.
Forms Wicket
Wicket uploads files in two ways, both shown here: in a form, posted the usual way or sent via Ajax, and to a mounted resource with a FileUploadToResourceField, which needs no form. Every case uses the components of ui-components for them.
A FilePickerBehavior draws a file input as a button of the theme, the same in every browser, or as a zone to drop files on. The input stays in the page, hidden, and holds the files: a form and an Ajax behavior get dropped files as if they were chosen in the dialog of the browser. An UploadProgressBar follows each upload in the colors of the theme: what was sent, how fast and how long it still takes. It listens to the progress of the request where the browser gives it, otherwise it asks the server, which knows it once the application calls setUploadProgressUpdatesEnabled(true).
An UploadToResourceField is the FileUploadToResourceField of Wicket telling its uploads to the page. While it uploads, it asks before the page is left and, if chosen, stops the other Ajax requests of the page: those marked with UploadGuard.bypass() go on, such as the button canceling the upload. Click both buttons below the upload while it runs.
The picker knows the limits of the form or of the field: it tells at once which ones the files chosen break, and does not send them. In a picker of several files, the files chosen or dropped later are added to those chosen before, and each one can be taken out of the list. Should an upload fail all the same, the bar tells why: what the server answered, or that the connection broke off.
The settings above the cases, which the gauge in the top bar of every demo opens too, slow the server down for this session: it reads the files at the upload speed chosen, so that the progress can be watched on a fast network, and waits before each Ajax request. They are a ThrottlePanel of ui-components, the gauge a ThrottleButton. The server tells below the cases what it received, and keeps no file.
Code Editor
Code in Java, JavaScript, TypeScript, JSON, Markdown or a grammar of your own, highlighted in the colors of the theme: the server keeps the text, the cursor, the selection and the size, and the tabs it is in know of its changes not saved. Markdown shows beside its live preview.
Forms Wicket React Svelte
CodeEditor from ui-components is a text area shown as a code editor, CodeMirror, in the colors of the theme and the look of the page. Choose a language: Java, JavaScript, TypeScript, JSON and Markdown are built in, Markdown highlighting its fenced code blocks in their own languages, and the log is a grammar this page plugs in with a script of its own. Ctrl+F searches and replaces, Ctrl+Z undoes, Ctrl+S saves, Alt and the mouse select a rectangle, and the arrows in the gutter fold blocks. Tab indents: Escape, then Tab, leaves the editor.
The server keeps each sample in the session: its text, which it follows as you type, and the state of its editor, where the cursor is, what you selected, how far you scrolled and the size you gave it by the bar along its bottom. The sentence below the editor says what the server knows. Switch languages, or leave the page and come back, and each editor is where you left it. The check boxes and the drop-downs render the editor again via Ajax, and it goes on as it was.
Below the second pill, notes in Markdown show beside their preview, in a split panel: the preview follows the text as you type, with its tables, task lists and code blocks highlighted in their languages, and HTML in the text shows as text. Drag the divider to share the room, and the bar below to make both taller. The button hides the preview, giving the editor all the room, and shows it again. Tick Keep the preview in step, and the preview follows the place you are at in the editor: move the cursor, type or scroll, and the matching part of the preview comes into view. The session keeps it all.
Below the third pill the files of a project open in tabs, an editor in each. A file with changes not saved marks its tab, which the editor tells the tabs in the browser, and closing it asks first. Save it with Ctrl+S or the button. Switching tabs keeps where you were in each. Everything works under a strict Content Security Policy.
Below the fourth pill, settings in JSON are saved as you leave their editor, with Ctrl+S and with the button, once JsonValidator on the server finds them well formed. Write something that is not JSON and leave the editor: the error is underlined where it is and listed below the text, a click on it takes you there, and a notification tells it too; nothing is saved until the JSON is valid again. The check boxes switch saving as you leave, and reading only, which the editor takes from a model of the session: then you can read, select and copy the text, not change it. The text scrolls with the slim scroll bars of the theme, as everywhere on this page.
Rich Text Editor
Text with headings, lists, links, tables, images and alignment, from a toolbar of the components' own: Tiptap, in the colors of the theme. The server cleans the HTML before it keeps it, with the cursor, the selection and the size; or the editor keeps Markdown.
Forms Wicket React Svelte
RichTextEditor from ui-components is a text area shown as a rich text editor, Tiptap, in the colors of the theme and the look of the page. Its toolbar formats the text: headings, bold, italic, underline, strike, code, superscript, subscript, the color of the text and of its background, links, lists, task lists, quotes, code blocks, lines, tables, images and alignment. In the drop-down Toolbar, choose its tools one by one: the Java making that toolbar shows below. The drop-downs Text colors and Background colors choose the colors of each palette, apart; with none chosen, the editor has no tool for them. The check box Keyboard keys adds a feature of the page's own, KbdFeature: keys such as Ctrl, with their tool, Ctrl+Shift+K and their script, which the cleaning lets through. The usual keys work too, Ctrl+B, Ctrl+I, Ctrl+Shift+. and Ctrl+Shift+, to raise and lower text, or Ctrl+K for a link, and Markdown's marks as you type: # and a space for a heading, - for a list, **bold**. The toolbar is one stop of Tab: the arrow keys move along it. Escape, then Tab, leaves the editor, even in a list. A code block is in a language, which the menu of its tool chooses, and shows in its colors. An image comes from an address, or uploads: chosen in its form, or dropped or pasted into the text.
The server keeps the article in the session: its HTML, which it follows as you type, and the state of its editor, what you selected, how far you scrolled and the size you gave it by the bar along its bottom. It never trusts the HTML of the browser: it cleans it before it keeps it, keeping only what the features of the editor write. Below the editor, the article as a page shows it once saved, and the HTML the server keeps. Ctrl+S, or the button, saves it. The editor listens to the events the page gives it, through two Ajax behaviors whatever their number: Ctrl+S and the focus lost submit the form, the focus got and the size you give it go to the server alone, and the changes not saved mark the title of the page with a star, in the browser alone.
Below the second pill, the editor keeps Markdown instead of HTML. Below the third, HTML from anywhere, with scripts, handlers and styles, and what the cleaning leaves of it. Everything works under a strict Content Security Policy: the HTML has no style attribute, text aligns by classes.
CKEditor 5
CKEditor 5, a complete editor with its own toolbar, balloons and dialogs, in the colors of the theme, with the contract of the Rich Text Editor. The application brings CKEditor and its license; the server cleans the HTML before it keeps it.
Forms Wicket React Svelte
CKEditor from ui-components is a text area shown as CKEditor 5, a complete editor with its own toolbar, balloons and dialogs, in the colors of the theme. It keeps the contract of the Rich Text Editor, Tiptap, so that an application can switch between the two: the text is HTML, or Markdown, kept in a text area a form posts; it can be read only, show a placeholder, count the words and be resized by the bar along its bottom; the server keeps its state, what you selected, how far you scrolled and the size you gave it; Ctrl+S saves, and the tabs and the desktop show changes not saved. Should CKEditor run into an error, it starts again with the text, saying so below it, and the server logs the error. Images chosen, pasted or dropped into the article are uploaded as in the Rich Text Editor, checked in the browser, then by the server by their bytes.
The library holds no code of CKEditor, which is licensed under the GPL 2 or later, or under the commercial terms of CKSource. The application brings it, the browser build of the ckeditor5 package of npm or a build of its own, and its license key, a setting of the application. This demo brings the browser build and runs it under the GPL, with the license key GPL: CKEditor then shows its Powered by badge.
The server never trusts the HTML of the browser: it cleans it before it keeps it, keeping only what the plugins of the editor write. Everything works under a strict Content Security Policy: the HTML has no style attribute, text aligns by classes, and images have no width or height.
Wizard
Steps known only as the user goes, branching on the answers: a dichotomous key of mosquitoes and an image card uploaded by Ajax, then described or given a text over it; buttons above or below, the trail of the steps visited around the title.
Forms Wicket
Wizard from ui-components leads the user through steps, one at a time: each step has its title in the header, its body, and a bar of buttons. The steps fill in an object, the model of the wizard, typed by the steps, which needs not be serializable. The wizard knows its first step only and asks each step for the next one, so the steps can branch on what the user entered.
Next, Last and Finish submit the form of the body, its fields validated; Previous, First and Cancel are plain Ajax actions that submit nothing. Last follows the next steps up to one with no next step, without showing nor validating those in between. Each step says which buttons show and which may be clicked, and may add buttons of its own. The trail of the steps visited, a breadcrumb whose crumbs go back, is above the title, in its place, below it or nowhere, and the bar of the buttons above or below the body.
The key of mosquitoes is a dichotomous key: each question has two answers, each leading to the next question or to a mosquito. The image card uploads an image by Ajax in the form of the wizard, then describes it or writes a text over it; the step of the text has a button of its own suggesting one. Everything takes its colors from the theme and its classes from the look, a card in the Bootstrap look, and works under a strict Content Security Policy.
ModalWizard puts the same wizard in a dialog, in its parts: the title and the steps visited in its header, which drags and folds the dialog, the body in its body, the only part that scrolls, and the buttons in its footer. Cancel, the close button and Escape cancel alike, asking first once past the first step; Finish closes the dialog. The buttons below each wizard open it in one.
Double submits
A form issuing invoices that issues one however it is sent: a double click, Enter pressed twice, a click queued behind another request; Wicket's page veil with the library's add-on, and a form refusing a version it already took.
Forms Wicket
A form that issues invoices, where the server takes a second for each. Whatever the user does while it works, one rendered form issues one invoice: a double click, Enter pressed twice on the button, a second click while the first one waits its turn, a click on the button just as the amount, whose change the server checks, is left.
The veil: Wicket's PageVeilBehavior covers the page while a request runs, so a second click falls on the veil. The library completes it with VeilGaps, an add-on to its script on every page with a Wicket veil: Enter and Space are held under the veil too, a click is veiled as soon as Wicket's Ajax queues it, not only once it is sent, and the click on a button whose press made a field send its change, which the veil caught, comes through once the veil is down.
The form's version: a DoubleSubmitBulletsProofForm refuses a second submit from the same version of the form, should the veil be missed: a script that did not load, a slow device. Switch the veil off and double-click "Issue invoice": the second click reaches the server, which refuses it with a message.
With both off, a double click issues two invoices.
Scrollbar
Slim scroll bars in the colors of the theme that look the same in every browser, drawn over native scrolling so the wheel, the keys and touch work as ever, and following content changed via Ajax.
Layout Wicket React Svelte
A ScrollbarBehavior from ui-components gives a scrolling component scroll bars that look the same in every browser: the native ones are hidden and slim bars in the colors of the theme are drawn over the edges of the component. It keeps scrolling natively with the wheel, the keys and touch; the thumb can be dragged and a click on the track pages towards the click.
The first box keeps the browser's own scroll bar, to compare. The behavior draws the bars in the directions the CSS of the component lets it scroll, or in those given to it: the third box asks for the horizontal one only. The bars follow changes of the content: The + button re-renders the last box via Ajax, its bar picks up the new size and the behavior scrolls the box to the first of the lines added; the other buttons scroll it to its top, its bottom, a position and a line. Change the theme in the top bar and the bars follow it.
Split Panel
Panes that share the space, nested as in an IDE: drag the divider or move it with the keyboard, collapse a pane, size in percent or pixels, and let the server know and remember the layout.
Layout Wicket React Svelte
SplitPanel from ui-components shows two panes, side by side or one above the other, with a divider between them. Drag the divider with the mouse, a pen or a finger to share the space differently; or give it the focus with Tab and move it with the arrow keys, take it to its limits with Home and End. A double click takes it back to where it started. The buttons on a collapsible divider hide a pane, giving the other all the space, and show it again; Enter does so from the keyboard. Split panels go in each other's panes: the layout below is two of them, the files beside an editor above its console.
Sizes are in percent or in pixels. The files are 220 pixels wide, from 140 pixels to half the width, and keep their width when the window changes; the editor takes 65 percent of the height, and leaves the console at least 60 pixels. The divider moves in the browser, between those limits. With setSendToServer the browser sends each change via Ajax, and the sentence below the layout follows. Where the panel keeps it is its model: the files' split panel keeps it in the session, so the page shows it again when you open it anew; the editor's in the page, as by default. The check boxes render the third split panel again by Ajax. Everything works under a strict Content Security Policy, without inline style.
Resizable
Any element resized by its edge or its corner, with the mouse, a finger or the keyboard, within limits; the server remembers the size, also when the component is taken out of the page and put back.
Layout Wicket React Svelte
ResizableBehavior from ui-components lets you resize an element: by its bottom edge, its right edge or its bottom right corner, with the mouse, a pen or a finger. The handle takes the focus with Tab: the arrow keys resize the element ten pixels at a time, fifty with Shift, Home and End take it to its smallest and largest size, and a double click takes it back to the size it started with. Escape, while dragging, puts it back where the drag began.
The server hears each size you give, and says so below: the note and the side panel keep theirs in the session, so the page shows them again when you come back to it; the card keeps its own in its behavior, in the page. Take the card away, and put it back: it comes back in the size it had. The code editor resizes this way too, and remembers its size by default. The sizes are custom properties set through the CSSOM, so everything works under a strict Content Security Policy.
Tabs
Tabs along the top or down the side, in nine designs: documents that close, asking first when the server says they have changes not saved, with actions of their own and new ones added via Ajax.
Layout Wicket React Svelte
TabbedPanel from ui-components shows a list of tabs, along the top of their panels or down their left side, and the panel of the tab selected. Click a tab, or give it the focus with Tab and move with the arrow keys, Home and End. The panels of all tabs are in the page, so switching needs no request and keeps what you typed in each.
The documents are closable: close one with its ×, with Delete while its tab has the focus, or with the middle button. Each change you make to a document reaches the server by the Ajax behavior of its text area, and the server marks its tab with a dot: changes not saved. Closing a tab with changes asks first, in a dialog, and closing it anyway puts its text back; the server then hears of the tab closed and forgets it. Save takes the mark away. The button before the × of a document is an action of the page: it shows what the server knows of the document in a popover, a bubble pointing at it, in the colors of the theme: in its main color when all is saved, amber with changes. A click outside, Escape or the button again closes it. New document adds a tab via Ajax without rendering the others, so what you typed in them stays.
The second tabs take any of nine designs, along the top or down the side: tabs, pills and underline; segmented, folder and lifted, made for tabs along the top; side bar, steps and cards, made for tabs down the side, which the gallery shows. All take their colors from the theme; with setSendToServer the server hears each tab you select, as the sentence below them says. New alert counts in the title of Alerts, which updateTab renders again alone via Ajax, leaving the panels as they are; selecting Alerts takes the count away. Add Security after Profile puts a tab at a place among the others with addTab(tab, index, target). The panels of lazy tabs, LazyTab, are created when their tab is first selected: Report keeps its panel once created, Live creates it anew each time you select it and drops it when you leave, as Wicket's AjaxTabbedPanel does; a spinner shows while the server renders it. The other tabs have their panels rendered with the page, as always. The twelve months are more tabs than fit: TabsOverflowMenuBehavior, an extension of the tabs, puts a button at the end of their list while it overflows, opening a menu of all the tabs, the selected one checked; choosing one selects it and scrolls it into view. Everything works under a strict Content Security Policy, without inline style.
Menus
A bar of items along the top or down the side, in four designs: bookmarkable, Ajax and plain links with icons and tooltips, submenus as deep as you like that pop up or open in place, driven by the keys as on a desktop.
Layout Wicket React Svelte
Menu from ui-components shows a bar of items, along the top or down the side. Each item is an IMenuItem: its label, maybe an icon and a tooltip, and the link the menu renders for it. ui-components has one for each kind of link: BookmarkableMenuItem leads to a page, AjaxMenuItem calls the server via Ajax, LinkMenuItem with a request of its own. A SubMenu opens more items, which may be submenus too, as deep as you like, and MenuSeparator draws a line between them. MenuLinkPanel puts the icon and the label in the link of an item and its tooltip on it.
Click an item with an arrow to open its submenu; while one of the bar is open, the pointer opens the others, and in a submenu resting on an item opens its own. The keys work as in the menus of a desktop: the arrows along the bar and up and down a submenu, the arrow pointing away opening a submenu, Escape closing it, Home and End, and a letter for the next item starting with it. Choosing an item, a click outside or Tab closes the menus.
The navigation leads to this page with the parameter section: the item of the page shown is marked as current, and so are the items holding it; its submenus open as the pointer rests on them, as in a web site. The side bar opens its submenus in place, those holding the current item from the start, and the server marks the item chosen via Ajax. The settings switch the orientation, the four designs, bar, pills, underline and side bar, and how the submenus open. Everything takes its colors from the theme and its classes from the look, Bootstrap's nav and dropdown-menu in the Bootstrap look, and works under a strict Content Security Policy, without inline style.
Breadcrumbs
The path to the page shown, a row of crumbs from the home page: bookmarkable, Ajax and plain links with icons and tooltips, the crumbs of a long trail hidden behind a button that shows them, in three separators.
Layout Wicket React Svelte
Breadcrumb from ui-components shows where the page is: a row of crumbs from the home page down to the page shown, the last crumb, which is its label and no link. The crumbs are the items of the menus: BookmarkableMenuItem leads to a page, AjaxMenuItem calls the server via Ajax, LinkMenuItem with a request of its own, and an item without a link, such as a SubMenu, is a crumb leading nowhere. Their icons and tooltips show, and the items that do not show are left out.
It is a nav, named, around an ordered list, as the WAI-ARIA breadcrumb pattern has it; the style sheet draws the separators, a chevron, a slash or an arrow, which screen readers do not read. With setMaxItems a long trail shows its first crumb and its last ones, the others behind a button, …, which shows them in place and gives the focus to the first of them. The server renders them hidden already, so nothing moves while the page loads; on a phone the trail wraps.
The site leads to this page with the parameter path, as its pages would. The folders go deeper via Ajax: the server adds a crumb, and a crumb chosen goes back to its folder. The settings choose the separator and how many crumbs show. Everything takes its colors from the theme and its classes from the look, Bootstrap's breadcrumb in the Bootstrap look, and works under a strict Content Security Policy, without inline style.
Modal Dialog
Add, edit and delete in a modal dialog that keeps the focus, drags and folds by its title and asks before discarding changes; the same dialog in Wicket, React and Svelte over one shared REST resource.
Layout Wicket React Svelte
- The Wicket tab uses the Modal of ui-components, Wicket's ModalDialog in the colors of the theme of the page: Add member and Edit open the form of a member in it, Delete asks to confirm. Cancel and Save, made by button factories, are in the footer, on the right. Saving repaints the team through Ajax
- The × in the top right corner closes the dialog, as Escape and Cancel do. A click on the dimmed page around it closes it too, an option on in this demo
- Change a field, then try to close the dialog: it asks whether to discard the changes first, a function the dialog asks before it closes
- Drag the title to move the dialog; double-click it to fold the dialog to its title, and again to unfold it, in the browser alone. Both can be turned off
- While it is open the focus stays in it, Tab and Shift+Tab going round its fields and buttons, and when it closes the focus goes back to the button that opened it
- The form is validated as Wicket validates it: the name and the email required, the email an address. Try saving it empty
The React and Svelte tabs use the Modal of @antilia/react and @antilia/svelte: the same markup, style sheet and behaviors, from the core's ModalDialog. They add, edit and delete the same team, kept in your session, through the mounted resource /api/team, which validates with the messages of the Wicket form: a member changed in one tab shows in the others once they load the team again.
Below the team, Options of a dialog sets what a dialog does before opening it: whether Escape, the × in the corner or a click around it close it, whether its title drags and folds it, and its size, fitting its content, small, medium or large, or a width of its own such as 40em. Turn off Escape and the ×: Close in the footer still closes it. Open a nested dialog from it, and another from that one: each opens over the one below, takes Escape and the focus, and gives them back when it closes. The buttons of the footers are the buttons of the theme, small, with icons; the dialog of a member is medium, the question before a deletion small.
Desktop
A desktop inside the page: floating windows that are not modal, with a taskbar; they move, fold, resize, minimize, maximize, tile and cascade, each holding real components such as the grids.
Layout Wicket React Svelte
Desktop from ui-components holds floating windows, DesktopWindow, which are not modal: many at once, as on the desktop of an operating system. A click in a window brings it to the front; the others stay behind as they were. Drag a window by its title bar, with the mouse, a pen or a finger; a double click on the title bar folds the window to it, and unfolds it again. The buttons of the title bar minimize the window to the taskbar and maximize it to the whole desktop, as each window allows, and its edges and corners resize it. While the focus is in a window, F11 maximizes it and restores it, and Ctrl+F6 and Ctrl+Shift+F6 go round the windows.
The taskbar has a button for each window: it brings the window to the front, restoring it when minimized, and minimizes the one already in front. While the window in front is maximized, the one you bring to the front is maximized too and takes its place. The buttons at the end of the taskbar tile the windows in a grid, side by side or one above the other, or cascade them; the last one lets the desktop fill the whole page, and takes it back into the page (Escape on the taskbar does too). Drag the taskbar, by its grip or where it has no button, to another side of the desktop, or press an arrow key on its grip: the windows move and shrink to stay on the desktop.
The windows hold the grids of the JSON Grid and Bean Grid demos, the same panels with the same actions: move their columns by drag and drop, resize them, edit, add and delete users in the overlay of the grid. The JSON grid is there three times, in Wicket, in React and in Svelte. The drop-downs of the Dropdown demo are there in Wicket, React and Svelte too. The React and Svelte tabs have desktops of their own, with the JSON grid, notes and the drop-downs of the framework, and six more of its demos, each in a window: Autocomplete, Buttons, Date and time pickers, JSON Infinite List, Modal Dialog and Progress Bar.
Every window can be closed. The menu of the taskbar, its button after the grip, lists the windows open, to bring one to the front, and those closed, to open one again; the button above opens the keyboard window too. Closing a window with changes not saved, a user being edited or drop-downs not sent, asks first: closing it anyway puts its fields back as they were.
With setSendToServer the browser sends via Ajax the states of the windows, the side of the taskbar and whether the desktop fills the page, each time you change them, and the sentence below the desktop follows; choosing another side for the taskbar above renders the desktop again, in the state you left it. Everything works under a strict Content Security Policy, without inline style.
The windows are in panes, as in the workspaces of Ubuntu: the grids and the keyboard window in Grids, the drop-downs in Dropdowns. The buttons after those of the windows show another pane; Ctrl+Shift and the arrow keys go from pane to pane. + adds a pane, asking for its name, the pencil renames the pane shown (F2 or a double click on its button too) and the bin removes it, its windows going to the default pane, the first, which cannot be removed. The first button on the right of each title bar moves its window to another pane, or to a new one. The launcher of the taskbar, the button after its menu, opens new windows of the types the page registers: notes, and Bean grids; closed, they are gone. The server keeps the panes too.
Theme Editor
Make a theme of your own: pick its colors and watch grids, tabs, dialogs and notifications follow live, then copy the CSS class that defines it. No inline style, so it works under a strict Content Security Policy.
Themes Wicket
The themes of the components are CSS classes setting the custom properties --antilia-theme-*, which the style sheets of the components read. The pickers of the ThemeEditorPanel start from the theme chosen for the page in the top bar or in the drop-down above them; change a color and the components in the tabs below follow: progress bars, the JSON and the bean based tables, a collapsible panel, a floating panel, styled tabs, a modal dialog and notifications, in the colors of success, error, warning and information.
The text area holds the CSS class defining your theme; put it into your style sheet and the classes antilia-theme and yours on a page or a component, and the components inside take its colors. The changes are made in the browser through the CSS object model, so the page needs no inline style and works under a strict Content Security Policy.
Looks
The components in the looks of Bootstrap and daisyUI beside their own: the framework's classes and shapes, the components' behavior, in any theme. The framework's own markup takes the colors of the theme too; only its style sheet is on the page, never a script.
Themes Wicket
A theme gives the components their colors, a look the CSS classes of their parts. Every element a component draws is a part (LookPart): a dialog's header, a table's header, a dropdown's option... The Antilia look draws them with their own style sheets; the Bootstrap look gives each part Bootstrap's classes as well, such as btn btn-primary btn-sm for a button, modal-header for the header of a dialog, table for a data table or dropdown-item for an option, and the daisyUI look those of daisyUI, the components of Tailwind CSS: btn btn-primary btn-sm, modal-box, table or select. Only the style sheet of the framework is on the page, never a script: what the components do stays their own. daisyUI's prebuilt style sheet needs no build of Tailwind.
Bootstrap and daisyUI name their components alike, btn, table or card, so a page has the style sheet of one of them only: the links above the columns show the looks of either.
A look can be made of others, an aspect from each: what the parts are, their colors, their sizes and their states. Look.BOOTSTRAP.with(LookAspect.COLOR, Look.ANTILIA).with(LookAspect.SIZE, Look.ANTILIA) gives the parts Bootstrap's classes with the colors and the sizes of the Antilia look, as the third column shows, and the same with Look.DAISYUI gives daisyUI's.
The colors stay the theme's. The Bootstrap themes take them from the custom properties of the Bootstrap on the page, so a theme of Bootswatch or of your own colors the components too; any other theme gives its colors to Bootstrap's components and custom properties, and to daisyUI's, --color-primary, --color-base-100 and the others, so the page's own markup of either inside it matches the components.
In Wicket a ThemeBehavior puts the look on a component and everything inside it, as the attribute data-antilia-look, which the scripts of the components read too. The look of the session, Looks.setSessionLook or the model Looks.sessionLook(), is that of every page once chosen on one, as with the Look of the top bar. React has LookProvider and Svelte setLook.