public class VaadinUtils extends Object
Modifier and Type | Field and Description |
---|---|
static ThreadLocal<LspsContextHolder> |
CONTEXT_HOLDER
PRIVATE API, DO NOT USE.
|
static ThreadLocal<UIComponent> |
LISTENER_SCOPE
PRIVATE API, DO NOT USE.
|
Constructor and Description |
---|
VaadinUtils() |
Modifier and Type | Method and Description |
---|---|
RecordHolder |
addColumn(ExecutionContext ctx,
RecordHolder wwhat,
RecordHolder wwhere) |
void |
addTab(ExecutionContext ctx,
RecordHolder tabbedLayout,
RecordHolder tab)
Adds tab to tabbed layout.
|
void |
clear(ExecutionContext ctx,
CollectionHolder viewModels) |
RecordHolder |
createAndAdd(ExecutionContext ctx,
Object wwhat,
RecordHolder wwhere) |
RecordHolder |
createAndShow(ExecutionContext ctx,
RecordHolder def)
Only popup is supported.
|
ListHolder |
findTopmostComponents(ExecutionContext ctx,
Type type,
RecordHolder root) |
RecordHolder |
getBrowserWindowSize(ExecutionContext ctx) |
ListHolder |
getChildren(ExecutionContext ctx,
RecordHolder def) |
ListHolder |
getColumns(ExecutionContext ctx,
RecordHolder def) |
ListHolder |
getColumnStates(ExecutionContext ctx,
RecordHolder def)
Gets a list of table column states of the given Table or TreeTable2
|
ListHolder |
getTabs(ExecutionContext ctx,
RecordHolder tabbedLayout) |
void |
hideAndDestroy(ExecutionContext ctx,
RecordHolder def)
Hide pop-up.
|
void |
invoke(ExecutionContext ctx,
CollectionHolder targets,
String methodName,
ListHolder parameters)
Invoke method on each target container.
|
boolean |
isDescendantOrSelf(ExecutionContext ctx,
RecordHolder parent,
RecordHolder child) |
void |
merge(ExecutionContext ctx,
CollectionHolder viewModels) |
void |
notify(ExecutionContext ctx,
String caption,
String description,
EnumerationImpl type,
EnumerationImpl alignment,
Decimal delayMillis,
String cssStyle,
Boolean htmlContentAllowed)
Shows notification.
|
void |
persist(ExecutionContext ctx)
Persist execution contexts.
|
void |
refresh(ExecutionContext ctx,
CollectionHolder components)
Refresh components
|
void |
removeAll(ExecutionContext ctx,
RecordHolder wwhere)
Remove all childs of VerticalLayout, HorizontalLayout or FormLayout
|
void |
removeAndDestroy(ExecutionContext ctx,
RecordHolder wwhat,
RecordHolder wwhere)
Remove and destroy what component.
|
void |
removeTab(ExecutionContext ctx,
RecordHolder tabbedLayout,
RecordHolder tab)
Remove the tab.
|
void |
requestSubmit(ExecutionContext ctx)
Marks the screen for submission.
|
void |
requestSubmitAndNavigate(ExecutionContext ctx,
RecordHolder navigateTo)
Marks the screen for submission and navigate away.
|
void |
restoreColumnStates(ExecutionContext ctx,
RecordHolder def,
ListHolder columnStates)
Restores the column states to the Table or TreeTable2
|
void |
selectTab(ExecutionContext ctx,
RecordHolder tabbedLayout,
RecordHolder tab)
Open the tab.
|
void |
showConstraintViolations(ExecutionContext ctx,
ListHolder constraintViolations)
Map constraint violations to visible components.
|
void |
showNotification(com.vaadin.ui.Notification notification)
Show notification.
|
public static final ThreadLocal<UIComponent> LISTENER_SCOPE
public static final ThreadLocal<LspsContextHolder> CONTEXT_HOLDER
public RecordHolder getBrowserWindowSize(ExecutionContext ctx)
ctx
- public void notify(ExecutionContext ctx, String caption, String description, EnumerationImpl type, EnumerationImpl alignment, Decimal delayMillis, String cssStyle, Boolean htmlContentAllowed)
ctx
- caption
- description
- type
- alignment
- delayMillis
- cssStyle
- htmlContentAllowed
- public void showNotification(com.vaadin.ui.Notification notification)
notification
- public boolean isDescendantOrSelf(ExecutionContext ctx, RecordHolder parent, RecordHolder child)
ctx
- parent
- child
- true
if the parent
is direct or indirect parent of the child record.
public ListHolder getChildren(ExecutionContext ctx, RecordHolder def)
ctx
- def
- - ui::VerticalLayout, ui::HorizontalLayout or ui::FormLayout recordpublic ListHolder getColumns(ExecutionContext ctx, RecordHolder def)
ctx
- def
- - either ui::Table or ui::TreeTable2 recordpublic ListHolder getColumnStates(ExecutionContext ctx, RecordHolder def)
ctx
- def
- the definition record of Table or TreeTable2ui::TableColumnState
recordsrestoreColumnStates(ExecutionContext, RecordHolder, ListHolder)
public void restoreColumnStates(ExecutionContext ctx, RecordHolder def, ListHolder columnStates)
ctx
- def
- the table or the tree tablecolumnStates
- the state of columns which should be restored to the columns of the given table (tree table)getColumnStates(ExecutionContext, RecordHolder)
public ListHolder getTabs(ExecutionContext ctx, RecordHolder tabbedLayout)
ctx
- tabbedLayout
- - ui::TabbedLayout recordpublic void addTab(ExecutionContext ctx, RecordHolder tabbedLayout, RecordHolder tab)
ctx
- tabbedLayout
- tab
- public void removeTab(ExecutionContext ctx, RecordHolder tabbedLayout, RecordHolder tab)
ctx
- tabbedLayout
- tab
- public void selectTab(ExecutionContext ctx, RecordHolder tabbedLayout, RecordHolder tab)
ctx
- tabbedLayout
- tab
- public void invoke(ExecutionContext ctx, CollectionHolder targets, String methodName, ListHolder parameters)
ctx
- targets
- - a list of ui::Container recordsmethodName
- parameters
- public ListHolder findTopmostComponents(ExecutionContext ctx, Type type, RecordHolder root)
ctx
- type
- root
- type.
public void refresh(ExecutionContext ctx, CollectionHolder components)
ctx
- components
- public void persist(ExecutionContext ctx) throws LspsException
ctx
- LspsException
public void requestSubmit(ExecutionContext ctx) throws LspsException
ctx
- LspsException
public void requestSubmitAndNavigate(ExecutionContext ctx, RecordHolder navigateTo) throws LspsException
ctx
- navigateTo
- LspsException
public void merge(ExecutionContext ctx, CollectionHolder viewModels)
ctx
- viewModels
- public void clear(ExecutionContext ctx, CollectionHolder viewModels)
ctx
- viewModels
- public void showConstraintViolations(ExecutionContext ctx, ListHolder constraintViolations)
ctx
- constraintViolations
- public RecordHolder createAndShow(ExecutionContext ctx, RecordHolder def)
ctx
- def
- public void hideAndDestroy(ExecutionContext ctx, RecordHolder def)
ctx
- def
- public RecordHolder createAndAdd(ExecutionContext ctx, Object wwhat, RecordHolder wwhere)
ctx
- wwhat
- - ui componentwwhere
- ui::VerticalLayout, ui::HorizontalLayout or ui::FormLayout componentpublic void removeAndDestroy(ExecutionContext ctx, RecordHolder wwhat, RecordHolder wwhere)
ctx
- wwhat
- wwhere
- public void removeAll(ExecutionContext ctx, RecordHolder wwhere)
ctx
- wwhere
- public RecordHolder addColumn(ExecutionContext ctx, RecordHolder wwhat, RecordHolder wwhere)
ctx
- wwhat
- - ui::TableColumn recordwwhere
- - ui::Table or ui::TreeTable2 recordCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.