Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

30
votes
2answers
36k 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 ...
8
votes
4answers
27k 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 ...
7
votes
2answers
13k 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 ...
7
votes
2answers
21k 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:...
6
votes
1answer
1k 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 ...
5
votes
2answers
16k 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 ...
5
votes
1answer
5k 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
5k 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 ...
5
votes
1answer
418 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 /> </...
5
votes
1answer
1k 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 ...
4
votes
2answers
5k 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, ...
4
votes
1answer
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 ...
4
votes
1answer
71 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
2answers
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(...
3
votes
2answers
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" ...
3
votes
1answer
11k 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=...
3
votes
1answer
8k 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 ...
3
votes
2answers
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 ...
3
votes
2answers
3k 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 ...
3
votes
1answer
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 ...
3
votes
1answer
370 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....
3
votes
3answers
765 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 ...
3
votes
1answer
1k 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 ...
3
votes
1answer
150 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"/>...
3
votes
2answers
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}"/> <...
3
votes
1answer
723 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.
3
votes
1answer
701 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' ...
3
votes
1answer
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 ...
2
votes
1answer
10k 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 ...
2
votes
1answer
101 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 ...
2
votes
1answer
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 ...
2
votes
1answer
707 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="...
2
votes
1answer
350 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. ...
2
votes
2answers
387 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 ...
2
votes
2answers
1k 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:...
2
votes
1answer
90 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 ...
2
votes
1answer
95 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:...
2
votes
2answers
2k 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:...
2
votes
1answer
3k 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 ...
2
votes
0answers
125 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 ...
2
votes
1answer
224 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: ...
2
votes
0answers
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 ...
2
votes
0answers
566 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 ...
2
votes
2answers
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="...
1
vote
2answers
802 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 ...
1
vote
2answers
2k views

How to restrict a column to display value if value exists

I have a pageblocktable that is inside pageblocksection. The pageblocktable has many columns. I want 1 of the columns to appear only if it exist. Following is my code... <apex:...
1
vote
2answers
2k 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 ...
1
vote
2answers
545 views

Check List of List size in rendered

I have a List of List of account declared in controller like this: public List<List<Account>> listofListOfAccount {get; set;} Now I want to determine size of 1st list item in the List of ...
1
vote
1answer
1k views

Button Render depending on a boolean value

I have the following piece of code function toggleButton(box, id1, id2) { var elm1 = document.getElementById(id1); var elm2 = document.getElementById(id2); if(box.checked){ elm1.style.display = ""; ...
1
vote
1answer
383 views

Displaying fields based on picklist (apex:selectOption)

I've been spending a lot more time than I thought I would trying to get this to work. On my VisualForce page I have a pick list that depending on the value will display or hide additional fields. I ...