Questions tagged [visualforce-component]

Visualforce components encapsulate a common design pattern and can be reused several times in one or more Visualforce pages. Salesforce provides a library of standard, pre-built components, such as <apex:relatedList> and <apex:dataTable>, that can be used to develop Visualforce pages. In addition, you can build your own custom components to augment this library.

Filter by
Sorted by
Tagged with
153
votes
3answers
24k views

End of javascript sidebar workarounds? (Salesforce Classic / Aloha)

Reading through this doc: Docs.releasenotes.salesforce We replaced the rich text editor in HTML Area home page components with a new version that supports more markup but doesn’t allow HTML to ...
18
votes
2answers
2k views

How to efficiently profile Visualforce components and their controllers?

I have a quite complex Visualforce component (edit grid) that is running to slow (2-4 seconds to display) When I say complex I mean: The Component itself is calling other components Many thousand ...
17
votes
4answers
6k views

render Blob image in PDF using Visualforce

Hi below is a snippet of a code where i am rerendering as pdf and have a blob image stored in a text field. When i display the blob image in VF page it displays fine, but when i display same image ...
16
votes
1answer
14k views

<apex:param> assignTo attribute not setting value to contoller variable

I am trying to assign value to a controller variable using assignTo attribute of apex:param component as shown below <apex:page controller="PageRefController"> <apex:form > <apeX:...
16
votes
0answers
1k views

Using apex class as attribute type for component - Summer '14 IDE issue

I have a component that gets an instance custom Apex Class as an attribute, ie: <apex:component controller="ComponentController"> <apex:attribute name="myAttr" assignTo="{!attr}" type="...
15
votes
4answers
3k views

Any Visualforce Data Grid plugins?

Any recommendations on grids that are richer than standard HTML tables?I need a data grid to list sObject rows and attribute columnd on a VF page under a Salesforce tab. The attributes are a mix of ...
15
votes
5answers
19k views

can we check if a key exists in a map in vf page

is it possible to check for a specific key in a map i.e., whether it exists or not in VISUALFORCE page? Based on this i need to render a pageblocktable.
15
votes
4answers
5k views

Passing a map to a custom component

