com.atlassian.jira.web.dwr
Class AutoCompleteResults
java.lang.Object
com.atlassian.jira.web.dwr.AutoCompleteResults
public class AutoCompleteResults
- extends Object
This bean is designed to be relected by DWR as a JavaScript object. The atlassian YUI AutoComplete implementation depends
on its use.
If an errorMessage is present, then only it is shown in the AC header. Otherwise the header and footer are used as expected.
The body of the AC is filled with the String[][] array, which is a repeating array of type and params. The key is used by the
YUI AC to cache results and also as the value put into the text field.
If more than 2 parameters are used, the response will be decorated on the client side.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTML_TYPE
public static final String HTML_TYPE
- See Also:
- Constant Field Values
ISSUE_TYPE
public static final String ISSUE_TYPE
- See Also:
- Constant Field Values
SECTION_TYPE
public static final String SECTION_TYPE
- See Also:
- Constant Field Values
SECTION_SUBHEADER_TYPE
public static final String SECTION_SUBHEADER_TYPE
- See Also:
- Constant Field Values
MESSAGE_TYPE
public static final String MESSAGE_TYPE
- See Also:
- Constant Field Values
AutoCompleteResults
public AutoCompleteResults()
addResult
public void addResult(String key,
String html)
- Called to add a key and html result to the auto complete results. You should call this
repeatedly for all result you need to send down to the auto complete field.
- Parameters:
key
- the key that will be used by the YUI input fieldhtml
- the display html that will be used in the YUI drop down list
addResult
public void addResult(String type,
String key,
String[] params)
- Called to add a imageURL, key and description result to the auto complete results. You should call this
repeatedly for all result you need to send down to the auto complete field.
- Parameters:
type
- The type of the resultkey
- specify an optional key for this entry.params
- specified for this result
getResults
public String[][] getResults()
- The client YUI code requires that all results be an array of keys and display values. This is how this is done. It reflects
the previous calls to addResult().
- Returns:
- an array of String arrays
getErrorMessage
public String getErrorMessage()
setErrorMessage
public void setErrorMessage(String errorMessage)
getHeaderMessage
public String getHeaderMessage()
setHeaderMessage
public void setHeaderMessage(String headerMessage)
getFooterMessage
public String getFooterMessage()
setFooterMessage
public void setFooterMessage(String footerMessage)
Copyright © 2002-2008 Atlassian. All Rights Reserved.