You need to sign in to do that
Don't have an account?
Ramakarry
Display Map elements on PageblockTable
Hai friends!
While displaying map values on a pageblock table every time i m getting below error...can any body help me how to understand this and fix?
Error:
Incorrect parameter type for subscript. Expected java.lang.Class, received DateTime
Error is in expression '{!eventmap[key]}' in component <apex:pageBlock> in page
My code is:
<apex:page controller="DisplaySectionsController11">
<apex:form >
<apex:repeat value="{!eventmap}" var="key">
<apex:pageBlock title="{!key}">
<apex:pageblocktable value="{!eventmap[key]}" var="a">
<apex:column value="{!a.Subject}"/>
<apex:column value="{!a.Startdatetime}"/>
<apex:column value="{!a.Enddatetime}"/>
</apex:pageBlock>
</apex:repeat>
<apex:commandButton value="ss" action="{!Query}"/>
</apex:form>
</apex:page>
While displaying map values on a pageblock table every time i m getting below error...can any body help me how to understand this and fix?
Error:
Incorrect parameter type for subscript. Expected java.lang.Class, received DateTime
Error is in expression '{!eventmap[key]}' in component <apex:pageBlock> in page
My code is:
<apex:page controller="DisplaySectionsController11">
<apex:form >
<apex:repeat value="{!eventmap}" var="key">
<apex:pageBlock title="{!key}">
<apex:pageblocktable value="{!eventmap[key]}" var="a">
<apex:column value="{!a.Subject}"/>
<apex:column value="{!a.Startdatetime}"/>
<apex:column value="{!a.Enddatetime}"/>
</apex:pageBlock>
</apex:repeat>
<apex:commandButton value="ss" action="{!Query}"/>
</apex:form>
</apex:page>
Seems fine to me except that the pageblocktable doesnt have an ending tag. Can you please share the controller class of this? thanks.
See this link-http://salesforce.stackexchange.com/questions/33772/unable-to-display-map-of-string-list-in-repeat
Thanks
Rupal Kumar
Mirketa Software Pvt Ltd
http://mirketa.com/index.html
{
Public Map<List<String>,List<Contact>> mapre {set;get;}
public List<Contact> cnts {set;get;}
public List<String> strngs {set;get;}
List<Contact> c1 {set;get;}
public void meth1()
{
cnts = [select firstname,lastname,Account.name,Account.industry from Contact];
strngs =new List<String>();
mapre = new Map<List<String>,List<Contact>>();
c1 = new List<Contact>();
for(Contact c: cnts)
{
strngs.add(c.FirstName);
c1.add(c);
}
mapre.put(strngs, c1);
}
}
Hi ,
Can anyone guide me how to diaplay mapre (map result using page block table)
How to dispaly Map<List<String>,List<Contact>> using pageblock table