public class PopupSettings extends Object implements IClusterable
Link
classes to specify that the
link should be rendered with an onClick javascript event handler that opens a new window with the
links' URL.
You can 'or' display flags together like this:
new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS);
Modifier and Type | Field and Description |
---|---|
static int |
LOCATION_BAR
Flag to include location bar
|
static int |
MENU_BAR
Flag to include menu bar
|
static int |
RESIZABLE
Flag to make popup resizable
|
static int |
SCROLLBARS
Flag to include scrollbars
|
static int |
STATUS_BAR
Flag to include status bar
|
static int |
TOOL_BAR
Flag to include location bar
|
Constructor and Description |
---|
PopupSettings()
Constructor.
|
PopupSettings(int displayFlags)
Construct.
|
PopupSettings(String windowName)
Construct.
|
PopupSettings(String windowName,
int displayFlags)
Construct.
|
Modifier and Type | Method and Description |
---|---|
String |
getPopupJavaScript()
Get the onClick javascript event handler.
|
PopupSettings |
setHeight(int popupHeight)
Sets the popup window height.
|
PopupSettings |
setLeft(int popupPositionLeft)
Sets the left position of the popup window.
|
void |
setTarget(String target)
Sets the target of the link.
|
PopupSettings |
setTop(int popupPositionTop)
Sets the top position of the popup window.
|
PopupSettings |
setWidth(int popupWidth)
Sets the popup window width.
|
PopupSettings |
setWindowName(String popupWindowName)
Sets the window name.
|
public static final int LOCATION_BAR
public static final int MENU_BAR
public static final int RESIZABLE
public static final int SCROLLBARS
public static final int STATUS_BAR
public static final int TOOL_BAR
public PopupSettings()
public PopupSettings(int displayFlags)
displayFlags
- Display flagspublic PopupSettings(String windowName)
windowName
- public PopupSettings(String windowName, int displayFlags)
windowName
- The pagemap where this popup must be in. Typically, you should put any popup in a
separate page map as Wicket holds references to a limited number of pages/
versions only. If you don't put your popup in a separate page map, the user might
get page expired exceptions when getting back to the main window again.displayFlags
- Display flagspublic String getPopupJavaScript()
public PopupSettings setHeight(int popupHeight)
popupHeight
- the popup window height.public PopupSettings setLeft(int popupPositionLeft)
popupPositionLeft
- the left position of the popup window.public void setTarget(String target)
setTarget("'some/url'")
. If the url is delivered with an HTML attribute then
it should be without quotes, for example: setTarget("this.dataset['popup-url']")
with markup like:
<a data-popup-url="some/url">Link</a>
.target
- the target of the linkpublic PopupSettings setTop(int popupPositionTop)
popupPositionTop
- the top position of the popup window.public PopupSettings setWidth(int popupWidth)
popupWidth
- the popup window width.public PopupSettings setWindowName(String popupWindowName)
popupWindowName
- window name.Copyright © 2006–2022 Apache Software Foundation. All rights reserved.