+ Start a Discussion
Ajay Dubedi 5Ajay Dubedi 5 

Issue Iterating Map on visualforce Page

<apex:page Controller="TestPage_ctrl">
  <apex:form >
        <apex:outputPanel id="outputPane">
             {!IntegerStringMap}
                           <apex:outputPanel id="outputPanelId">
                            <apex:repeat value="{!IntegerStringMap}" var="a">
                                {!a}
                            </apex:repeat>
                     </apex:outputPanel>
                     </apex:outputPanel>
                     <apex:commandButton value="Add" action="{!addLotToConvert}" reRender="outputPane"/>
        </apex:form>
</apex:page>
public class TestPage_ctrl{

    public integer i { get ; set ;}
    public map<integer,String> IntegerStringMap { get; set; }
    
    public TestPage_ctrl(){
        i = 0;
        IntegerStringMap = new map<integer,String>();
        IntegerStringMap.put(i,'Test'+i);
    }
    
    public void  addLotToConvert(){
        i = i+1;
        IntegerStringMap.put(i,'Test'+i);
        //return null;
    }
}

When trying to use the Above code in Developer org it works as expected showing the Map contents and the Map Key as same. But when using this code in CS10/CS11 it does not. And there is a difference between the Contents and the Key of map.

 
pconpcon
If you want the content of the map you need to do
 
{!IntegerStringMap[a]}
Carlos CubasCarlos Cubas
I am having your exact same issue.  This is happening on CS9 & CS10 and not happening in NA7 from what I have been able to test.  I have opened a case with salesforce to see whethere some recent change to the apex:repeat behavior is causing the problem.
pconpcon
I'm sorry, I misunderstood your issue.  Do you mind taking a screenshot of what the page looks like in a working environment and what it looks like in a broken environment.  I'm having trouble understanding what you are expecting to have.
Ajay Dubedi 5Ajay Dubedi 5
I guess Salesforce was playing some kind of Prank yesterday. The issue is resolved in both our Sandboxes without any Issue. And Production worked fine all the while. Salesforce Gets weird attimes. One Man-Day Loss :(
Satyendra RawatSatyendra Rawat
We were facing same problem in visualforce, it was salesforce updates problems, Now it working fine
Carlos CubasCarlos Cubas
Appears as if the issue has reappeared today again?  are you guys seeing this again?    I'm experiencing the problem again on cs9.  It was fixed for the most part yesterday
Ajay Dubedi 5Ajay Dubedi 5
There is this Issue again. Hope Salesforce Does Something to FIX this.
 
Ajay Dubedi 5Ajay Dubedi 5
Happening In Producion as well now. 
nishad basha 7nishad basha 7
Hi, Ajay Dubedi 5

 How to display the duplicate error Message once create a user using visualforce page?
Hi




Once a user is created with duplicate values, it should show a duplicate error message I want to display in page.