You need to sign in to do that
Don't have an account?
Richa K
Get the current instance value from VF page
I am using a custom controller(Not extension controller) for a VF page. That VF page has a lookup to Accounts. I want the selected lookup field value in my controller. I am using actionSupport for this(On change of lookup).
Any help?
Try adding a custom js function on the onchange event of the field if it dosent works please put your code here so that i can look into it
Thanks!
Sure!
Class:
Page:
<apex:inputField value="{!objInv.Account__c}" >
<apex:actionSupport event="onchange" action="{!newTets}" immediate="true">
<apex:param name="invaccount" assignTo="{!invAccount}"/>
</apex:actionsupport>
</apex:inputField>
and put this in your class
public string invAccount{get;set;}
Hi Shailesh,
I hope the solution of kiran would have solved your problem or just let me know i wil provide you more details
Hi Kiran,
I put param like this :
Still no luck... the debug in newTest still say :
Is there any approach?
write a constructor and find this debug value
system.debug(apexpages.currentpage().getparameters().get('invaccount'));
i think u need a ajax call here ... when ever u are tring to call the method in onchange thats a fresh call to the server it wont take the old call... so use rerender in action support..and render an fake output panel...
declare an output panel
<apex:outputpanel id="op"/>
and in apex:actionsupport rerender="op" try this way u can get that value to the controller..
HI Kiran
No luck man. Earlier in debug logs, it will show the value as 'null' but when I used renderer, it is simply blank/. No value is being shown.
Like :
14:38:42.062 (62336000)|USER_DEBUG|[99]|DEBUG|=========invAccount2===
M I missing something?
Shailesh ,
There is a problem with apex:param this never worked for me properly. It will not work with command button or command
link actionfunction instead it will work for sure
Thanks
Abhay