function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Newbie10Newbie10 

conditional rendering of apex:repeat element

I have an output panel inside my apex:repeat tag.

My requirement is to conditionally display it.

So for one element in apex:repeat this panel might be rendered ..for some not. Rendering condition is,i need to check whether line item occurs in another controller set variable.

I find it difficult because of following reasons;

1)I understand you cannot check whether a set variable contains this element on visualforce page .or is this possible

2) i can see you cannot pass arguments in your rendered attribute.else i could have specify a boolean value for rendered attribute and set the value based on lineitem passed from front end

3)as the set variable is totally unrelated to line item.i cannot simply specify as below

<apex:repeat value="{!Proposals}" var="item">
<apex:outputPanel rendered="{!item.LineCount > 0}">
<li>
<a href="{!$Page.aa_rg_jm_proposal}?id={!item.Proposal.ID}">{!item.Proposal.Name}</a>
<span class="ui-li-count">{!item.LineCount}</span>
</li>
</apex:outputPanel>
</apex:repeat>

 

PremanathPremanath

It is Poosible

 

Use Map in your class.

 

Take the Opportunity Line item is a Key

and List of your repeted items as a value... Like that you may achive...

You should work on this..in different ways...

 

 

prem