Tobago Demo

Menu

Popup

A popup dialog is created with <tc:popup/>. It can be filled with other components.

The popup dialog is based on the Collapsible concept.

Tag Library Documentation: <tc:popup/> | <tc:operation/>

Client Side Popup

To create a client side popup you have to know about collapsedMode. The mode indicated whether a collapsed popup should be rendered. If collapsedMode="absent", which is default, a hidden popup dialog will no be rendered. If collapsedMode="hidden", a hidden popup dialog will be rendered on the page, but hidden by CSS.

Be careful with validations. For example, hidden required input fields will be validated after submit.

So to create the popup, use <tc:popup collapsedMode="hidden">. The attribute collapsed="true" is default, because the popup should normally not be opened after loading the page. The hidden popup must be already rendered, so the client don't have to send any requests to the server.

Client side opening and closing can be done with the <tc:operation name="show|hide" for="[ID]"/> tag. The attribute name must be set and can have the value 'show' and 'hide' which is to show and hide the popup, obviously. The other mandatory attribute is the for attribute. It contain the ID of the popup on which the transition should be executed.

<tc:button label="Open" omit="true"> <tc:operation name="show" for="clientPopup"/> </tc:button>

Markup

The width of the popups can be changed by markups.

<tc:popup ... markup="extraLarge"> or "large" or "small"

Modal

By default the popup can be closed by clicking on the backdrop. To prevent this, set modal="true". Default value is "false". It can be configured in the tobago-config.xml.

Plain Popup

! missing content

Popup opend after AJAX call

Refresh Content

The content of the popup will be refreshed with AJAX after opening the popup. The refresh method waits two seconds before execution.

tbd (to be defined)! in this example the "show" should be called directly, and not after the ajax call is complete. On the other and, to avoid flickering, the popup should be shown after the ajax call. ( Jira TOBAGO-2083)

© 2005-2023 Apache Software Foundation, Licensed under the Apache License, Version 2.0.