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
raj123raj123 

Dynamically pass the type for the Apex:Listviews component

Hi , 

 

I am trying to pass the api name of the object i what in the type for the apex:list views 

eg

where api name is the controller variable which has the api name of th eobject ex: Position__c

 

<apex:ListViews type="{!apiName}" />

 

the problem is i am not able to save this . its throwing some error like this 

 

Description Resource Path Location Type
Save error: {!apiName} does not exist listviews.page /MY DEV/src/pages line 0 Force.com save problem

 

when i just print this value in the outputtext the value is printing ,  i dont know whether we can pass the type value dynamically,  let me know about your insights. 

 

thanks. 

sushant sussushant sus
you have to pass direct name
like this
<apex:ListViews type="account" />
you cant bind it from conroller