Image generated using StableDiffusion 2.1 via https://huggingface.co/spaces/stabilityai/stable-diffusion In …
1. Passing Parameters to Apex Method from Visualforce Page
– Developers often wonder how to pass parameters to a controller method in Visualforce.
– Parameters can be passed using the action attribute, actionFunction tag, or apex:commandButton tag.
– The controller method should have a matching signature to receive the parameters.
2. VisualForce Lookup
– Adding an input field with a lookup or master-detail field allows users to enter a text string into the field.
– The lookup field can be linked to a related object or record.
– The lookup field can be created using apex:inputField tag or apex:inputText tag with additional attributes.
3. Visualforce Re-rendering Woes
– Re-rendering can cause issues in Visualforce pages.
– A common problem is when re-rendering a component that depends on another component that is not being re-rendered.
– To solve this issue, use apex:actionFunction to call the controller method and re-render the necessary components.
4. Using Action and ActionFunction Tags
– The action attribute in apex:commandButton tag can be used to pass parameters to the controller method.
– The actionFunction tag can be used with JavaScript to call the controller method and pass parameters.
– Both these tags can be useful in passing parameters from Visualforce page to the controller.
5. Signature Matching for Controller Methods
– When passing parameters to a controller method, the method in the controller should have a matching signature.
– The method should have the same number and types of parameters as passed from the Visualforce page.
– The parameters can be of primitive data types, custom objects, or standard objects.
You can read it here: https://sfdc.blog/UqhRm
Source from bobbuzzard-dot-blogspot-dot-com