Module org.tentackle.fx.rdc
Package org.tentackle.fx.rdc
Class PdoFinder<T extends PersistentDomainObject<T>>
java.lang.Object
org.tentackle.fx.AbstractFxController
org.tentackle.fx.AbstractValidateableFxController
org.tentackle.fx.rdc.PdoFinder<T>
- Type Parameters:
T- the pdo type
- All Implemented Interfaces:
FxController,PdoController<T>,DomainContextProvider,PdoProvider<T>,org.tentackle.validate.ScopeConfigurator,org.tentackle.validate.Validateable
- Direct Known Subclasses:
DefaultPdoFinder
public abstract class PdoFinder<T extends PersistentDomainObject<T>>
extends AbstractValidateableFxController
implements PdoController<T>, DomainContextProvider
FxController to search for PDOs.
Holds the view of the selection criteria and runs the query.
Holds the view of the selection criteria and runs the query.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.collections.ObservableList<T> createTotals(javafx.collections.ObservableList<T> items) Creates the optional totals from the search results.
By default, all numeric columns are candidates for being summed up.Creates the totals table view.
Will be invoked only ifcreateTotals(javafx.collections.ObservableList<T>)returned a non-empty list.abstract javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> Gets the search action property.booleanReturns whether the view should be scrolled to the last item when displaying the search results.booleanReturns whether to run the search immediately without any further user interaction.booleanReturns whether the query might block the client for a longer time.booleanReturns whether the search dialog should display the initial search result as a tree instead of a table view.booleanReturns whether the finder is visible.abstract voidRequests the initial focus after stage is shown.Runs the search.voidsetScrollingToEnd(boolean scrollingToEnd) Sets whether the view should be scrolled to the last item when displaying the search results.voidsetSearchRunningImmediately(boolean searchRunningImmediately) Defines whether to run the search immediately without any further user interaction.voidsetSearchRunningInBackground(boolean searchRunningInBackground) Defines whether the query might block the client for a longer time.voidsetTreeShowingInitially(boolean treeShowingInitially) Sets whether the search dialog should display the initial search result as a tree instead of a table view.voidsetVisible(boolean visible) Sets the visibility of the finder's view.Methods inherited from class org.tentackle.fx.AbstractValidateableFxController
getValidationMappers, prepareValidation, validateFormMethods inherited from class org.tentackle.fx.AbstractFxController
configure, createBinder, getBinder, getContainer, getDefaultScopes, getFXMLFields, getFXMLMethods, getStage, getView, setView, validateInjectionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tentackle.pdo.DomainContextProvider
isWithinContext, isWithinContext, on, on, op, opMethods inherited from interface org.tentackle.fx.FxController
configure, getBinder, getContainer, getFXMLFields, getFXMLMethods, getStage, getView, setView, validateInjectionsMethods inherited from interface org.tentackle.fx.rdc.PdoController
setPdoMethods inherited from interface org.tentackle.pdo.PdoProvider
getPdo, on, onMethods inherited from interface org.tentackle.validate.Validateable
validate
-
Constructor Details
-
PdoFinder
public PdoFinder()Parent constructor.
-
-
Method Details
-
runSearch
Runs the search.- Returns:
- the search result, null is allowed and treated as empty
-
requestInitialFocus
public abstract void requestInitialFocus()Requests the initial focus after stage is shown. -
getSearchActionProperty
public abstract javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> getSearchActionProperty()Gets the search action property.- Returns:
- the search action property, null if there is no such property
-
getDomainContext
- Specified by:
getDomainContextin interfaceDomainContextProvider
-
isSearchRunningInBackground
public boolean isSearchRunningInBackground()Returns whether the query might block the client for a longer time.- Returns:
- true if better run in background, false if in event-thread (default)
-
setSearchRunningInBackground
public void setSearchRunningInBackground(boolean searchRunningInBackground) Defines whether the query might block the client for a longer time.- Parameters:
searchRunningInBackground- true if better run in background, false if in event-thread (default)
-
isSearchRunningImmediately
public boolean isSearchRunningImmediately()Returns whether to run the search immediately without any further user interaction.- Returns:
- true if immediate search
-
setSearchRunningImmediately
public void setSearchRunningImmediately(boolean searchRunningImmediately) Defines whether to run the search immediately without any further user interaction.- Parameters:
searchRunningImmediately- true if immediate search
-
isScrollingToEnd
public boolean isScrollingToEnd()Returns whether the view should be scrolled to the last item when displaying the search results.- Returns:
- true if scroll to end, false if scroll to top (default)
-
setScrollingToEnd
public void setScrollingToEnd(boolean scrollingToEnd) Sets whether the view should be scrolled to the last item when displaying the search results.- Parameters:
scrollingToEnd- true if scroll to end, false if scroll to top
-
isTreeShowingInitially
public boolean isTreeShowingInitially()Returns whether the search dialog should display the initial search result as a tree instead of a table view.- Returns:
- true if tree view, else table view (default)
-
setTreeShowingInitially
public void setTreeShowingInitially(boolean treeShowingInitially) Sets whether the search dialog should display the initial search result as a tree instead of a table view.- Parameters:
treeShowingInitially- true if tree view, else table view
-
isVisible
public boolean isVisible()Returns whether the finder is visible.- Returns:
- true if visible (default)
-
setVisible
public void setVisible(boolean visible) Sets the visibility of the finder's view.- Parameters:
visible- true if visible (default)
-
createTotals
public javafx.collections.ObservableList<T> createTotals(javafx.collections.ObservableList<T> items) Creates the optional totals from the search results.
By default, all numeric columns are candidates for being summed up. If a primitive numeric column must not be shown in the totals view, its column configurator must return isSummable() = false.- Parameters:
items- the items to create the totals from- Returns:
- the totals (usually one item), null or empty if no totals (default)
-
createTotalsTableView
Creates the totals table view.
Will be invoked only ifcreateTotals(javafx.collections.ObservableList<T>)returned a non-empty list.- Returns:
- the totals table view
-