You need to sign in to do that
Don't have an account?
ksmo
apex repeat
Hi,
Inside the <apex:repeat> I am having around 5 divs which get populated based on the number of times the apex repeat value has.So if there are 5 items the title,checkboxname,heckbox and preview button gets populated 5 times to the side of the item. But for the checkbox alone I want it to populate only once and not 5 times. How do I acheive this?
<div class="xContent">
<apex:repeat value="{!itemList}"
var="item">
<div class="xRow">
<div class="xRowRight">
<apex:outputPanel rendered="{!ifPDF != true}">
<div class="xRowName ">
{!benefit.cockpittitle}
<div class="xcheckboxname">
CHECKBOXNAME
</div> <br/>
</div>
</apex:outputpanel>
<div class="Xrowcategorypanel">
<div class="Xcheckboxpanel">
<input id="changecolor" type="checkbox" name="BRAND" onclick="Changecolor()" />
<div id="XpreviewButton" onclick="ShowPopup()">
PREVIEW <img class="cockpitImage"
src="{!URLFOR($Resource.BEN_IM, 'magnifying.png')}"/>
</div>
</div>
</div>
</div>
</div>
</div>
Inside the <apex:repeat> I am having around 5 divs which get populated based on the number of times the apex repeat value has.So if there are 5 items the title,checkboxname,heckbox and preview button gets populated 5 times to the side of the item. But for the checkbox alone I want it to populate only once and not 5 times. How do I acheive this?
<div class="xContent">
<apex:repeat value="{!itemList}"
var="item">
<div class="xRow">
<div class="xRowRight">
<apex:outputPanel rendered="{!ifPDF != true}">
<div class="xRowName ">
{!benefit.cockpittitle}
<div class="xcheckboxname">
CHECKBOXNAME
</div> <br/>
</div>
</apex:outputpanel>
<div class="Xrowcategorypanel">
<div class="Xcheckboxpanel">
<input id="changecolor" type="checkbox" name="BRAND" onclick="Changecolor()" />
<div id="XpreviewButton" onclick="ShowPopup()">
PREVIEW <img class="cockpitImage"
src="{!URLFOR($Resource.BEN_IM, 'magnifying.png')}"/>
</div>
</div>
</div>
</div>
</div>
</div>
It will depend on how your data is returned.
- Instead of returning a List<YOURTYPE> Return a Map<String,List<YOURTYPE>> With the name as the key.
Then in the VF page do something like this: Then it just becomes a matter of layout.Hope this helps.
Regards,
Nagendra