Questions tagged [rendered]

rendered is an attribute in Visualforce Components used to determine whether the Component should be visible in Visualforce Page or not by passing true or false.

Filter by
Sorted by
Tagged with
34 votes
2 answers
48k views

Is it possible to test list size from a VisualForce page?

Consider a simple example of a VF page that shows an account, with a pageBlockTable to display contacts on the account. But if there are no contacts for the accounts, instead of an empty table we ...
Jason Clark's user avatar
  • 11.9k
8 votes
4 answers
32k views

Rendering Output Panel if List is not null

I want to render an outputpanel if list is not null. <apex:outputPanel id="opformofauth" style="width:100%" rendered="{!lstPersonWrapper != null}"> .... </apex:outputpanel> This is not ...
test's user avatar
  • 153
7 votes
2 answers
14k views

Rendering section if checkbox is unchecked

Is it possible to render a section if checkbox is unchecked. I tried this. <apex:pageBlockSection columns="1" id="Test" > <apex:inputcheckbox value="{!test.Same_Address__c}" label="Same ...
ApexUser1's user avatar
7 votes
2 answers
22k views

Multiple conditions on rendered attribute

I need to display text based on record type & has teammember.But it displays both messages regardless of record type.Below is the part of my visualforce page. <apex:outputLabel style="color:...
sfdc's user avatar
  • 13.7k
6 votes
1 answer
2k views

Visualforce rendered with jQuery

Another problem has come uppon me. I have a button which shows a form with a list of inputFields with a map as a value. Since I have to populate the Keys before I show the form, I was giving me an ...
Rui Rocha's user avatar
  • 759
5 votes
2 answers
17k views

Using an inline IF statement to format a field value in VisualForce page

I'm trying to do some conditional formatting for the Opportunity Amount field on a VisualForce page that just displays the currently set amount. There is a chance that the amount can be negative (due ...
Zigrivers's user avatar
  • 349
5 votes
1 answer
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....
AngryHacker's user avatar
  • 1,481
5 votes
1 answer
9k views

Adding a border to a visualforce page rendered as a PDF

I am trying to make a visualforce page with a border that renders as a PDF. Currently, there are 2 sets of tables within the visualforce page, both of which can have variable sizes depending on the ...
Katie Swol's user avatar
5 votes
1 answer
1k views

inlineEditSupport not working for components which are not rendered when page is loaded

I have a page with fields sorted out in a couple of pageBlocks. Some blocks start off hiden (rendered=false) and are only rendered if the user click some button. The fields use inlineEditSupport with ...
Dedo's user avatar
  • 5,007
5 votes
1 answer
445 views

I want to render one page block section on the page to certain user only.

I want to render one page block section on the page to certain user only. <apex:pageBlockSectionItem rendered="{!$User.Name == opp.Security_Officer_Name__c}"> <apex:inputfield /> </...
Ricky's user avatar
  • 873
5 votes
1 answer
2k views

reRender checkboxes problem

I have a menu (screen below) where the two section are refreshed using rerender. Depending to main object the sections are refreshed. The input checkboxes checked for the 1st main object are deleted ...
Amine Darkaoui's user avatar
4 votes
1 answer
16k views

Adding multiple conditions in rendered argument

I have a link that I want to display when Category = 'data1' AND Custom URL = 'data2'. I know how to do this with only one condition, how can I do this with two conditions? <apex:outputLink value=...
Deployment Failure's user avatar
4 votes
1 answer
9k views

Conditional Rendering inside Visualforce pages

I have an overwritten edit page for my custom object, which have different record types with different fields. The simplified desktop version of this VF page looks like this: <apex:page ...
David Renz's user avatar
4 votes
2 answers
6k views

Custom Buttons conditional display

Is there a way to conditionally control the display of custom buttons? To be more precise, let's say I have a button which should be visible only if Field1==X. If the button is added to a page layout, ...
dino ursic's user avatar
  • 2,333
4 votes
1 answer
84 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="...
Lennon Leopoldo's user avatar
3 votes
3 answers
2k views

How should I check whether the map is empty or not in Visualforce page (API version 38.0)

I am displaying some records in table format on my Visualforce Page. I want to check if a Map instance is empty before displaying it. I have tried with: .Size() and also with: rendered="{!If(NOT(...
veera's user avatar
  • 31
3 votes
2 answers
3k views

Passing multiple methods into Apex 'rendered' attribute

Can I pass a second method into the rendered attribute of the following apex element? <apex:outputText rendered="{!(firstMethod == true)}"> <img class="refresh_btn" ...
Daft's user avatar
  • 2,661
3 votes
2 answers
2k views