I need to pass a set of key/value pairs to a custom component. The specification of the key/values needs to be done in an apex:page definition, so something like this (IMPORTANT: The following code ...
15
votes
3answers
6k views

apex:include vs. Visualforce component, when and why?

I recently had a reason to look more closely at the standard apex:include component in Visualforce, and I'm intrigued by the intent behind this component. Would anyone be willing to share some ...
14
votes
4answers
12k views

Setter method in VF component being called after the constructor has retured

VF page <apex:page> <c:MyCustomComponent someString="hello"/> </apex:page> MyCustomComponent (component) <apex:component controller="MyCustomComponentController"> <apex:...
14
votes
4answers
18k views

apex:inputFile can't be used in conjunction with an action component when deleting a row

When working on a visualforce page, I encountered this error: "apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a ...
13
votes
3answers
5k views

Reference inner class in Visualforce component

I'm trying to build a VF component that references an attribute that is an instance of an inner class. I followed the suggestion here on the Apex boards but it does not compile for me using V28.0. (...
12
votes
4answers
21k views

How do I pass a parameter from component to a Visualforce page?

Can I pass a email value from a visualforce component to a Visualforce page? I have used components for reusing Company's logo and few images... <apex:component> <apex:image value="{!$...
11
votes
3answers
7k views

How are request parameters sent via <apex:actionFunction> component

when we use apex:param inside an apex:actionFunction component as given below <apex:page controller="testCon"> <apex:outputText value="Clicked? {!state}" id="showstate" /> <apex:...
11
votes
2answers
2k views

Spring '13 VF Component Issue

Has anyone come up against the following issue. I have a VF Component that references a managed component as follows: <apex:component access="global" > <apex:attribute name="invoice" ...
11
votes
5answers
6k views

How to get complete list of records in List view

How do i get the complete list of records in a list view. I know using getRecords() we can get but its only limited to maximum of 20 records. But i need list of complete records for the List view. Is ...
11
votes
2answers
3k views

Funny behavior with components, javascript, and rerender

Has anyone else seen something like this? 1) Create a component that includes a javascript block (OK, the code is overkill, but pretend it's actually doing something): <apex:component layout="...
10
votes
3answers
1k views

Unable to rerender in visualforce Component

Getting trouble in Rerendering a form/output panel through VisualForce components. Visualforce component: <apex:component controller="Component_cls"> <apex:attribute name="first" type="...
10
votes
2answers
3k views

How to call a standard controller action of a VF page from a VF component

I have a visual force page as follows which includes a component call Example one, Component has a command button and I want to call the standard controller save action of VF page from the VF ...
10
votes
1answer
2k views

Can visualforce components from a managed package be used in a visualforce page?

Can we use managed package component inside Visualforce which is developed in org where we installed the package ?
10
votes
2answers
1k views

Custom Component's form tag has action=“[parent page]”

I have a custom component that includes a logout button (using a commandButton) which is used on several pages of a Force.com site. I have written a controller for this component which includes a ...
10
votes
2answers
6k views

apex:inputField on Lookup Values

I'm trying to build out a flexible, custom search engine as a component, but am stuck. I want to be able to specify filter fields in a comma delimited input attribute (strFilterFields in my code) and ...
10
votes
2answers
1k views

Adding visual force page to a custom object based on criteria

There is a custom object called Competitor. For this object there is a field called "Primary Competitor (Data type:Check Box)". Requirement:if primary competitor=checked-->then before saving it has ...
10
votes
2answers
505 views

Recreate the Salesforce Multi-Picklist Element

Short question: How can I recreate the SelectFitlerElement or dual_select using Visualforce elements and javascript? Long question: I am trying to improve a Visualforce page that allows you to ...
8
votes
2answers
8k views

reports embedded in visualforce not showing

I have a few reports embedded in visualforce page using iFrame. Due to this new release of Spring '14, iFrame has stopped working and now these visualforce pages show blank screens. Can anyone help me ...
8
votes
2answers
14k views

Standard DateTime Picker in Visualforce

Does anyone know whether there is a standard Time picker or datetime picker available in Visualforce framework? Visualforce Date picker is a powerful component that can be easily used with . But when ...
8
votes
1answer
7k views

<apex:pageBlockSectionItem> may have no more than 2 child components.

After doing some changes to the view by adding apex:pageblocksection and apex:pageblocksectionitem i am getting the error as given below. Am i doing anything wrong here? Any suggestions please. <...
8
votes
1answer
840 views

How do I go about updating Pat Patterson's Multiselect Picklist Visualforce Component for API > 26?

Pat Patterson's Multiselect Picklist component is exactly what I need for a page I am working on, and works great with API version 26. However, when I try to use it with a more current API version (...
8
votes
1answer
3k views

parameter not being passed in visualforce template

I've tried to schedule a recurring email but it seems the "salesRepID" parameter is not receiving the value from the "ToID" assignment because the proper records aren't being retrieved in the query at ...
8
votes
1answer
662 views

Visualforce dynamic custom components: Type.forname no longer works

I'm trying to use the method @DanielBlackhall gave in this question: Loading a custom component into a Visualforce page dynamically But unfortunately, this doesn't work anymore: Type t = Type....
8
votes
1answer
293 views

Unexpected Visualforce Order of Execution with component attributes on Get Request

I've hacked this small example of the unexpected order based on Order of Execution for Visualforce Page Get Requests. From the linked docs (my empahsis): The constructor methods on the ...
8
votes
1answer
6k views

Using a component to add attachments to visualforce email template and showing email link

We are trying to add attachments to an email template using a component. The code in the email template is: <messaging:emailTemplate subject="My Subject" recipientType="User" relatedToType="...
8
votes
3answers
1k views

Dymamic components execution order issue

I have the following VF Component which uses a dynamicComponent tag inside of it. <apex:component controller="myController"> <apex:attribute name="identity" type="String" ...
8
votes
1answer
466 views

Create a visual force Component with tags that require form to be used in page within form tags [duplicate]

I have run into a dilemma where I have a bunch of VF page markup and code that is to be used on Two different VF pages. I would like to put all of this code, javascript, etc into a component so it is ...
7
votes
1answer
3k views

Visualforce components within components

Fairly new to creating Visualforce components and I'm attempting to reuse some of my front-end mark up with multiple components that used in a parent component. At first I question if this was ...
7
votes
2answers
787 views

How to build better UI for native Salesforce.com desktop apps (no mobile)

Everybody is talking about Lightning and mobile but I saw not a single webinar and did not read a single word how Lightning and all those new, complex and not yet ready for production frameworks will ...
7
votes
1answer
302 views

FinancialForce component ? What are they ? how do they work?

I recently came across a custom financial force component <ffirule:IntegrationRule engine="{!engine}"/> which is very similar to custom visualforce components but don't they usually start with ...
7
votes
4answers
9k views

Rerender an apex:component

I have a component within an outputPanel like this: <apex:panelGrid columns="5" id="theDataGrid"> <c:GraphAndTable whichData="leadByRep" description="Description 1"/> &...
7
votes
3answers
11k views

Passing standard controller SObject to a component: problem with custom fields

I want to create a page like this with 2 components: <apex:page standardController="Campaign"> <c:import campaign="{!campaign}" /> <c:message campaign="{!campaign}" /...
7
votes
1answer
2k views

Conditionally Render Component In Visualforce Page

I would like to conditionally render a component in a VisualForce page based on a custom field. I was hoping to do something like this: <apex:page standardController="myObject__c"> <c:...
7
votes
2answers
1k views

Error for Dispatch Page on Salesforce1

I have a dispatch page on account.When i am crearting a "new record" meaning new button the dispatch page redirects to a different page depending on the record type selected. It is working fine on the ...
7
votes
1answer
5k views

Does the assignTo attribute of apex:attribute not work for ApexPages.Action or PageReference types?

How would you pass a PageReference attribute to a custom component and have it assign to a variable on the component's controller? It seems like the assignTo attribute of apex:attribute does not work ...
7
votes
3answers
3k views

Type mismatch for <apex:attribute assignTo>

I have some VF pages with a custom component that are working fine in my dev environment. However, when I try to deploy this to production, the deployment fails and each page that I am trying to ...
7
votes
1answer
2k views

How to avoid Enter functionality in VF page?

I have created one vf page for creating the opportunity from the Custom object. There one button called create opportunity will be available. If the user fill the form and Click the create opportunity ...
7
votes
1answer
213 views

Listing on the App Exchange and Component Exchange

I currently have a Lightning Component that I've developed, and will be submitting to the App Exchange for Components. I also have a Visualforce Page which wraps my component (see this link) so that ...
7
votes
1answer
3k views

Assigning VF component attribute to a List controller class variable

I have a VF page using a standard controller, a component, and a custom controller for the component. I am trying to pass a list of sObjects from the standard controller to the component's custom ...
7
votes
2answers
3k views

Custom picklist elements

I am trying to make a picklist to be able to select a field on an object and pass this field out of the component. I have created the following VF page to display this picklist however i am having ...
7
votes
2answers
573 views

Insert Task controller not executing from VF page

Having a little issue. Trying to insert a task using a custom controller, and I am not getting any kind of "error" when this executes. Everything else on the page seems to work but this. Any help ...
6
votes
2answers
3k views

AssignTo variable in attribute

I have a visualforce component as below: <apex:component controller="RecordDisplayController"> <apex:attribute name="objectName" description="An Sobject" type="Sobject" required="false" ...
6
votes
1answer
6k views

My Header and Footer overlaps with the content in a PDF Visualforce Page

I am trying to render my PDF page with a header and a footer, that are actually images, and a content, that expands in more than one page. The problems that I am facing are: The Header gets ...

1
2 3 4 5
21