Component in Visualforce Page
The <apex: inlineEditSupport> is another most used component on the VF page that provides inline editing support to the container components. We have to put the component inside the <apex: form> component to use this component.
The <apex: inlineEditSupport> component can only be a descendant of one of the following components:
- <apex: repeat>
- <apex: form>
- <apex: outputField>
- <apex: pageBlock>
- <apex: pageBlockSection>
- <apex: pageBlockTable>
- <apex: dataList>
- <apex: dataTable>
The <apex: inlineEditSupport> component has the following attributes on the VF page:
The changedStyleClass is a string-type attribute used for specifying the name of the style class that will be applied to this component when the field's content has changed.
The disabled is a Boolean type attribute that is used for specifying whether inline editing is enabled or not. By default, its value is set to true.
The event is a string-type attribute used for specifying the name of the standard DOM event. The specified DOM event is responsible for triggering inline editing on a field.
The hideOnEdit is an Object-type attribute, i.e., a comma-separated list of button Ids we need to hide when inline editing is activated.
The id is a string-type attribute, i.e., a unique identifier that allows this component to be referenced by other components on the page.
The rendered is a Boolean-type attribute used to specify whether this component is rendered on the page. The boolean value true is set as a default value for this attribute.
The showOnEdit is an Object-type attribute, i.e., a comma-separated list of button IDs which we need to show when inline editing is activated.
Let's take an example to understand how we can use this component on the VF page: