Reputation: 11330
I am trying to load values into VF input box based on the account selected from popup.
<apex:pageBlockSectionItem id="pageblocksectionitem5">
<apex:outputLabel value="Account Name"></apex:outputLabel>
<apex:panelGroup style="border: 0px solid Blue;" >
<apex:outputPanel layout="inline" style="background-color:#CC0000; padding-left: 3px; position: absolute; margin-left: 0px; margin-top: 2px; margin-right: 0px; height: 20px; border: 0px Red; " ></apex:outputPanel>
<input type="text" name="AccountName" id="Input12" style="margin-left: 5px; " /><img src="/s.gif" class="lookupIcon" onClick='window.open("/apex/xyz,"width=600,height=400,left=150,top=200,toolbar=1,status =1,");'/>
</apex:panelGroup>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem id="pageblocksectionitem3">
<apex:outputLabel value="Linea"></apex:outputLabel>
<apex:outputLabel value="{!linea}"></apex:outputLabel>
</apex:pageBlockSectionItem>
I need to populate linea from the custom field linea__c which is from Account object.. I can query to get the field value. But i need it to happen immediately after the account is selected. How can i do it?
Any pointers would be great...
Thanks
Upvotes: 0
Views: 2949
Reputation: 19622
You'll need JavaScript actions... In fact probably best will be action
and rerender
attributes of most tags you'll see in the Visualforce Component Reference.
Please also have a look at this tutorial: http://wiki.developerforce.com/index.php/Force.com_Tutorial:_An_Introduction_to_Visualforce, especially part above the "Tutorial: Web Applications In A Jiffy". Similar thing (restructured to form new Cookbook: http://developer.force.com/cookbook/recipe/using-ajax-in-a-visualforce-page)
Last but not least - the Visualforce Developer Guide documentation PDF might be interesting for you - the chapter about "Creating a Wizard" (page 98 in the PDF) will be a nice (but a bit too full blown) example.
Upvotes: 1