0

I have a page which displays input fields from a fieldset on Opportunity object. The fieldset contains Country and State picklists which render properly. The only problem is when the Opportunity records have values in those fields, the Country picklist shows all the values but the State picklist shows only the value from a record. Other options are not displayed.

I had a doubt that this is something related to rendering. So I performed some action on the page which rerenders that part of the page, this brought all the State values in that picklist.

Below is the code snippet from Visualforce.

<apex:inputField value="{!section.oppRecord[rowvalue.fieldName.fieldPath]}"
        onchange="chngDynamicField();"
        rendered="{!rowvalue.isReadyOnly}"/>

'section' is a repeat variable which has oppRecord (instance of Opportunity)

'rowvalue' is again a repeat variable of a wrapper list and has fields stored in it.

All these variables' value is set in the constructor.

What can be the problem here?

  • Can you share your Visualforce code and the Apex methods that get the states and countries? – Dan Jones Mar 21 '17 at 14:30
  • State and Country picklist is the standard feature. I am using input fields which renders the picklists automatically. Will add markup in the question description. – ajinkyah Mar 21 '17 at 14:31
  • @DanJones Please check. – ajinkyah Mar 21 '17 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.