Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [selectoption]

The tag has no usage guidance.

0
votes
0answers
19 views

Ability to show validation rule errors next to Stage on VF page when restricting some stage values using selectoption

Here's my vf page: <apex:column headerValue="Stage" id="stageerrors"> <apex:actionRegion > <apex:selectList value="{!opp.opp.StageName}" multiselect="false" size="1" > <apex:...
1
vote
1answer
23 views

SelectOption List not populating dropdown on VF Page

I've been over the code a thousand times but cannot work out why the getVenueLst() method is not populating the SelectList on the vf page. Anyone have any ideas? Controller Public string ...
0
votes
1answer
29 views

Style apex select option in Bootstrap theme

Please help me to style custom picklist in bootstrap theme. So I have a controller with code: public List<selectOption> getSettings() { List<SelectOption> options = new List<...
0
votes
1answer
16 views

Getting selectoption value in method to query

I need to take user name from the select option picklist from vf page and on the basis of that value i need to show tasks related to that user. i am using below code but unable to get exact reason ...
0
votes
1answer
285 views

How to save picklist value selected by user on visualforce page

I have a requirement where I am not displaying the actual salesforce picklist field on visualforce page but rather a self created selectlist with some values. I was able to display it on visualforce ...
0
votes
0answers
16 views

I want to keep next and previous buttons after picklist field and i want the next value in picklist field after clicking next button

public class RecordsBetweenDates1 { public List<Opportunity> lste {get;set;} public List<Opportunity> lstelist {get;set;} public string statusSelected{get;set;} ...
0
votes
1answer
42 views

How to execute if condition inside option tag in Lightning Component

I wanted to display a different text for a specific set of result from the records. I tried the following code but it just displays the condition as it is. Is this even possible inside the option tag? ...
0
votes
0answers
45 views

CSS - Salesforce Picklists extra padding/margin on standard layouts? > select option

This seems to happen only in Chrome - I have tried the following: Removed all extensions Removed Profile Reset all flags Reset Settings Reinstalled Chrome I even navigated to google\chrome\user ...
0
votes
1answer
371 views

Why is SelectOption not supported by JSON class? [duplicate]

Here's the code: List<SelectOption> options = new List<SelectOption>(); options.add(new SelectOption('One', 'One')); options.add(new SelectOption('Two', 'Two')); System.debug(LoggingLevel....
0
votes
1answer
1k views

Access multi - select picklist selected values in Apex Class

I have the following multi-select picklist code in my Visualforce page <apex:selectList styleClass="form-control evemin" id="testid" size="3" multiselect="true" value="{!testVariable}" > ...
1
vote
1answer
426 views

saveRecord Component: Set Required Picklist values

I am trying to just get a simple record saved, and I continue to get errors saying I am not setting a required field, campus__c. I have a ui:select component which should explicitly define the values....
0
votes
1answer
86 views

Dynamic Select Option in Remote Objects Visualforce. This page is not record-specific

The question is in the code comments. Thank you! <apex:page> <apex:remoteObjects > <apex:remoteObjectModel jsShortHand="js" name="myCustomObject__c" fields="Id"> <apex:...
-1
votes
1answer
69 views

Test Class Variable Error [duplicate]

I havent written any test classes before and I am having trouble getting started. Can someone help me put something together for this? I'm trying to insert a record with a certain field value (...
1
vote
1answer
1k views

SelectOption with every picklist value as an option

I have a table & in it there is an attribute that is a picklist with 4 values, as seen: I'm trying to make a dropdown selectlist, something that would look like this: but adding these options ...
0
votes
1answer
217 views

apex:selectList isn't working with apex:actionRegion

I am building a Single App Application and got this error on a vf page: apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies ...
0
votes
2answers
80 views

How to fix: rendered=“false” on a selectoption causes further selectoptions within the repeat to not render

<apex:repeat value="{!myList}" var="item" id="myRepeater"> ... <apex:selectList required="" value="{!item.newValue}" id="mySelectlist" multiselect="false" size="1" style="border:none;-...
0
votes
2answers
512 views

Creating selectList/selectOptions from SOQL

I have a SOQL query and I want to add the results to a selectList and I'm not totally sure how. The documentation on selectList makes it look like I should loop through the results and add them as ...
1
vote
1answer
506 views

Getting Keys from SelectOption in a String List

I have a getter method to create a SelectOption. I want to put all the keys in Returned value to a List in another Method. public List<SelectOption> getsortlist() { List<SelectOption&...
0
votes
1answer
81 views

Limit SOQL results using 'with sharing' in Controller does not limit returned data for Pricebooks

I am running a SOQL query in a controller where I have declared 'with sharing' at the class level. The returned results are not following the sharing rules setup for the current user. The sharing ...
0
votes
2answers
286 views

Visualforce: Convert String into dropdown values

Trying to render the list on visualforce page and convert multiselect picklist into dropdown instead of getting selectoptions from controller. Class returntoVF { String name; object ...
0
votes
1answer
48 views

Radio buttom disable one filed out of three inputfields [closed]

i need some option like: three input fields linked with three radio buttons, initially all the fields should active, if i click first radio button it should disable 2nd & 3rd inputfiled, please ...
3
votes
1answer
428 views

Invalid selectOptions found. Use SelectOption type in Apex (why?) [duplicate]

I was trying to add a dropdown menu inside VF page (where I already have other pageBlockTables). I only need to retrieve one field (c.sfprn) from an existing SOQL query where it is already used for ...
0
votes
1answer
84 views

Need Header and selectionOptions list in apex column

I am trying to have a pageBlockTable, with one of the column having the name and a selectOption list, to filter the records, the problem is i'm unable to render both of them. Either the Header label ...
0
votes
3answers
1k views

How to display a picklist based on the value chose on another picklist

I need to display two picklist in VF page. I have created a picklist using selectoption (Say PickList1) which has values of '1,2,3,4,5'. Now on selecting a value from this picklist i need to display ...
0
votes
0answers
46 views

selectOptions isnt working in visual force page

SelectOption isnt function properly. Whats the issue in selectOptions Error: Invalid selectOptions found. Use SelectOption type in Apex. <apex:page controller="Sample" > <apex:form > ...
1
vote
0answers
77 views

'actionSupport' is not working when inputField is included in same 'form'

What I am doing ? I have 3 fields in an object Account(lookup to Account),User(Lookup to User) and Permissions(Multi select picklist). I needed to only show few values from all the values in ...
1
vote
1answer
79 views

Is there a way to override System class?

I made a new class and named it SelectOption.cls so i could use it as wrapper class, and after a while i noticed that other Apex controller was using System SelectOption class, and that visualforce ...
0
votes
1answer
50 views

Select Ratio only showing 2 options

we are having an issue here related to select radio. We have a radio button which has potentially up to 5 options, but only the first 2 are showing up. Here is the Visualforce page code: <apex:...
0
votes
1answer
47 views

Value of SelectList not getting captured

I have a Selectlist in my Visualforce page and I'm passing the values from the controller. The value selected is not getting captured. The code is given below. Visualforce page <apex:page ...
0
votes
2answers
703 views

Remove an option from a Visual force SelectList SelectOption

I have a VisualForce page where I am using SelectList and SelectOption. For example if my SelectOption list contians Option 1 Option 2 Option 3 I need to remove Option 2 on the page by its value not ...
0
votes
2answers
29 views

VF - Picklist of Accounts - Access selected value in controller

I have my list populating correctly but I don't know how to get the ID value of the selected account back to my controller. Can someone tell me the correct syntax? Useful bits of my controller: ...
-1
votes
2answers
581 views

How can i add label to apex:selectOptions?

I'm trying to add a label to apex:selectOptions, but cant figure out how to display it, I'v managed to add it in the object but cant display in VFP ,any help? EDIT: thanks for your answers, but let ...
0
votes
1answer
131 views

Unknown property error - from Apex Page save

Please find below my apex controller for which I am getting unknown property error for TableExampleController.CISubClass.Id when I try compile my corresponding page with it. I am not getting the ...
0
votes
1answer
57 views

reRender value determine

Please find below code where I am facing problem with the reRender value. It's not working as expected. When I change Campaign value, as Product changes accordingly, Userlist below (which is in a ...
0
votes
2answers
255 views

Selectlist options change not reflecting in apex class

I am facing an issue where a select list value default selected getting passed fine to controller during compile and page load. But on change simply it's even not coming on debug statement. Apexpage ...
1
vote
1answer
947 views

Render an InputText based on Selected Option

In my VF page I have an apex:selectList with a List of Vendors (e.g. Alcatel,Cisco ec..), the last option is "Other". When the user select "Other" an apex:inputText should be rendered where he can ...
0
votes
1answer
422 views

How to display item label in select list option in <apex:outputtext>

I have a select-option list which contains values as (eg: SystemIdops.add(new SelectOption(system1.id,system1.NEX_Friendly_Name__c))) id,name). Name will be displayed in VF page ,when user select the ...
0
votes
1answer
37 views

Send a List to other Page (apex and visualforce)

The idea: Do a search, and shows a List with Select Option Select some items and send it to a new Page (just those witch I selected) The problem: In the new page, is showing all the searched list ...
0
votes
1answer
4k views

Create a drop down list in VF Page

I am trying to get a drop down option on my VF page with below code: <apex:page controller="sampleCon"> <apex:form > <apex:selectList value="{!countries}" multiselect="true"...
1
vote
1answer
610 views

Get the value of drop down list that was selected earlier

In my piece of code below, I use select list tag to get user's input for a field of an object. I have a text field type for an object which I am trying to update using a VF page. <...
1
vote
1answer
311 views

Custom Sort of SelectOption [closed]

I have a scenario in which i need to display the country data in below format: United States Canada {Alphabetical Ascending sort of the remaining countries} The data is coming from custom table ...
0
votes
2answers
111 views

Accessing static helper method in Visualforce page

I'm trying to access helper method from Visualforce page directly and I'm not sure if this possible and I'm getting the following error below and with the code I have. Error Error: Unknown ...
1
vote
1answer
4k views

Get value of selectOption and populate value elsewhere on Visualforce page

I'm trying to take a selectOptions component, and display/manipulate it's value once selected onclick. So far I'm able to place actionSupport inside of my selectList but I'm not sure how to actually ...
4
votes
3answers
6k views

Apex:selectList value - How to set it initially?

I have a complicated problem so i'm hoping to ask this question generically: I see a lot of examples that mostly work just fine with SelectList and SelectOptions. My particular problem is that i can ...
3
votes
4answers
4k views

Adding/defaulting a null value to a selectlist on a Visualforce page

I am creating a VF page that basically has different "pages" that each have different questions on them. Each "page" is a different outputpanel that is rendered depending on clicking a Continue or ...
1
vote
2answers
4k views

How retreive the selected option for ui:inputSelect on component load?

I'm working on a lightning app with variety of questions that the user answers by selecting an option from a ui:inputSelect component and then saves their answers to a field on my object. I have save ...
0
votes
2answers
2k views

How to test a Dropdown (SelectList/SelectOption)?

I have a custom controller. There is a dropdown on the VF page and a button. Once, I select an option and click on the button, the value selected is displayed in the outputPanel. public class ...
0
votes
2answers
1k views

Visualforce Select vs HTML Select - Mapping Values

I have been looking at using a select list (picklist) in a Visualforce page form. Below are four methods of doing this. Each has it's own positives, however, i would like to know which is the best ...
1
vote
2answers
136 views

Update user input value to a custom field

I have a below Visualforce page , where I am getting a user input using drop down selection. This input is for a custom field of an object which I need to update once I click save on the VF page. VF ...
1
vote
2answers
59 views

question on using pageblocksection

A part of VF page is below: <apex:pageBlockSection title="EVALUATION"> <apex:pageblockTable value="{!interviewSkillReviews}" var="skillreview"> <apex:column headerValue="...