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
Modifier and TypeClassDescriptionstatic class
Representation of one selectable value line.class
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a line to the list of valid values.Adds a line to the list of valid values.protected boolean
checkIfTextFitsToFilter
(String text, String filter) void
clear()
Clears all items.static IdTextSelection
Creates a normal instance that is presented to the user as straight list.protected static IdTextSelection
static IdTextSelection
createInstanceWithExplanation
(String explanation) Creates an instance in which the list of valid values is shown together with an explanation string.static IdTextSelection
Creates instance in which each line is rendered with image, text and id, as two lines.static IdTextSelection
void
filterByInputId
(String inputId) Filters all passed values in order to show these ones fitting to the current input.void
filterByInputText
(String inputText) Filters all passed values in order to show these ones fitting to the current input.protected void
Request focus for the filter field.getLines()
getPopup()
Popup instance that is opened by the value help.boolean
boolean
boolean
Request focus for the whole grid.boolean
boolean
static void
void
onCancel
(javax.faces.event.ActionEvent event) Internally used - reactor on "cancel" in popup.void
void
onHtButtonAction
(javax.faces.event.ActionEvent event) void
onListAction
(javax.faces.event.ActionEvent ae) Internal usage.void
onOK
(javax.faces.event.ActionEvent event) Internally used - reactor on "OK" in popup.void
onPopupClosedByUser
(javax.faces.event.ActionEvent ae) Internal usage.void
onRenderBeginAction
(javax.faces.event.ActionEvent event) void
Preselects the corresponding item: the item is selected, focused and the list is scrolled so that the item is visible.protected void
void
Internal usage.void
Internal usage.void
This will move the focus into the filter field when opening the popup.void
setCallBack
(ISetId callBack) Specifies a call back.void
setCallBack
(ISetIdText callBack) Specifies a call back.void
setFilterText
(String filterText) Sets the filter text.void
setListSelection
(String listSelection) void
setPopupHeight
(int height) Set the width of the popup that is opened.void
setPopupWidth
(int width) Set the height of the popup that is opened.void
setRenderFilterText
(boolean renderFilterText) On top of the value list a text field may be shown for filtering the items.void
setRenderIdColumn
(boolean renderIdColumn) Set if id column is to be rendered (true/default) or not (false).void
setRenderTextColumn
(boolean renderTextColumn) Set if text column is to be rendered (true/default) or not (false).void
setSuppressHeadline
(boolean value) If set to "true" then the grid head line is not shown but only the grid content is shown.void
setTitleId
(String titleId) Set the title of the id column.void
setTitleText
(String titleText) Set the title of the text column.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...).void
void
-
Field Details
-
m_explanation
-
-
Method Details
-
initialize
public static void initialize() -
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
public void onPopupClosedByUser(javax.faces.event.ActionEvent ae) Internal usage. -
getLines
-
getExplanation
-
processSelectLine
Internal usage. -
reactOnPopupClosedByUser
public void reactOnPopupClosedByUser()Internal usage.- Specified by:
reactOnPopupClosedByUser
in interfaceBasePopup.IPopupListener
-
getWithHeader
public boolean getWithHeader() -
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. -
getSuppressHeadline
public boolean getSuppressHeadline() -
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. -
getRenderIdColumn
public boolean getRenderIdColumn() -
setRenderIdColumn
public void setRenderIdColumn(boolean renderIdColumn) Set if id column is to be rendered (true/default) or not (false). -
getRenderTextColumn
public boolean getRenderTextColumn() -
setRenderTextColumn
public void setRenderTextColumn(boolean renderTextColumn) Set if text column is to be rendered (true/default) or not (false). -
setFilterText
Sets the filter text. Only applicable ifsetRenderFilterText(boolean)
is activated. -
getFilterText
-
onRenderBeginAction
public void onRenderBeginAction(javax.faces.event.ActionEvent event) -
onFilterTextAction
public void onFilterTextAction() -
getFilterResultText
-
filterItems
protected void filterItems() -
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
public void onOK(javax.faces.event.ActionEvent event) Internally used - reactor on "OK" in popup. -
onCancel
public void onCancel(javax.faces.event.ActionEvent event) 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
public void onListAction(javax.faces.event.ActionEvent ae) Internal usage. -
sortItemsById
public void sortItemsById() -
sortItemsByText
public void sortItemsByText() -
getHtContent
-
onHtButtonAction
public void onHtButtonAction(javax.faces.event.ActionEvent event) -
processKeySequence
-