function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Small Doubt in a Visualforce Program



I am unable to understand the below program, especially the "{!filterid}" ,  "{!listviewoptions}" and "{!list}" . Are they built-in? What is their functionality? Can you please explain about them in detail.


<apex:page standardController="Account" recordSetVar="accounts">
<apex:selectList value="{!filterid}" size="1">
<apex:selectOptions value="{!listviewoptions}"/>
<apex:commandButton value="Go" action="{!list}"/>


Also I am little bit confused with usage of selectList, can you pls explain it also?


Thanks in advance,


Yes they are all built-in.

Visualforce page tags are made for developers convenience.

selectList with size 1 is a valid picklist which is taking its options from another tag select option, as u see thats a child tag.

now to the part u said "unable to understand"

- - > "filterid" is nothing but ur recent selection from the picklist, u can take out that attribute and see the change.
- - > "listviewoptions" the are the views of ur data. they hold "fcf" hyperlinks.

the more u do such exercises the more u understand platform.

Rahul SharmaRahul Sharma
In this page, you are using StandardSetcontroller as Account.

So in the back-end, It automatically creates a Account's StandardSetcontroller controller with some properties you listed as well as the buttons like, save, save and new, etc.

Use this standard controllers whenever you want to mimic the standard page behavior and if you want to extend the same, you could add a extension to your page.

select list is use to create dropdown list in vf page.