• Nick Kahn
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 0
    Replies
I need help in getting values from VF component page, just for the sake of clarity I have added very few fields to make my point across.
How to access inputField values that are created inside an apex:repeat.
When I do system.debug('updateMe >>>' + detailList) I see there is old data but NOT the updated value.
Here is the code snippet
 
VF Component:

<apex:component>
  <apex:attribute name="record" description="my custom object" type="meter__c" required="true" />  

    <!-- more fields -->
         <apex:inputField value="{!record.meter_reading__c}"/>
         <apex:inputField value="{!record.desc__c}"/>
</apex:component>
 
VF Page:

<apex:page Controller="MeterReading" >
  <apex:form > 
   <apex:pageBlock>    
      <apex:pageBlockSection>
         <apex:repeat value="{!detailList}" var="detail"> 
            <c:meter_vf_comp record="{!detail}" />
         </apex:repeat>
      </apex:pageBlockSection>
  </apex:pageBlock>
   <apex:commandButton value="Save" action="{!updateMe}"/>
  </apex:form>
</apex:page>
 
Controller:

public with sharing class MeterReading 
{
  public List<meter__c> detailList { get; set; }

public MeterReading() 
{
   detailList = [/*SOQL*/];  //loading the data and display in repeat...
 }

public PageReference updateMe() {
    system.debug('updateMe >>>' + detailList);  
    return null;
}

}

 
I need help in getting values from VF component page, just for the sake of clarity I have added very few fields to make my point across.
How to access inputField values that are created inside an apex:repeat.
When I do system.debug('updateMe >>>' + detailList) I see there is old data but NOT the updated value.
Here is the code snippet
 
VF Component:

<apex:component>
  <apex:attribute name="record" description="my custom object" type="meter__c" required="true" />  

    <!-- more fields -->
         <apex:inputField value="{!record.meter_reading__c}"/>
         <apex:inputField value="{!record.desc__c}"/>
</apex:component>
 
VF Page:

<apex:page Controller="MeterReading" >
  <apex:form > 
   <apex:pageBlock>    
      <apex:pageBlockSection>
         <apex:repeat value="{!detailList}" var="detail"> 
            <c:meter_vf_comp record="{!detail}" />
         </apex:repeat>
      </apex:pageBlockSection>
  </apex:pageBlock>
   <apex:commandButton value="Save" action="{!updateMe}"/>
  </apex:form>
</apex:page>
 
Controller:

public with sharing class MeterReading 
{
  public List<meter__c> detailList { get; set; }

public MeterReading() 
{
   detailList = [/*SOQL*/];  //loading the data and display in repeat...
 }

public PageReference updateMe() {
    system.debug('updateMe >>>' + detailList);  
    return null;
}

}

 

Hi,

I am in need of an urgent help. I want to disable a input text based on the selcted value from a drop down.

I am able to achieve it by using actionSupport on the change event of the dropdown, but it does not work when i want to make the disabled field back to enabled. Surprisingly the actionSupport's action does not get called.

Any help would be appreciated.