Created
January 18, 2012 02:26
-
-
Save capeterson/1630454 to your computer and use it in GitHub Desktop.
apex:repeat indexes in visualforce pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:actionFunction name="removeItem" action="{!removeItem}" rerender="theForm"> | |
<apex:param name="rowIndex" value="" /> | |
</apex:actionFunction> | |
<apex:pageBlockTable var="index" value="{!memberIndexes}"> | |
<apex:column width="18"> | |
<apex:image value="{!URLFOR($Resource.RemoveItem)}" title="Remove Family Member" width="16" onClick="removeItem({!index});" /> | |
</apex:column> | |
<apex:repeat var="field" value="{!$ObjectType.Person__c.FieldSets.NewFamily}"> | |
<apex:column > | |
<apex:facet name="header">{!field.label}</apex:facet> | |
<apex:inputField value="{!members[index][field]}" required="false"/> | |
</apex:column> | |
</apex:repeat> | |
</apex:pageBlockTable> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment