2

In the page below,Topic__c is a single-select picklist. My intention is to have this list control which of the input fields is available below. The user selects an option, and the onchange event should fire, and rerender the fields.

<apex:inputField value="{!Call_Report__c.Topic__c}" id="topic" > 
           <apex:actionSupport event="onchange" reRender="tickerInput,sectorInput,bondInput">  
             <apex:param name="topicSelection" value="{!Call_Report__c.Topic__c}" /> 
            </apex:actionSupport> 
 </apex:inputField>
<apex:inputField value="{!Call_Report__c.Tickers__c}" rendered="{!Call_Report__c.Topic__c='Issuer'}" id="tickerInput" />
<apex:inputField value="{!Call_Report__c.Sector__c}" rendered="{!Call_Report__c.Topic__c='Industry'}" id="sectorInput"/> 
<apex:inputField value="{!Call_Report__c.Security__c}" rendered="{!Call_Report__c.Topic__c='Specific Bond'}" id="bondInput" />

Am I doing something obviously wrong here? http://community.salesforce.com/t5/Visualforce-Development/Multi-select-picklist-not-firing-event-for-AJAX-refreshes/m-p/173572/highlight/false#M22119 seems to imply that what I am doing is reasonable...

4

2 に答える 2

2

のレベルのように、それよりも高いレベルで再レンダリングする必要があると確信しています<apex:outputPanel id="thePanel"> or an <apex:page id="thePage">

于 2010-05-03T22:06:00.623 に答える
0

同意します。コードをoutputPanelでラップし、それを再レンダリングしてみてください。

于 2010-05-05T09:35:46.527 に答える