Class SimpleCallout.CalloutInfo
- java.lang.Object
-
- org.openbravo.erpCommon.ad_callouts.SimpleCallout.CalloutInfo
-
- Enclosing class:
- SimpleCallout
protected static class SimpleCallout.CalloutInfo extends Object
Helper class that contains all data to access callout information and servlet information
-
-
Field Summary
Fields Modifier and Type Field Description VariablesSecureApp
vars
Provides the coder friendly methods to retrieve certain environment, session and servlet call variables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResult(String param, Object value)
Sets the value of a field named param with the value indicated.void
addResult(String param, String value)
Sets the value of a field named param with the value indicated.void
addSelect(String param)
Starts the inclusion of values to the combo field with the name passed as parameter.void
addSelectResult(String name, String value)
Adds an entry to the select field and marks it as unselected.void
addSelectResult(String id, String identifier, boolean selected)
Adds an entry value to the combo field.void
endSelect()
Finish the inclusion of values to the combo field.void
executeCallout(SimpleCallout callout)
Invokes another SimpleCallout.protected void
executeCodeInBrowser(String value)
Executes the javascript code indicated in the value in the browser.BigDecimal
getBigDecimalParameter(String param)
org.codehaus.jettison.json.JSONObject
getJSONObjectResult()
Returns the value of the result variableString
getLastFieldChanged()
String
getResult()
Returns the value of the result variable as a StringString
getStringParameter(String param)
String
getStringParameter(String param, RequestFilter filter)
String
getTabId()
String
getWindowId()
void
removeSelectResult(String id)
Removes an entry of the combo field.protected void
showError(String value)
Shows an error message in the browser with the value indicated.protected void
showInformation(String value)
Shows an information message in the browser with the value indicated.protected void
showMessage(String value)
Shows a message in the browser with the value indicated.protected void
showSuccess(String value)
Shows a success message in the browser with the value indicated.protected void
showWarning(String value)
Shows a warning message in the browser with the value indicated.
-
-
-
Field Detail
-
vars
public VariablesSecureApp vars
Provides the coder friendly methods to retrieve certain environment, session and servlet call variables.
-
-
Method Detail
-
executeCallout
public void executeCallout(SimpleCallout callout) throws javax.servlet.ServletException
Invokes another SimpleCallout. This method allows to divide callouts functionality into several callout classes- Parameters:
callout
- SimpleCallout instance to invoke- Throws:
javax.servlet.ServletException
-
getLastFieldChanged
public String getLastFieldChanged()
- Returns:
- The name of field that triggered the callout.
-
getTabId
public String getTabId()
- Returns:
- The Tab Id that triggered the callout.
-
getWindowId
public String getWindowId()
- Returns:
- The Window Id that triggered the callout.
-
getStringParameter
public String getStringParameter(String param, RequestFilter filter)
- Parameters:
param
- The name of the field to get the value.filter
- Filter used to validate the input against list of allowed inputs.- Returns:
- The value of a field named param as an
String
. If value is modified previously by a parent callout, updated value is returned.
-
getBigDecimalParameter
public BigDecimal getBigDecimalParameter(String param) throws javax.servlet.ServletException
- Parameters:
param
- The name of the field to get the value.- Returns:
- The value of a field named param as a
BigDecimal
. - Throws:
javax.servlet.ServletException
-
addSelect
public void addSelect(String param)
Starts the inclusion of values to the combo field with the name passed as parameter.- Parameters:
param
- The name of the combo field to set the values.
-
addSelectResult
public void addSelectResult(String name, String value)
Adds an entry to the select field and marks it as unselected.- Parameters:
name
- The entry name to add.value
- The entry value to add.
-
removeSelectResult
public void removeSelectResult(String id)
Removes an entry of the combo field.- Parameters:
id
- The id of the combo entry to be removed.
-
addSelectResult
public void addSelectResult(String id, String identifier, boolean selected)
Adds an entry value to the combo field.- Parameters:
id
- The id of the combo entry to add.identifier
- The identifier of the combo entry to addselected
- Whether this entry field is selected or not.
-
endSelect
public void endSelect()
Finish the inclusion of values to the combo field.
-
addResult
public void addResult(String param, Object value)
Sets the value of a field named param with the value indicated.- Parameters:
param
- The name of the field to get the value.value
- The value to assign to the field.
-
addResult
public void addResult(String param, String value)
Sets the value of a field named param with the value indicated. This method is useful to set numbers likeBigDecimal
objects.- Parameters:
param
- The name of the field to get the value.value
- The value to assign to the field.
-
showMessage
protected void showMessage(String value)
Shows a message in the browser with the value indicated.- Parameters:
value
- The message to display in the browser.
-
showError
protected void showError(String value)
Shows an error message in the browser with the value indicated.- Parameters:
value
- The error message to display in the browser.
-
showWarning
protected void showWarning(String value)
Shows a warning message in the browser with the value indicated.- Parameters:
value
- The warning message to display in the browser.
-
showInformation
protected void showInformation(String value)
Shows an information message in the browser with the value indicated.- Parameters:
value
- The information message to display in the browser.
-
showSuccess
protected void showSuccess(String value)
Shows a success message in the browser with the value indicated.- Parameters:
value
- The success message to display in the browser.
-
executeCodeInBrowser
protected void executeCodeInBrowser(String value)
Executes the javascript code indicated in the value in the browser.- Parameters:
value
- The javascript code to execute in the browser.
-
getResult
public String getResult()
Returns the value of the result variable as a String
-
getJSONObjectResult
public org.codehaus.jettison.json.JSONObject getJSONObjectResult()
Returns the value of the result variable
-
-