You need to sign in to do that
Don't have an account?

want to get more then 10 value in selectoptions through controller
hi all
now what i m doing here i have one string in variable like String s1 = 'salesforce'
now i m firing one quarry
select name from account where name = '"+s1+"'
and i want to display that account name in to Selectoption component
u can get better idea from code
but i cant get into that listbox of selectoptioin component
please advise
Thanks & Regards
Amar joshi
now what i m doing here i have one string in variable like String s1 = 'salesforce'
now i m firing one quarry
select name from account where name = '"+s1+"'
and i want to display that account name in to Selectoption component
u can get better idea from code
Code:
///page code/// <apex:page controller="convert1" tabstyle="lead"> <apex:selectlist value="{!list}" size="1" required="True"> <apex:selectoption itemvalue="{!items}"/> ////controller//// public class convert1 { String s1; Lead name; public list<account> getItems() { if(name == null) name = [select company from lead where id = :ApexPages.currentPage().getParameters().get('id')]; s1=name.company; list<Account> ac = new account[]{}; ac = [select name from account where name = '"+s1+"']; return ac; } }
please advise
Thanks & Regards
Amar joshi



Code:
i think u need to add yr options into List od selectOption as mentioned above.