Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagejava
themeEclipse
@Override
protected void setupParameters() {
    Parameter p = new Parameter();
    ... 

    addParameter(p);
}

 

 

Styleclass
ClasstopLink

top



Anchor
addParam
addParam

protected final void addParameter(Parameter p)

Plugins should use this method to notify the API of any new parameters it creates. Note that new parameters will not be persisted if they are added outside of the setupParameters method. See above example.



Styleclass
ClasstopLink

top



Anchor
getParamVal
getParamVal

public final Object getParameterValue(String key)

This method returns the current value for the parameter with unique key ‘key’.

Example:

Code Block
languagejava
themeEclipse
Object paramVal = getParameterValue("SOME_KEY");
if (paramVal != null && paramVal.equals("INTERESTING_CONFIG")) {
   // Do something interesting
   ...
}



Styleclass
ClasstopLink

top



Anchor
setParamVal
setParamVal

public void setParameterValue(String key, Object value)

This method sets the stored value for a parameter key.


Example:

 

Code Block
languagejava
themeEclipse
Object paramVal = getParameterValue("SOME_KEY");
if (shouldChangeThisValue(paramVal)) {
   Object newValue = new Object();
   setParameterValue("SOME_KEY", newValue);
}

 

 

 

Styleclass
ClasstopLink

top



Anchor
clearParamVal
clearParamVal

public void clearParameterValue(String key)

Equivalent to calling setParameterValue(key, null); except that this method also removes the parameter key from the parameter values map.

 

Example:

Code Block
languagejava
themeEclipse
Object paramVal = getParameterValue("SOME_KEY");
if (shouldRemoveThisValue(paramVal)) {
   clearParameterValue("SOME_KEY");
}

 

 

Styleclass
ClasstopLink

top


 

Anchor
getParam
getParam

public void getParameter(String key)

Retrieves a previously set up parameter with the given key. Returns null if no parameter with this key exists.


Example:

 

Code Block
languagejava
themeEclipse
if (needToUpdateParameter()) {
   Parameter p = getParameter("SOME_KEY");
   ... 
}

 

 

Styleclass
ClasstopLink

top

 





Section
Column
width75

 Previous Previous topic: Parameter class

Column

Next topic: Dynamic UI set up