-
ChatterFeed
-
1Best Answers
-
1Likes Received
-
0Likes Given
-
6Questions
-
10Replies
Iterating over a List of Maps in VisualForce?
Is it possible to iterate over a List of Maps? In the simplest form, a Map<String,String>... I want to be able to do the following in a visual force page (simplified):
VisualForce Page
<apex:repeat value="{!customMap}" var="map">
{!map.name} : {!map.custom}
</apex:repeat>
Controller
public someController
{
public List<Map<String,String>> customMap = null;
public getCustomMap()
{
if (customMap == null)
{
customMap = new List<Map<String,String>>();
customMap.add(new Map<String,String>{
'name' => 'Apple',
'custom' => 'Pie'
});
customMap.add(new Map<String,String>{
'name' => 'Banana',
'custom' => 'Cake'
});
}
return customMap;
}
}
Would hopefully print something like...
Apple : Pie
Banana : Cake
This is obviously not working for me, any suggestions or is this not possible right now?
- sebipinn
- December 19, 2009
- Like
- 0
- Continue reading or reply
Adding checkmarks on StandardSetController list or apex:table in general
Is there a way to add a Checkmark to a column? I know that there are Boolean (Checkbox) fields and when these are set to TRUE, Salesforce usually shows them with a check mark. I have a page where after a method is processed, I want to indicate somehow that particular rows or records were affected, or were successful, or whatever you want.
I only started developing a couple months ago so I am unsure if I'm using the wrong terminology, but I hope someone understands what I am trying to accomplish.
Any immediate help is greatly appreciated.
Thank you
- sebipinn
- December 03, 2009
- Like
- 0
- Continue reading or reply
Overloading other methods
Is there a way to set up a parameter in a method to accept anyType? almost how when you use Double.valueOf(anyType) works. I want to do this to my own method where i can accept a string, an integer, or double and return a double after i do some transformations to it.
Is this possible?
- sebipinn
- November 30, 2009
- Like
- 1
- Continue reading or reply
Pass optional argument?
Don't have much experience with Java, but is there a way that I can specify optional parameters in my method?
An example in PHP would be...
function someFunction( $required, $optional = 'default_value' );
I'm assuming this can be done since with Batch Apex you can specify an optional scope between 0 - 200.
- sebipinn
- October 22, 2009
- Like
- 0
- Continue reading or reply
17.0 released for Eclipse IDE?
- sebipinn
- October 22, 2009
- Like
- 0
- Continue reading or reply
Pass Trigger Object as Argument
- sebipinn
- October 21, 2009
- Like
- 0
- Continue reading or reply
Overloading other methods
Is there a way to set up a parameter in a method to accept anyType? almost how when you use Double.valueOf(anyType) works. I want to do this to my own method where i can accept a string, an integer, or double and return a double after i do some transformations to it.
Is this possible?
- sebipinn
- November 30, 2009
- Like
- 1
- Continue reading or reply
Iterating over a List of Maps in VisualForce?
Is it possible to iterate over a List of Maps? In the simplest form, a Map<String,String>... I want to be able to do the following in a visual force page (simplified):
VisualForce Page
<apex:repeat value="{!customMap}" var="map">
{!map.name} : {!map.custom}
</apex:repeat>
Controller
public someController
{
public List<Map<String,String>> customMap = null;
public getCustomMap()
{
if (customMap == null)
{
customMap = new List<Map<String,String>>();
customMap.add(new Map<String,String>{
'name' => 'Apple',
'custom' => 'Pie'
});
customMap.add(new Map<String,String>{
'name' => 'Banana',
'custom' => 'Cake'
});
}
return customMap;
}
}
Would hopefully print something like...
Apple : Pie
Banana : Cake
This is obviously not working for me, any suggestions or is this not possible right now?
- sebipinn
- December 19, 2009
- Like
- 0
- Continue reading or reply
Overloading other methods
Is there a way to set up a parameter in a method to accept anyType? almost how when you use Double.valueOf(anyType) works. I want to do this to my own method where i can accept a string, an integer, or double and return a double after i do some transformations to it.
Is this possible?
- sebipinn
- November 30, 2009
- Like
- 1
- Continue reading or reply
Pass optional argument?
Don't have much experience with Java, but is there a way that I can specify optional parameters in my method?
An example in PHP would be...
function someFunction( $required, $optional = 'default_value' );
I'm assuming this can be done since with Batch Apex you can specify an optional scope between 0 - 200.
- sebipinn
- October 22, 2009
- Like
- 0
- Continue reading or reply
17.0 released for Eclipse IDE?
- sebipinn
- October 22, 2009
- Like
- 0
- Continue reading or reply
Pass Trigger Object as Argument
- sebipinn
- October 21, 2009
- Like
- 0
- Continue reading or reply
textmate Salesforce_com.tmbundle: will it be updated?
I'm using the textmate plugin for salesforce. Any chance the associated apexloader.app will be updated, or perhaps the source released?
The eclipse ide is just too fragile, so I'm developing using TextMate as editor with ant migration tool for uploading, but Salesforce_com.tmbundle is great for recompiling just one class or trigger at a time.
- Shikibu
- March 19, 2009
- Like
- 0
- Continue reading or reply