Call an Apex method from a render check

Is it possible to call an Apex method (not a getter) from a render check? I have tried multiple ways but get errors such as "Unknown method: readOnlyField()". I've included a stripped down version of ...
UserIsStuck's user avatar
3 votes
2 answers
5k views

Rerender pageblock on change of picklist

I am working with with picklist. Here I have to show a pageblocksection on change picklist but when I change the picklist it rerenders all the page and I am able to see pageblocksection but my ...
SFDC 44's user avatar
  • 664
3 votes
1 answer
3k views

Change color theme of visualforce page

Good evening everyone. I would like to know if it is possible to change a visualforce page color the same way we choose a color for each object. At the moment, I have this VF page that can be either ...
Rui Rocha's user avatar
  • 759
3 votes
1 answer
779 views

Complement result from function in rendered attribute

So in my rendered attribute I am calling a getter method that returns a boolean. However I want to set rendered to the opposite of what it returns because it is used to render one component or another....
Louis Pujol's user avatar
  • 1,235
3 votes
3 answers
1k views

Need to hide the column in my pdf?

I have taken a vf page and i that i have to show the related list i have used the below code in my vf page to show this related list in my pdf. ! i got but action column is there also i want to hide ...
venkatesh's user avatar
  • 101
3 votes
1 answer
2k views

Visibility of pageblocksection on visualforce page based on profile and status of record

I need to control the visibility of multiple pageblocksections based on user's profile and status of the record.Currently I am using rendered attribute on pageblocksection and adding conditions like ...
sfdc's user avatar
  • 13.7k
3 votes
1 answer
185 views

Is it possible to prevent unused Visualforce Components from using View State?

Components appear to use View State even if they are not rendered. i.e. there is almost no difference in the View State size between the following two options: <c:my_component rendered="true"/>...
Ben Kass's user avatar
3 votes
2 answers
2k views

Render pageBlockSection based on RecordType

I am trying to build a custom New Case page, but am having issues getting sections to load based on the Record Type. <apex:outputField label="Record Type: " value="{!Case.RecordTypeId}"/> <...
AaronC's user avatar
  • 121
3 votes
1 answer
2k views

Password protected Visualforce Page rendered as PDF

Is it possible that a Visualforce page rendered as pdf can be password protected? I am using Messaging.SingleEmailMessage to send mail with attachment, but I need the attachment password protected.
NullReferenceException's user avatar
3 votes
1 answer
764 views

showOnEdit within commandButton not working when PageBlock section starts with rendered=false

On my visualforce page I have a pageblocksection that starts off hidden, this pageblock is shown when the user selects a value from a picklist. This feature works, but breaks the 'showOnEdit' ...
Will.T's user avatar
  • 85
3 votes
1 answer
2k views

give function to rendered attribute

I have a visualforce page that uses various components to try to print data from a list of custom objects. The idea is that it will display a list of types of relationships and then if clicked it will ...
Louis Pujol's user avatar
  • 1,235
2 votes
1 answer
13k views

rendered= expressions and use of the ! operator

I have an apex element which relies on the output of two Boolean methods to be rendered. At the moment, both methods are evaluating to true, yet the apex element is not rendering. If I reverse one of ...
Daft's user avatar
  • 2,661
2 votes
2 answers
11k views

Conditional Rendering in Lightning Component with more than Aura:If(True, ELSE)

I have a lightning:select picklist on a Lightning component called "Best Method of Contact" which is a required picklist, but the required picklist defaults to a blank 'placeholder' value that the ...
Morgan Marchese's user avatar
2 votes
1 answer
185 views

Rendered Tags not Working on Sequential Visualforce Pages (Force.com Site)

If a user checks a checkbox to TRUE on page one of a force.com site, then on the next page the true section should render. This works as desired, however, if the user then goes back and checks FALSE ...
Steel Reserve 211's user avatar
2 votes
1 answer
3k views

How does rendered/rerender work in Visualforce

This is not about walking out a particular scenario. It's all about my curiosity. I am just wondering how does rendered/rerender work behind the scene. My first understanding was it stores the related ...
Lance Shi's user avatar
  • 13k
2 votes
1 answer
742 views

How to use OR operator in rendered in Visualforce in this example?

I want to show fields only for Profiles 'Legal' or 'System Administrator'. How can I change this code so that it work properly? I have this code (syntax error): <apex:pageBlockSection id="...
NickName43's user avatar
2 votes
1 answer
4k views

Visualforce format an output number depending on decimal value, if decimal is zero then just display the number

I am trying to display multiple values in a page which are currency fields set with 2 decimals (in the object). Currently I am using the below expresion to format the values which works great: <...
manza's user avatar
  • 1,953
