You need to sign in to do that
Don't have an account?
Jeremy Deseez
Get all SelectOptions values from each row on a table.
Hello,
I have a table with multiple rows, and a selectoptions for each row.
When I have only one row, I can get the value (fol.Type__c = typeOfOpp;) in my controller, but if there is many rows, the value is "none".
Apex Code :
Kind regards
I have a table with multiple rows, and a selectoptions for each row.
When I have only one row, I can get the value (fol.Type__c = typeOfOpp;) in my controller, but if there is many rows, the value is "none".
Apex Code :
public String typeOfOpp{get;set;} public List<SelectOption> loadFastType(){ fastType = new List<SelectOption>(); fastType.add(new SelectOption('none', '-- Select Type --')); fastType.add(new SelectOption('Optimist', 'Optimist')); fastType.add(new SelectOption('Forecast Exit', 'Forecast Exit')); fastType.add(new SelectOption('Pessimist', 'Pessimist')); return fastType; } public void saveValue(){ List<FAST_OPP__c> fastOppListToSave = new List<FAST_OPP__c>(); for(FAST_OPP__c fol : fastOppList){ fol.Opp_ID__r = null; fol.Type__c = typeOfOpp; fastOppListToSave.add(fol); } try { //upsert fastOppList; upsert fastOppListToSave; } catch (exception ex) { System.debug(ex); } }
Kind regards
It's a pageBlockTable, and the information come from a Custom Object.
VF Page :
<pre>
<apex:selectList styleClass="type_opp" value="{!f.Type__c}" size="1">
</pre>
I've made the change, and now nothing happen when I save the table.
The Lists which come from my Controller are now empty.
Thanks for your help, I will check that
I've made a mistake, It's working now, thanks a lot :)