1

i want to populate certain field on the basis of selecting some look up field.below is the code i am giving.

        <td class="table_gap"><apex:outputLabel styleClass="BoldWord">Opportunity</apex:outputLabel></td>
        <td class="table_gap"><apex:inputField styleClass="inputWidth" id="opportunityId" value="{!oSingle.opportunity__c}">
                        </apex:inputField>
        </td>

i want if user select an opportunity, certain action will run and pull the data from that opportunity and send it back to the page.without refreshing the page. so that the other field data would be intact.

Below is the code that i am writting:--

        <td class="table_gap"><apex:outputLabel styleClass="BoldWord">Opportunity</apex:outputLabel></td>
        <td class="table_gap"><apex:inputField styleClass="inputWidth" id="opportunityId" value="{!oSingle.opportunity__c}">
        <apex:actionSupport event="onblur" action="{!getOpportuniteRecord}" rerender="opportunityId" />
        </apex:inputField>
        </td>

      </tr>

But this code is not working.

Thanks...

1
  • Try changing the event to onchange in <apex:actionSupport>. Jun 18, 2015 at 10:47

1 Answer 1

1

i have resolve this issue what is done is:--

     <apex:actionRegion > 
                <td class="table_gap"><apex:outputLabel styleClass="BoldWord">Opportunity</apex:outputLabel></td>
                <td class="table_gap"><apex:inputField styleClass="inputWidth" id="opportunityId" value="{!oSingle.opportunity__c}" >            
                <apex:actionSupport event="onchange" action="{!OpportuniteRecord}" rerender="readw" />
                </apex:inputField>                
                </td>
</apex:actionRegion>

and fields where data to be populated on the basis of this action is, to be within the block of:--

  <apex:outputPanel id="readw" >  
   </apex:outputPanel>

Thanks for your comment....

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .