1
<apex:outputLink  rendered="{!IF((list1.size >0 ||list2.size >0) && (ischeck== true ), True, False)}"  >Hello</apex:outputLink>&nbsp;&nbsp;

Can anyone explain me why I am getting null what is the issue. Link is displaying in the frontend.

Thanks in advance for best answers.

2
  • 2
    add null checks for list1 & list2 and use size() instead of just size Oct 15, 2015 at 7:03
  • @VamsiKrishna Are you sure about using parenthesis on size()? It works fine without them, and adding them just seems to give an error: "Error: Unknown function list1.size. Check spelling."
    – martin
    Oct 15, 2015 at 7:23

1 Answer 1

0

One problem I see here is that you don't have a value property set on the outputlink. It should work for you if you add:

<apex:outputLink value="https://www.sample.com" ...
5
  • value="#01" is added..i forgt to mention it here
    – Gayathri
    Oct 15, 2015 at 8:12
  • ya its throwing error if I replace size to size() @ martin
    – Gayathri
    Oct 15, 2015 at 8:14
  • @Gayathri Is the id on the tag you are navigating to an <apex: tag? If so, the problem is likely that the id in the browser is different than in the Visualforce markup. You could try generating the id in the link with the $Component global variable. i.e. value="#{!$Component.theId}"
    – martin
    Oct 15, 2015 at 10:09
  • Hi martin...value="#01" means I have different pageblock so if I click on it Its going to that pageblock. my issue resolved...I did bulk upload so its working
    – Gayathri
    Oct 15, 2015 at 10:45
  • @Gayathri good to hear.
    – martin
    Oct 15, 2015 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .