---
title: "Parameter Level"
canonical: "https://wiki.yellowfinbi.com/space/user80/1540223/Parameter%20Level"
format: markdown
---
This is the fourth and lowest level, and is described by the Parameter interface. User input widgets are rendered by implementation classes. Yellowfin has a number of implementations, most of which can be used by instantiating the **ParameterImpl** class and setting the correct input type. Yellowfin uses this information to generate html using its view engine.

The important methods of the ParameterImpl class are listed below:

| **Methods** | **Description** |
| --- | --- |
| <span style="color: #000000">public void setInputType(InputType type)</span> | This is used to set the parameter type to one defined in enum InputType. For example, InputType.SELECT renders a dropdown. |
| <span style="color: #000000">public void setName(String name)</span> | The name of the Parameter gets rendered as a label to the left of the input element. |
| <span style="color: #000000">public void setDescription(String desc)</span> | The description gets rendered below the label. |
| <span style="color: #000000">public void setProperty(String property)</span> | User input is set in this property of a JSON object and sent back to the server when submitted. |
| <span style="color: #000000">public void setMinAllowed(int min)</span><br><span style="color: #000000">public void setMaxAllowed(int max)</span> | Shows an error message if the input is outside of the min or max bounds. This is applicable for numeric input values. |
| <span style="color: #000000">public void addViewOption(String property, Object value)</span><br><span style="color: #000000">public void setViewOptions(Map<String, Object> viewOptions)</span> | The rendered input widget can be customized by setting up options using these methods. The available views and their options are listed in the section on Input Types. |
| <span style="color: #000000">public void addDisplayRule(ParameterDisplayRule rule)</span><br><span style="color: #000000">public void setDisplayRules(List<ParameterDisplayRule> displayRules)</span> | Display Rules are used to determine whether a panel should be displayed or not, based on user input. There’s more on this in the section on [Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |
| <span style="color: #000000">public void addPossibleValue(String val, String desc)</span><br><span style="color: #000000">public void addPossibleValue(String val, String desc, String colour)</span><br><span style="color: #000000">public void setPossibleValues(List<CustomValue<?>> possibleValues)</span> | These methods are used to set up the available option values for an input type such as Dropdown List. addPossibleValue  is also overloaded to accept an integer value. The value, description and colour are used to build a CustomValue object which is then used to render an option. The string in the value field will be saved to the database as the selected option. The description is for display purposes only. |
| <span style="color: #000000">public void setParameterClassName(String className)</span> | Set a CSS class to be applied to the parameter. |
| <span style="color: #000000">public void setCssRules(Set<CssRule> cssRules)</span> | Define CSS rules which can be used for fine-grained control over styling of a parameter. This is described in detail in the section on [Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |
| <span style="color: #000000">public void addParameterValueDisplay(String key, ParameterValueDisplay pvd)</span> | The ParameterValueDisplay object is used to define how a parameter is rendered for a specific input value. The input value is specified in the “key” method parameter. For example, in case of a toggle switch, this could be used to change the image and colour of the switch when the current selection is “false”. ParameterValueDisplay is discussed in detail in the section on [Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |
| <span style="color: #000000">public void setList(boolean)</span><br><span style="color: #000000">public void setListOptions(ListOptions listOptions)</span> | setList is used to determine whether or not to generate a list of parameters of a specified type. For example, when set to true for a TEXTBOX type, it will generate a list of textboxes that can be accumulated to indefinitely using an “add” button. Options for rendering the list are defined using a ListOptions object. This is described in detail in the section on [Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |
| <span style="color: #000000">public void setValidationRules(ParameterValidation rules)</span><br><span style="color: #000000">public void setObjectValidationRules(Map<String, ParameterValidation> rules)</span> | These methods are used to set up front-end validation rules. You can use this to ensure that an input field is not empty, for instance. The Object validation method is used to validate JSON objects. For example, a field matching parameter may hold the mapping between two fields as a JSON object.<br>`{`<br>`  "from": "field1",`<br>`    "to": "field2"`<br>`}`<br>The keys in the map passed to setObjectValidationRules, should be the object properties “from” and “to”. The values should be the ParameterValidation objects for validating “field1” and “field2” respectively. For more details, see the section on[ Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |
| <span style="color: #000000">public void setValueDependencies(List<ValueDependent> deps)</span><br><span style="color: #000000">public void addValueDependency(String prop, PropertyLocation loc)</span><br><span style="color: #000000">public void addValueDependency(ValueDependent dep)</span> | This is used if the Parameter being set up is dependent on another. When the value of one parameter changes, dependent parameters get re-rendered. For more information, see the section on [Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |
| <span style="color: #000000">public void setEvent(String event)</span><br><span style="color: #000000">public void setEventParameters(List<ValueDependent> eventParameters)</span><br><span style="color: #000000">public void addEventParameter(ValueDependent parameter)         </span><br><span style="color: #000000">public void addEventParameter(String prop, PropertyLocation loc)</span><br><span style="color: #000000">public void setEventData(Map<String, Object> eventData)</span><br><span style="color: #000000">public void addEventData(String key, Object value)</span> | Events are similar to Value Dependencies, except in reverse. This is used to trigger an event when the parameter’s value changes. This may be used to change the values of “child” parameters. Event Data is used to send any associated data along with the triggered events. For more information, see the section on [Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |
| <span style="color: #000000">public String getDynamicKey()</span><br><span style="color: #000000">public void setDynamicKey(String dynamicKey)</span> | These methods are used for working with Dynamic Parameters, which is discussed in the section on [Helper Objects](https://yellowfin.atlassian.net/wiki/spaces/user80/pages/1540284). |