<apex: dynamicComponent> in Visualforce PageThe <apex: dynamicComponent> is a component tag used for our dynamic apex components. It acts as a placeholder and has one required parameter, i.e., componentValue. The componentValue is the name of the apex method that returns the dynamic component. These are some of the following components which don't have dynamic Apex representations:
The <apex: dynamicComponent> has the following attributes: 1. componentValue The componentValue is a UIComponent type attribute used for specifying the name of the apex method that returns the dynamic VF component. Syntax: 2. id The id is a string type attribute, i.e., a unique identifier that allows this component to be referenced by other components in the custom component definition. Syntax: 3. invokeAfterAction The id is a Boolean type attribute that specifies whether the componentValue's apex method is called after the page's or submit's action method is invoked. Syntax: 4. rendered The rendered is a Boolean type attribute that specifies whether this component needs to be rendered on the page or not. The boolean value true is set as a default value to this attribute. Syntax: Let's take an example to understand how we can use this component on the VF page: ApexDynamicComponentExample.vfp DynamicComponentController.apxc Output Next Topic |