2 votes
1 answer
1k views

Rendering Hyperlink in VF page

In a page block table based on a condition, I want to render some values as hyperlink and other as plain text. I am able to achieve the above requirement as below: <apex:column headerValue="...
C0DEPirate's user avatar
  • 1,598
2 votes
1 answer
4k views

Usage of rendered={!! Value} in output panel component

I'm trying to understand this code, which was written in a custom component for VF page. I didn't understand the usage of rendered attribute in output panel with "{!!" . Usually we use only one ...
Krishna N's user avatar
2 votes
1 answer
1k views

Will the PDF rendered VF page can have buttons where user can click

I have designed a solution to generate a document for each record with the values from the record by having button that will generate a PDF form of the record with selected fields and there values. ...
Samuel Robert's user avatar
2 votes
2 answers
471 views

How can I get my VisualForce Dashboards to Display Properly?

Looking through the VisualForce Developer's Guider, there is information on how to create a dashboard with VisualForce. I have no problem adding a VisualForce component or selecting the VF Page as ...
Brian Kessler's user avatar
2 votes
1 answer
987 views

Using Render With Repeat in Plain Text Email

I have a VF page set up as an email template. I have a repeat tag on the HTML part of my template that pulls in Cases based upon some criteria contained in an OutputPanel. I am trying to accomplish ...
J. Neilan's user avatar
  • 1,243
2 votes
2 answers
3k views

common.apex.runtime.impl.ExecutionException: SObject row was retrieved via SOQL without querying the requested field: Contact.bp_Billing_Address_1__c

I am trying to display a value from list which is created from multi-joined SOQL and though the field is part of SOQL statement, I still get the error: common.apex.runtime.impl.ExecutionException:...
iUnknown's user avatar
2 votes
1 answer
121 views

Currency field and rendered attribute do NOT seem to work together at all

I've just spent the better part of my day trying to sort this out. Seems that if i have a Currency type in my custom object (mortgages__c), there is no way to get the Page to gather input and reflect ...
Cindy's user avatar
  • 153
2 votes
1 answer
149 views

Using rendered="" parameter causes checkbox to evaluate to null

Putting checkbox inside outputpanel or using rendered on itself, will display correctly, but will cause null de-reference when its used in the class. What is the reason behind? This works: <apex:...
dzh's user avatar
  • 4,106
2 votes
2 answers
3k views

Hide and show pageblock section

i created a visualforce page.here is small snippet from that <apex:form id="form"> <apex:outputPanel id="flowPanel"> <apex:pageBlock title="Dynamic Flow" id="pageblock" > <apex:...
mathlearner's user avatar
  • 2,151
2 votes
1 answer
4k views

REndering Pageblock table based on condition

Rendering Page Block table based on condition I have 2 pageblocktables. Pageblocktable1 renders if List contains value. Pageblocktable2 renders if List doent contains value. trying out this None of ...
TestNS's user avatar
  • 1,037
2 votes
0 answers
267 views

Visualforce conditional rendering formula not evaluating to True

It seems like my rendered If statement is not evaluating as expected (at least my expectations). Basically, I have 2 Id fields pulled from apex, and if they equal each other, it conditionally displays ...
PrawnCrackers's user avatar
2 votes
1 answer
330 views

Page displays apex scripts while using render="true" in <apex:page message> visualforce page?reasons?

When I am trying to display page message in vf page I am getting the following issue and that is because of using rendered="true" Page getting displayed with following code: visualforce page code: ...
Pril's user avatar
  • 31
2 votes
0 answers
28 views

Render based on TemplateId [duplicate]

I have a requirement to show an apex page message "XX YY" if the selected template id to email is "Update Status". (This message needs to be displayed when they make the selection not when they click ...
Testing_SFDC's user avatar
  • 2,940
2 votes
0 answers
762 views

Rendered not working translated picklist value radio buttons

Im trying to translate visualforce page. I have used custom labels to built the page. the page is translated good. For picklist values I used the below code, the picklist values are also translated ...
sfdcFanBoy's user avatar
  • 4,064
2 votes
2 answers
1k views

Render columns in page block table based on method

I have a pageblock table with 2 columns.. Interests(custom field) and another column - just a static text that will be rendered based on some condition from a method. <apex:pageBlockTable value="...
sfdcFanBoy's user avatar
  • 4,064
1 vote
2 answers
2k views

Conditional rendering of a VF Page

Is it possible to render a VF page based on two booleans? Can you have something like: <apex:page rendered="{!relatedTo.boolean1 == true}&&{!relatedTo.boolean2 == true}"> Or should I ...
denisoleary's user avatar