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

how to retrieve the value from pict list which is of input field
hi guys ,
i have to implement a functionality in which i have to select a value in the picklist (inputfield), when i select the field then the value automatically got stored in object by calling a update method of controller , how to implement this ..
i have to implement a functionality in which i have to select a value in the picklist (inputfield), when i select the field then the value automatically got stored in object by calling a update method of controller , how to implement this ..
Use action function and call the javascript on your field. here is the small example
<apex:actionFunction action="{!accountUpdate}" name="updateAccount" >
<apex:pageBlockTable value="{!accountList }" var="tl">
<apex:column headerValue="T Rank">
<apex:inputField value="{!tl.T_Rank__c}" onchange="updateAccount()"/>
</apex:column>
</apex:pageBlockTable>
public void accountUpdate(){
list<Account> accList = new list<Account>();
for(Account a : accountList ){
accList .add(ra);
}
if(!accList .isEmpty()){
update accList ;
}
}
Thanks,
Pramodh
All Answers
Use action function and call the javascript on your field. here is the small example
<apex:actionFunction action="{!accountUpdate}" name="updateAccount" >
<apex:pageBlockTable value="{!accountList }" var="tl">
<apex:column headerValue="T Rank">
<apex:inputField value="{!tl.T_Rank__c}" onchange="updateAccount()"/>
</apex:column>
</apex:pageBlockTable>
public void accountUpdate(){
list<Account> accList = new list<Account>();
for(Account a : accountList ){
accList .add(ra);
}
if(!accList .isEmpty()){
update accList ;
}
}
Thanks,
Pramodh