+ Start a Discussion
Lina CTCLina CTC 

Can not display inputfield as picklist in tab

Hi all,

I am currently are facing an urgent issue with displaying a picklist value in a visualforce page. The field that we are displaying is "website_Location__c" under "Advertisement__c" object and the field is a picklist.

The field is displayed using <apex:inputField> in a visualforce page "websitePost" as:
<apex:inputField value="{!Advertisement__c.website_Location__c}" />

The problem is that I could display this picklist field normally when I load websitePost.page directly. However, when I try to display this page using <apex:tab> in another visualforce page "jobBoards", no value will displayed for this picklist field. 

Also, I have tried this in several orgs, and only a few orgs have this problem. 

Does anyone knows the solution for this? Thank you.  
Martha VMartha V
Is it because of permissions? Usually when I have a problem with something not displaying on my page is a question of the user's profile not having the right permission settings for the object.
Lina CTCLina CTC
Hi Martha, thank you for your answer. But this issue is not because of permission, as this problem only happends when I display the visualforce page in another visualforce page using tab. When I load this visualforce directly, the picklist could be displayed normally.
Rakesh Thota 15Rakesh Thota 15
Hi Lina CTC,

Here is simple code 
public string UserSelectVAlue {set;get;}
public ListOption<SelectOption> getListVal()
	ListOption<SelectOption> listValues = new List<SelectOption>();
	listValues.add(new SelectOption('','--None--'));
	for(Custom_object__c s: [select Text__c from Custom_object__c where Text__c != null limit 200])
		listValues.add(new SelectOption(c.Text__c,c.Text__c));
	return listValues;

<apex:selectList value="{!UserSelectVAlue}" multiselect="false" size="1">
            <apex:selectOptions value="{!ListVal}"/>
Salesforce has provide a good knowledge doc on this.


Hope this helps you!

Best Regards,
Rakesh Thota.