• Pjay
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi all

 

Hope someone can help with this, have been trying to do this for a while and have searched for a solution to no avail. 

 

Here is a snippet from my VF page

<apex:inputField value="{!Service__c.Service_Fee__c}" id="txtServiceFee"/> ... <apex:inputField value="{!Service__c.Type__c}"> <apex:actionSupport event="onblur" action="{!UpdateServiceFee}" rerender="txtServiceFee"/> </apex:inputField>

 

What I am trying to do is update the txtServiceFee inputField value on the VF page whenever the onblur event of lookup field Type__c is triggered. I have attempted to do that with the APEX code below:

 

public class ServiceFee { private Service__C servc; public ServiceFee(ApexPages.StandardController stdController) { servc = (Service__C)stdController.getRecord(); servc.Service_Fee__C = 12.00; } public void UpdateServiceFee() { servc.Service_Fee__C = 16.00; } }

 

When the page loads the txtservicefee input field is set to 12.00 as expected. However when the onblur event is triggered the inputField IS rerendered but isn't updated to 16.00.

 

What am I doing wrong here? Any help would be greatly appreciated.

 

Thanks

Paul

Message Edited by Pjay on 10-28-2009 05:40 PM
  • October 29, 2009
  • Like
  • 0

Hi all

 

Hope someone can help with this, have been trying to do this for a while and have searched for a solution to no avail. 

 

Here is a snippet from my VF page

<apex:inputField value="{!Service__c.Service_Fee__c}" id="txtServiceFee"/> ... <apex:inputField value="{!Service__c.Type__c}"> <apex:actionSupport event="onblur" action="{!UpdateServiceFee}" rerender="txtServiceFee"/> </apex:inputField>

 

What I am trying to do is update the txtServiceFee inputField value on the VF page whenever the onblur event of lookup field Type__c is triggered. I have attempted to do that with the APEX code below:

 

public class ServiceFee { private Service__C servc; public ServiceFee(ApexPages.StandardController stdController) { servc = (Service__C)stdController.getRecord(); servc.Service_Fee__C = 12.00; } public void UpdateServiceFee() { servc.Service_Fee__C = 16.00; } }

 

When the page loads the txtservicefee input field is set to 12.00 as expected. However when the onblur event is triggered the inputField IS rerendered but isn't updated to 16.00.

 

What am I doing wrong here? Any help would be greatly appreciated.

 

Thanks

Paul

Message Edited by Pjay on 10-28-2009 05:40 PM
  • October 29, 2009
  • Like
  • 0