| |
|
| org.jaffa.components.finder.FinderComponent2 org.jaffa.components.lookup.LookupComponent2
LookupComponent2 | abstract public class LookupComponent2 extends FinderComponent2 (Code) | | This is the base class for all Lookup components.
It inherits the properties from FinderComponent.
Additionally it has the following properties -
1- targetFields : This will have the target-fields to be set based on the selected values from the Lookup.
2- multiSelectLookupListeners : This will maintain the listeners to be notified when row(s) are selected in the Lookup.
It has a convenience method, which should be called by the component's Action class to forward to the generic lookup jsp.
author: GautamJ |
Field Summary | |
final public static String | LOOKUP_ATTRIBUTE A constant used to pass the selected values to the Http Request stream. | final public static String | MULTI_SELECT_CHECKBOX A constant used to store the CheckBoxModel for each row in the GridModel in the FormBean. |
Method Summary | |
public void | addMultiSelectLookupListener(IMultiSelectLookupListener listener) Adds a listener. | protected String | getExcelFormName() This returns a null, since the Lookup components are not expected to serve up Excel content. | protected Collection | getMultiSelectLookupListeners() Returns a Collection of IMultiSelectLookupListener objects. | public String | getTargetFields() Getter for property targetFields. | protected String | getXmlFormName() This returns a null, since the Lookup components are not expected to serve up XML content. | protected void | invokeMultiSelectLookupListeners(MultiSelectLookupEvent event) Invokes the rowsSelected() method of the registered IMultiSelectLookupListener objects in the same thread. | public boolean | isInMultiSelectLookupMode() Returns a true if a MultiSelectLookupListener has been registered with this Lookup. | public FormKey | performLookup(HttpServletRequest request, IModelMap selectedRow) This will add the 'lookup' attribute on the request stream, with a Map containing the fieldnames (from the targetFields property) and values (from the input selectedRow).
It will then invoke the quit() method on itself.
Finally it will return a FormKey object for the generic lookup jsp.
Parameters: request - The HTTP request we are processing Parameters: selectedRow - The row that gets selected on the Results screen. | public FormKey | performLookup(HttpServletRequest request, Map selectedRow) This will add the 'lookup' attribute on the request stream, with a Map containing the fieldnames (from the targetFields property) and values (from the input selectedRow).
It will then invoke the quit() method on itself.
Finally it will return a FormKey object for the generic lookup jsp.
Parameters: request - The HTTP request we are processing Parameters: selectedRow - The row that gets selected on the Results screen. | public FormKey | performMultiSelectLookup(HttpServletRequest request, MultiSelectLookupEvent event) Invokes the rowsSelected() method of the registered IMultiSelectLookupListener objects in the same thread.
It will then invoke the quitLookup() method.
Parameters: request - The HTTP request we are processing Parameters: event - The event object containing the row(s) selected. | public void | quit() This clears the internal collection of listeners. | public FormKey | quitLookup(HttpServletRequest request) This will remove the 'lookup' attribute from the request stream. | public boolean | removeMultiSelectLookupListener(IMultiSelectLookupListener listener) Removes a listener.
Parameters: listener - the listener. | public void | setTargetFields(String targetFields) Setter for property targetFields. |
LOOKUP_ATTRIBUTE | final public static String LOOKUP_ATTRIBUTE(Code) | | A constant used to pass the selected values to the Http Request stream.
|
MULTI_SELECT_CHECKBOX | final public static String MULTI_SELECT_CHECKBOX(Code) | | A constant used to store the CheckBoxModel for each row in the GridModel in the FormBean.
|
addMultiSelectLookupListener | public void addMultiSelectLookupListener(IMultiSelectLookupListener listener)(Code) | | Adds a listener.
Parameters: listener - the listener. |
getExcelFormName | protected String getExcelFormName()(Code) | | This returns a null, since the Lookup components are not expected to serve up Excel content.
null. |
getMultiSelectLookupListeners | protected Collection getMultiSelectLookupListeners()(Code) | | Returns a Collection of IMultiSelectLookupListener objects.
a Collection of IMultiSelectLookupListener objects. |
getTargetFields | public String getTargetFields()(Code) | | Getter for property targetFields.
Value of property targetFields. |
getXmlFormName | protected String getXmlFormName()(Code) | | This returns a null, since the Lookup components are not expected to serve up XML content.
null. |
invokeMultiSelectLookupListeners | protected void invokeMultiSelectLookupListeners(MultiSelectLookupEvent event)(Code) | | Invokes the rowsSelected() method of the registered IMultiSelectLookupListener objects in the same thread.
Parameters: event - The event object containing the row(s) selected. |
isInMultiSelectLookupMode | public boolean isInMultiSelectLookupMode()(Code) | | Returns a true if a MultiSelectLookupListener has been registered with this Lookup.
The associated JSP will use this method to determine if multi-select capability is to be presented to the user.
true if a MultiSelectLookupListener has been registered with this Lookup. |
performLookup | public FormKey performLookup(HttpServletRequest request, IModelMap selectedRow)(Code) | | This will add the 'lookup' attribute on the request stream, with a Map containing the fieldnames (from the targetFields property) and values (from the input selectedRow).
It will then invoke the quit() method on itself.
Finally it will return a FormKey object for the generic lookup jsp.
Parameters: request - The HTTP request we are processing Parameters: selectedRow - The row that gets selected on the Results screen. a FormKey object for the generic lookup jsp. |
performLookup | public FormKey performLookup(HttpServletRequest request, Map selectedRow)(Code) | | This will add the 'lookup' attribute on the request stream, with a Map containing the fieldnames (from the targetFields property) and values (from the input selectedRow).
It will then invoke the quit() method on itself.
Finally it will return a FormKey object for the generic lookup jsp.
Parameters: request - The HTTP request we are processing Parameters: selectedRow - The row that gets selected on the Results screen. a FormKey object for the generic lookup jsp. |
performMultiSelectLookup | public FormKey performMultiSelectLookup(HttpServletRequest request, MultiSelectLookupEvent event)(Code) | | Invokes the rowsSelected() method of the registered IMultiSelectLookupListener objects in the same thread.
It will then invoke the quitLookup() method.
Parameters: request - The HTTP request we are processing Parameters: event - The event object containing the row(s) selected. a FormKey object. |
quit | public void quit()(Code) | | This clears the internal collection of listeners.
It then invokes the quit() method of the base class.
|
quitLookup | public FormKey quitLookup(HttpServletRequest request)(Code) | | This will remove the 'lookup' attribute from the request stream.
It will then invoke the quitAndReturnToCallingScreen() method, if MultiSelectLookupListener was registered.
Otherwise it will quit() and return a FormKey object for the generic lookup jsp, which will close the browser.
Parameters: request - The HTTP request we are processing a FormKey object. |
removeMultiSelectLookupListener | public boolean removeMultiSelectLookupListener(IMultiSelectLookupListener listener)(Code) | | Removes a listener.
Parameters: listener - the listener. true if the listener was removed. |
setTargetFields | public void setTargetFields(String targetFields)(Code) | | Setter for property targetFields.
Parameters: targetFields - New value of property targetFields. |
|
|
|