Class IdTextSelection
java.lang.Object
org.eclnt.jsfserver.defaultscreens.IdTextSelection
- All Implemented Interfaces:
Serializable,BasePopup.IPopupListener,ModalPopup.IModalPopupListener
Class for server side implementation of COMBOFIELD component. Opens
a pop up window with a list of valid values and calls back the
logic when the user selects a value. Use @link
createInstance()
or @line createInstanceWithExplanation(String) in order
to get an instance, then fill values via @link addLine(String, String)
and specify the call back. You can select two call back options: either
just the selected id via @link #setCallBack(ISetId) or the selected id and
its text via @link #setCallBack(ISetIdText).- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInternal use only.class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionAdds a line to the list of valid values.Adds a line to the list of valid values.protected booleancheckIfTextFitsToFilter(String text, String filter) voidclear()Clears all items.static IdTextSelectionCreates a normal instance that is presented to the user as straight list.protected static IdTextSelectionstatic IdTextSelectioncreateInstanceWithExplanation(String explanation) Creates an instance in which the list of valid values is shown together with an explanation string.static IdTextSelectionCreates instance in which each line is rendered with image, text and id, as two lines.static IdTextSelectionvoidfilterByInputId(String inputId) Filters all passed values in order to show these ones fitting to the current input.voidfilterByInputText(String inputText) Filters all passed values in order to show these ones fitting to the current input.voidDirectly execute the filtering of the items using the filter text passed bysetFilterText(String).Request focus for the filter field.getLines()getPopup()Popup instance that is opened by the value help.booleanbooleanbooleanRequest focus for the whole grid.booleanbooleanstatic voidstatic voidinitializeParentHotkeysActive(boolean value) voidonCancel(ActionEvent event) Internally used - reactor on "cancel" in popup.voidvoidonHtButtonAction(ActionEvent event) voidInternal usage.voidonOK(ActionEvent event) Internally used - reactor on "OK" in popup.voidInternal usage.voidonRenderBeginAction(ActionEvent event) voidPreselects the corresponding item: the item is selected, focused and the list is scrolled so that the item is visible.protected voidvoidInternal usage.voidInternal usage.voidThis will move the focus into the filter field when opening the popup.voidsetCallBack(ISetId callBack) Specifies a call back.voidsetCallBack(ISetIdText callBack) Specifies a call back.voidsetFilterText(String filterText) Sets the filter text.voidsetListSelection(String listSelection) voidsetPopupHeight(int height) Set the width of the popup that is opened.voidsetPopupWidth(int width) Set the height of the popup that is opened.voidsetRenderFilterText(boolean renderFilterText) On top of the value list a text field may be shown for filtering the items.voidsetRenderIdColumn(boolean renderIdColumn) Set if id column is to be rendered (true/default) or not (false).voidsetRenderTextColumn(boolean renderTextColumn) Set if text column is to be rendered (true/default) or not (false).voidsetSuppressHeadline(boolean value) If set to "true" then the grid head line is not shown but only the grid content is shown.voidsetTitleId(String titleId) Set the title of the id column.voidsetTitleText(String titleText) Set the title of the text column.voidsetWithHeader(boolean value) The header is the area in which the OK and cancel button is rendered (once upon a time this area way the header of the popup, now it has moved to the bottom...).voidvoid
-
Field Details
-
m_explanation
-
-
Method Details
-
initialize
public static void initialize() -
initializeParentHotkeysActive
public static void initializeParentHotkeysActive(boolean value) -
getPopup
Popup instance that is opened by the value help. -
getRequestFocus
Request focus for the whole grid. By default has value "creation" - but this may be overridden when e.g. pre-selecting a certain item of the grid. -
getFilterRequestFocus
Request focus for the filter field. By default is not set. But can be explicitly set by callingrequestFocusInFilterField(). -
requestFocusInFilterField
public void requestFocusInFilterField()This will move the focus into the filter field when opening the popup. Only is applied ifsetRenderFilterText(boolean)is called with value "true". -
setTitleId
Set the title of the id column. -
getTitleId
-
setTitleText
Set the title of the text column. -
getTitleText
-
createInstance
Creates a normal instance that is presented to the user as straight list. UseraddLine(String, String)in order to add items. -
createInstanceHt
-
createInstanceWithExplanation
Creates an instance in which the list of valid values is shown together with an explanation string. UseaddLine(String, String)in order to add items. -
createInstanceWithImageLine
Creates instance in which each line is rendered with image, text and id, as two lines. UseaddLine(String, String, String)in order to add items. -
createListInstance
-
clear
public void clear()Clears all items. -
addLine
Adds a line to the list of valid values. -
addLine
Adds a line to the list of valid values. The image is only visible if having created this intance via#createInstanceWIthImageLine(), otherwise only id and name will be shown. -
setCallBack
Specifies a call back. The call back passes the selected id. -
setCallBack
Specifies a call back. The call back passes the selected id and the selected text. -
onPopupClosedByUser
Internal usage. -
getLines
-
getExplanation
-
processSelectLine
Internal usage. -
reactOnPopupClosedByUser
public void reactOnPopupClosedByUser()Internal usage.- Specified by:
reactOnPopupClosedByUserin interfaceBasePopup.IPopupListener
-
setWithHeader
public void setWithHeader(boolean value) The header is the area in which the OK and cancel button is rendered (once upon a time this area way the header of the popup, now it has moved to the bottom...). By default it is shown but you can explicitly switch it off passing "false" as value. -
getWithHeader
public boolean getWithHeader() -
setSuppressHeadline
public void setSuppressHeadline(boolean value) If set to "true" then the grid head line is not shown but only the grid content is shown. -
getSuppressHeadline
public boolean getSuppressHeadline() -
setRenderIdColumn
public void setRenderIdColumn(boolean renderIdColumn) Set if id column is to be rendered (true/default) or not (false). -
getRenderIdColumn
public boolean getRenderIdColumn() -
setRenderTextColumn
public void setRenderTextColumn(boolean renderTextColumn) Set if text column is to be rendered (true/default) or not (false). -
getRenderTextColumn
public boolean getRenderTextColumn() -
setFilterText
Sets the filter text. Only applicable ifsetRenderFilterText(boolean)is activated. -
getFilterText
-
onRenderBeginAction
-
onFilterTextAction
public void onFilterTextAction() -
getFilterResultText
-
filterItems
public void filterItems()Directly execute the filtering of the items using the filter text passed bysetFilterText(String). If not called directly then the filtering is done automatically by the onRenderBeginAction method which is called with every round trip. -
getCurrentSelectableIds
- Returns:
- The ids that can be currently selected. This method is in particular of interest when using the filter property: in this case the list of ids depends on the filter text which is passed.
-
checkIfTextFitsToFilter
-
setRenderFilterText
public void setRenderFilterText(boolean renderFilterText) On top of the value list a text field may be shown for filtering the items. By default this field is not shown. By passing "true" the filter text field is shown. -
getRenderFilterText
public boolean getRenderFilterText() -
onOK
Internally used - reactor on "OK" in popup. -
onCancel
Internally used - reactor on "cancel" in popup. -
filterByInputId
Filters all passed values in order to show these ones fitting to the current input. -
filterByInputText
Filters all passed values in order to show these ones fitting to the current input. -
setPopupWidth
public void setPopupWidth(int width) Set the height of the popup that is opened. -
setPopupHeight
public void setPopupHeight(int height) Set the width of the popup that is opened. -
preselect
Preselects the corresponding item: the item is selected, focused and the list is scrolled so that the item is visible.
Remark: If having calledrequestFocusInFilterField()before calling this method then the focus is NOT moved into the selected item, but stays in the filter field. -
getListValues
-
getListSelection
-
setListSelection
-
onListAction
Internal usage. -
sortItemsById
public void sortItemsById() -
sortItemsByText
public void sortItemsByText() -
getHtContent
-
onHtButtonAction
-
processKeySequence
-