Questions tagged [repeat]

apex:repeat is a Visualforce iteration component that allows you to output the contents of a collection according to a structure that you specify. The collection can include up to 1,000 items.

Filter by
Sorted by
Tagged with
26
votes
2answers
5k views

Why can Visualforce iterate over >1000 item collection if it's a map?

As per Visualforce Limits: Maximum number of collection items that can be iterated in an iteration component such as <apex:pageBlockTable> and <apex:repeat> -- 1,000 So normally 1,...
11
votes
4answers
8k views

How to detect first or last iteration of apex:repeat

I currently have some VisualForce which uses an <apex:repeat/> element and inserts commas in between the items like so: <apex:variable var="idx" value="{!0}"/> <apex:repeat value="{!...
7
votes
2answers
5k views

How to add page breaks to visual force page rendered as pdf so that a dynamically rendered list in apex repeat tag does not strech the table lines

I have created a VF page rendered as pdf for QuoteLineItems in which I have added the list inside <apex:repeat> tags inside a html table row which again is inside another table.The problem ...
6
votes
1answer
7k views

visualforce IF syntax

So I need to use an inline if statement in my visualforce page to decide whether or not I need to render an outputText. However I keep hitting a syntax error so I am hoping someone here will catch my (...
6
votes
1answer
4k views

Unknown Property Error When Invoking object properties with in Apex:repeat

I have an apex component which displays a list of Albums and Images under each album. Here is the code for the component global class AttachmentModel { public ID Id; public DateTime CreatedDate; ...
5
votes
1answer
6k views

How to prevent rendering of a specific item in the <apex:repeat> loop?

I have the following code: <ul data-role="listview" data-filter="false"> <apex:repeat value="{!Proposals}" var="item"> <li> <a href="{!$Page....
5
votes
1answer
1k views

include component seems to be having issues with merge-field syntax inside of a repeat component

I am trying to place an apex:include inside of an apex:repeat component. But I am getting a compile error: <apex:repeat value="{!placeholders}" var="placeholder"> {!placeholder} - {!...
4
votes
1answer
2k views

How to iterate repetitive rows in table to calculate count and show the sum

I am new to vf tables and repeat tags. i am trying to create the below table in vf page could anyone please help me to achieve this by telling the way how i can do the below:- Object- Family Fields-...
4
votes
2answers
409 views

in apex:repeat, getter called twice in actionpoller rerender

I have a VF page with a handful of apex:repeat tags - each of which references a getter, which runs a soql query to retrieve data. I also have an actionpoller in the page to refresh it every 15 ...
4
votes
1answer
985 views

Visualforce list using Apex function and parameter

So at the moment I have a VisualForce Page that uses the following code: <apex:page standardController="Contact" extensions="RelationshipTreeController"> <apex:repeat value="{!...
4
votes
1answer
3k views

How to create tabs for an apex:tabPanel dynamically with apex:repeat and rerender?

I have an inputfield in my form which is a lookup. When I select a record from the list of lookup records (clicking the small magnifying glass) I am reading the id of that record and querying the ...
4
votes
1answer
75 views

Display the data if “quantity” is not = 0. Using multi map

<apex:repeat value="{!prod_quantity_1}" var="key"> <apex:repeat value="{!prod_quantity_1[key]}" var="innerKey"> <apex:repeat value="{!prod_quantity_1[key][innerKey]}" var="...
3
votes
1answer
647 views

Using jQuery to add numeric values in Apex:repeat

I have a row that displays numeric values from an apex:repeat. I'm looking for a way to loop through and add the values to display the total. I'm sure this can be done with jQuery and I feel like I'm ...
3
votes
2answers
23k views

Stop blank page being created (because of page break setting) at end of visualforce rendered as pdf

My visualforce rendered as pdf is creating a blank page at the end because of a page-break-after: always setting. How do I stop this blank page being created? I have 4 repeating sections, and after ...
3
votes
3answers
3k views

The input text <apex:inputtext> in a repeat (for loop) doesn't work with the validation required field

I have a custom object Team member contains four text fields First Name , Surname, location and job title and First Name and Surname is a required fields (When i create them i make them required). ...
3
votes
1answer
178 views

Variable binding issue with apex repeat

I'm a beginner to Visualforce - apologies if I've missed a thread that would answer this question but one has eluded me so far. This has been driving me out of my mind for a good week... I had a ...
3
votes
2answers
3k views

Passing counter variable (apex:repeat + apex:var) into apex:assignTo yields 'null'

I'm trying to build a Visualforce page which lists a set of records (via apex:repeat for a Visualforce 'record' Component), and where each record has a 'delete' button under it. Hitting delete should ...
3
votes
1answer
4k views

Select a row using checkbox wrapper class

I have a pageblock with 2 columns and a checkbox column in Apex:repeat. Im trying to select the whole by selecting the checkbox. when I select the checkbox, the value is not being captured. Yes im ...
3
votes
1answer
2k views

How to fetch data dynamically on each “Tab” click?

I have a scenario where in a VisualForce page, there are multiple tabs with some repeating values. On clicking each tab, data needs to be fetched dynamically. Currently I am implementing the tabs ...
3
votes
1answer
712 views

Pass different values as componentvalue to <apex:dynamiccomponent> in <apex:repeat>

<apex:repeat value="{!blocksThatAreComponents}" var="key"> <div id="{!key}"> <apex:dynamicComponent componentValue="{!PageComponentsMap[key]}" /> ...
3
votes
0answers
158 views

Table with independent rows

I need a table showing sObjects within independent rows. I need to perform actions on single rows without even taking care about all the other rows. Reason: Some rows might be invalid (having ...
3
votes
0answers
2k views

apex:repeat - select all check boxes

I have used <apex:repeat> tag to display records in table using paging. In which I have used <apex:selectCheckboxes> to select the checkbox for that particular record . What should I do to ...
2
votes
1answer
2k views

Group data and display on VF Page (use of rowspan)

I have 5 columns , out of which if data of 4 columns are repeating , the 5th column needs to be grouped. Name Designation Email Phone Module So if we have multiple modules assigned to a ...
2
votes
1answer
7k views

How to iterate over a list of objects in visualforce

I have a controller extension with the method GetAttributes that returns a list of Attribute objects, how can I iterate over them with apex:repeat? Controller Method: public List<...
2
votes
3answers
9k views

apex repeat on multiple list values with one common id

I have 2 lists list<Attachment> and list<Calls__C>. The relation is Attachment.parentid=CAlls__c.Account__C. Now I want single repeat that will traverse through these two lists in ...
2
votes
1answer
1k views

Highlight row on selected ( apex repeat )

I need to highlight the row on click of anchor link. <apex:repeat value="{!Requests}" var="request"> <tr> <td>&...
2
votes
2answers
772 views

Rowspan with apex repeat

I try to create a table with rowspan, but get a wrong table, could somebody help to resolve this? This is my UPD VF Page: <apex:page controller="FinancialProductsController" showHeader="false" ...
2
votes
1answer
616 views

Error when saving VisualForce email template “Error: Invalid Field”

I am following this SF VF email example. They have the relatedToType="Account" and their <apex:repeat var="cx" value="{!relatedTo.Cases}"> references Cases which should loop through the Cases ...
2
votes
3answers
2k views

repeat rendered for certain condition

I'm using visalforce page and apex class for rendering the table on the browser. I want to display 6 records per row. I have total 4 rows & 5 columns. How I can use the repeat function to limit 6 ...
2
votes
1answer
861 views

Map key null not found in map for properly built map

I have a controller that builds a map from CaseNumbers to arrays of booleans, which decide how to render a column on a table: public Map<String, Boolean[]> caseMap { get; set; } After setting ...
2
votes
1answer
49 views

Add dynamic value inside brackets of value

Can I add dynamic value with repeat inside the two {} brackets of value, example below will explain clearly <apex:repeat value="{!fieldsAPINamesList}" var="fieldName"> <!-- I NEED THIS {!...
2
votes
2answers
2k views

SOLVED: Rerendering item in a parallel repeat tag

I'm refactoring a page (advanced clone tool with grnadchild records) to be more dynamic and extensible, but some of my rerendering refuses to work under the new DOM model. You can see in the page ...
2
votes
1answer
2k views

apex:outputPanel condition for apex:repeat won't render table properly

I'm working on creating PDF Purchase order page in VisaulForce. I get stuck when rendering Purchase order line items, which are related items to Purchase order. All worked great until I put a ...
2
votes
1answer
1k views

apex param in apex repeat (pass parameter to controller in repeat) not working

I have an apex:repeat and I want to use and apex:param in it. The repeater shows the userName of the person who liked the feed (like.user.Name). And if this userName is same as the person who has ...
2
votes
1answer
125 views

How can I have an iterative component in apex:repeat (like a counter)?

I have an apex:repeat component. In the repeating text output, I want a number to increment row to row. I will go ahead and call out that I realize I could achieve this by replacing my controller ...
2
votes
1answer
982 views

Is is possible to loop over records in a repeat component using javascript/jquery?

Lets say I have a table of records and a button to update multiple records in the table on a visualforce page. I want to check the values of each record in the repeat block, and grab each records Id ...
2
votes
1answer
1k views

apex:repeat styling does not work with renderAs PDF

I am creating custom quote PDF and trying to apply alternating colours for the Product Line table and here is the code that I am using: This below code, does not show alternating colours. <apex:...
2
votes
1answer
3k views

How to select one radio button from each radio group in visualforce page?

i am trying to select only one radio button from a table which has been built by <apex:repeat control. Now the issue is, user can select all of the radio buttons in a logical group of radio buttons....
2
votes
1answer
78 views

Visualforce: Checkboxes selected in field set do not save to record

I'm an Apex and Visualforce beginner with not much overall programming experience to boot. I've been tasked with updating a VF page that needs to display a series of checkboxes defined in a field set....
2
votes
2answers
3k views

Apex Repeat inside PageBlockTable Headers aren't Displayed

I have a map of String(key) and Wrapper object(value) called TableView. The TableView has public property of list of a wrapper class object called DataViewRow. The DataView wrapper class has a map of ...
2
votes
2answers
464 views

Dynamic table component that displays selected sObject's fields with specified header values

I have a problem with making a dynamic table component that displays selected sObject fields with specified header values. The very first idea was to supply the component with an apex:attrubite of ...
2
votes
0answers
538 views

apex:inputCheckboxes not retaining state inside apex:repeat

If the checkboxes are re-rendered, you can see that your input has been ignored. Whether re-rendered or not, the controller is unaware of your input upon form submission (it throws the exception that ...
2
votes
1answer
722 views

Rerender is not triggered within <apex:repeat> block

I have a scenario where there are repeating Tabs. Within each tab, there are multiple drop-down lists (say DL1, DL2, DL3). DL2 is dynamically generated based on the value selected from DL1. And DL3 is ...
2
votes
2answers
605 views

Formatting Date in Visualforce - Complex version

I have this code <font face="Arial">Invoice Date: <apex:repeat value="{!Opportunity.Invoices__r}" var="line2"> {!line2.Invoice_Date__c} </apex:repeat> </font> which ...
1
vote
1answer
12k views

<tr> and <td> tags within <apex:repeat> rendering above the table?

I am making a table that has within it to fill it with rows and fill the cells with information. I cannot use a pageBlockTable as I am using many sets of information that all need to go into the ...
1
vote
2answers
3k views

Using nested apex:repeat and pageBlockTable in a page

Well, I couldn't find a way to explain in a simple way my issue (thus the poor title). I am trying to build a page in which I have to separate some records using two fields on it. One of them is a ...
1
vote
2answers
4k views

Wrapper Class in a Map

I have a wrapper class inside of a map that I want to display on a VFP. The output value of the map is: {2017-07-13 16:28:02=CaseInfo:[caseNumber=00033490, taskData=Task:{WhatId=500S0000008l5A3IAI, ...
1
vote
1answer
1k views

Add logic in VisualForce Page within apex repeat

Is it possible to put logic within apex:repeat in VisualForce page? I have code as shown below but instead of executing logic of array split and then displaying table contents, visual force page is ...
1
vote
1answer
34 views

VF Error: When accessing certain properties of a field set

I have a VF page in which I have an <apex:repeat> tag: <apex:repeat value="{!seHandoffFields}" var="field"> <apex:pageBlockSectionItem helpText="{!$ObjectType....
1
vote
2answers
1k views

how to default select a value - html select inside <apex:repeat>

After record creation, if the record is edited I want to auto-populate picklist value which is dynamic and I have a value which am passing it in apex:repeat <select Class="slds-input form-control"&...