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.

277 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17
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="...
5
votes
0answers
821 views

How to get apex:outputLink to work in Lightning Desktop correctly using target='parent'?

In Lightning Desktop we have come across an issue when using apex:outputLink that has a target of "_parent". The links will not work in Explorer or Firefox. The link works fine in Chrome. The ...
4
votes
1answer
135 views

How to use polyfill in visualforce component?

Link to polyfill: https://github.com/jonstipe/number-polyfill The polyfill is to allow increment decrement buttons in Internet explorer for I added the .js and .css file from the polyfill as a ...
4
votes
0answers
138 views

Dynamically injecting Visualforce markup into component

I have an issue where I am trying to render a component on a VF page where I don't know if the component exists in the org or not until run time (I am trying to use a dynamic component on the front ...
4
votes
0answers
295 views

Create default Apex:Attributes for custom visualforce component

I'm building multiple components that have the same attributes and html wrappers and so I was curious about ways to reuse some markup rather than redefining it on every custom component in this series....
3
votes
1answer
122 views

Visualforce Component wrapped in a Managed Package Visualforce Component throws the error: Unknown component c:mycomponent

I have a managed package installed in a subscriber org. The managed package contains a Visualforce Component that I want to use in subscriber org. My goal is to use a subscriber org VF component ...
3
votes
0answers
50 views

My hard-coded string is modified during Upload or Install process!

In my VisualForce page I've used one component three times. This component has an attribute called tableTitle which gets a string and shows it on my table. This table component is in a package (let's ...
3
votes
0answers
135 views

How to pass values between two apex:selectList asynchronously

I'm building a VF that's meant to query for Thing__c. The fields that are meant to be filtered are set in a fieldset. I'm iterating the fieldset rendering an apex:inputField for each and have an ...
3
votes
0answers
223 views

Why is an empty apex:attribute neither null nor blank but still an empty string?

Consider this simple component: <apex:component access="public" layout="none"> <apex:attribute name="myString" type="String" /> {!ISNULL(myString)} {!ISBLANK(myString)} {!...
3
votes
1answer
102 views

How do I create a dependent inner component?

I know standard Salesforce has component dependencies on certain components; I want to recreate that functionality. For example if I attempt to use <apex:commandButton> outside of a <apex:...
3
votes
0answers
60 views

Change values within the component, that are assigned to component attributes

I can't change controller variables (myNumber) within the component, that are assigned to apex:attributes. <apex:component controller="MyCtrl"> <apex:attribute name="number" type="...
3
votes
1answer
2k views

Hide iframe url

I am using a visualforce page and adding an apex tag: <apex:page standardController="account"> <apex:iframe src="a.com/embed/preview/f?theme=dark fullscreen" width="100%" height="800px" ...
3
votes
0answers
349 views

How can i hide approve/rejection link in approver history using visualforce area in home page component?

I am trying to hide approve/reject links using visualforce area but it is not happening below is the code and i have already included this page in home page component- <apex:page ...
3
votes
0answers
113 views

Visual force apex:vote component doesn't rerender the area

I've encountered with a bit strange behaviour related to apex:vote visual force component. According to the official documentation this component has 'rerender' attribute (as basically many others). ...
3
votes
0answers
5k views

How to invoke Action on Component Controller from VisualForce page

@Adrian Larson: I can not use Action="{!clearSelect}" thats because I already have method that get the Id that I have selected on VFP controller, unless is there a way to capture Id in the Component ...
3
votes
0answers
386 views

Form fields not binding inside apex repeat

I have a generic component that works for all objects. The object name is passed as a parameter to the component. I am iterating through a list to display a component for each object. Here is the code:...
3
votes
0answers
157 views

De-bulkifying Process Builder processes

First question to the Salesforce StackExchange; I apologize in advance for not adhering to any community rules. I'm trying to execute an Apex method through the anonymous execution via Developer ...
3
votes
0answers
242 views

passing html passthrough from apex to selectoptions

I'm trying to pass through some additional information via the html- passthrough on apex:selectoptions from the controller. Ie I need it to output: <apex:selectOption html-data-range="h" ...
3
votes
2answers
58 views

What would would be the best controller for a custom gateway page for a community?

I am trying to write a custom VForce page for a Community landing page so after users login they can see the main sections of the Community and click on the links and then go to the page layouts view. ...
3
votes
0answers
78 views

How to add a component visible on all pages and to send events from another component placed in column

I'm extremely new to Salesforce development and recently have spend hours reading different docs. It's not an excuse, it's just that feel to correct me whenever I use incorrect terminology or make ...
3
votes
0answers
328 views

inlineEdit Cancel button suppose to work this way?

So I am try this sample directly from the developer guide, and if you were do an inline edit of the last name field, for example, and want to revert back to the original data by hitting cancel it ...
3
votes
0answers
899 views

Sorting the Opportunity Line Item Products into Categories?

I am having an Invoice Layout and adding the Products as follows using the Visual Force page: Quantity, Product Code, Product Description, Unit Price ,Net Amount, VAT 1, S5KGC, 5Kg CO2 ...
3
votes
0answers
579 views

Trigger a native change event from within a Visualforce component

I am using the following Visualforce multi-select picklist component (thanks @metadaddy!) and extending it to handle an 'onchange' attribute: https://github.com/metadaddy-sfdc/Visualforce-Multiselect-...
3
votes
0answers
364 views

Reusable pageBlockSectionItem as custom component

For clarity and maintenance reasons, I'd like to abstract away a commonly-used pageBlockSectionItem pattern in my VF pages to a component like this: <apex:component > <apex:attribute name=...
3
votes
1answer
423 views

Accessing inputField Values Created Inside apex:repeat

I need help in getting values from VF component page, just for the sake of clarity I have added very few fields to make my point across. How to access inputField values that are created inside an ...
3
votes
1answer
1k views

Lightning styling of multi-picklist in visualforce page?

was wondering if anyone had any suggestions for how to do styling of a multi-picklist in a lightning manner within a visualforce page? <apex:repeat value="{!$ObjectType.Surgery__c.FieldSets[fixed]}...
2
votes
0answers
739 views

Failed to initialize Open CTI. Ensure that it is loaded from the right frame with correct URL parameters

I'm trying to use an existing web page that's using Open CTI to emulate Softphone screen popping and using Apex together with Lightning. I'm trying to do this by having it inside a Utiliy Bar ...
2
votes
0answers
88 views

Picklist in a VF Component

I'm looking to generalize some of my VF code by creating a component. I need to pass a picklist to my component from the VF page, i.e. <c.CustomComponent picklist="{!Opportunity.Picklist__c}">&...
2
votes
1answer
149 views

Call getContent() from Workflow Email Alert

I try to call the PageReference's getContent() method from a component that is nested in a visualforce email template. If the template is send via the test button, all looks great. However if I fire ...
2
votes
0answers
147 views

Apex:composition within a VF email template doesn't work

We're trying to use apex:composition in a Visualforce email template. This works fine if I simply do this: <messaging:emailTemplate subject="Template Example" recipientType="Contact"> <...
2
votes
0answers
671 views

Chatter in Apex using Lightning components

I'm fairly new to Lightning Design System.So need some guidance here. I'm trying to build Chatter in Apex using Lightning components. Using rest Api, I am getting the Chatter Feed of a group in my org ...
2
votes
0answers
39 views

Can I use a SelectList in a VisualForce email template?

I have a VisualForce email template which is used to send a list of products to customers. The products are listed in a table in the email and I would like the end column to be a picklist with options ...
2
votes
1answer
203 views

pageMessages not showing when commandButton disabled

I have the following VF page: <apex:page controller="Invoices"> <apex:form > <apex:pageBlock id="pageBlock1"> <apex:pageMessages id="messages" /> <apex:...
2
votes
0answers
63 views

analytics:reportChart not displayed when rerendered

I have a custom component, which contains analytics:reportChart. I need it to be displayed, when other component is loaded, but sometimes it isn't showed. Component Chart2 contains analytics:...
2
votes
0answers
91 views

enhancedList oncomplete not running from component

The "oncomplete" event on enhancedLists should fire when the list is loaded. This works as expected when the enhancedList is on a VF page but not on a VF component. Am I missing something or is this ...
2
votes
0answers
91 views

Live agent dismisslabel usage

I want to use a URL which redirect customer when support agent was not available on chat. I have used dimiss label to close the chat. Is there any way to redirect customer through URL or can we ...
2
votes
0answers
90 views

facing problem while parsing .csv file

I am parsing a .csv file with apex with below code. String hex = EncodingUtil.convertToHex(objFile); system.Debug('@@@hex '+ hex); final Integer bytesCount = hex.length() >> 1;...
2
votes
2answers
458 views

Dynamic table component that displays selected sObject's fields with specified header values

I have a problem with making a dynamic table component that displays selected sObject fields with specified header values. The very first idea was to supply the component with an apex:attrubite of ...
2
votes
2answers
391 views

Visualforce Side Panel

Can we do a side panel with tabs in Visualforce? I see apex:tabPanel tag that show tabs accross the top of the page, but what about adding the tabs on the left side of the page? Thanks
2
votes
1answer
87 views

geolocation when user logs in or logs out?

I am using the login flow which has been released as part of Winter'15 release. I would like to pass the geolocation of the logged in person (using javascript HTML5 Geolocation API) to visual flow as ...
2
votes
3answers
512 views

Save error : Null - VF Custom Component - Eclipse IDE

I'm using Eclipse Kepler and the Force.com IDE for Spring '15. I've created a custom component that I can't save in the IDE. This component defines a pageblocktable, which includes a column defined ...
2
votes
2answers
402 views

ActionFunction in ActionRegion in Component doesn't work

I'm extracting part of a Visualforce page into a component, however there's one piece of functionality that doesn't come across. Here's a simplified apex snippet: <apex:actionRegion> <...
2
votes
0answers
76 views

Why does this input fields conflict with each other?

I have two components that are conflicting with each other: component1: <apex:component > <apex:attribute name="cntact" description="A Contact for the component." type="Contact" ...
2
votes
0answers
915 views

Pass VF component attribute to component extension

Following is my code: VF PAGE: <apex:page standardController="account" extensions="ForecastHierarchyEditExtension" tabStyle="Account" sidebar="false" standardStylesheets="false"> ...
2
votes
0answers
59 views

Dependent picklists in components conflicting with each other

Imagine an object called Location that has a Country, State, and City dependent picklists. You select a Country then the States are populated, you select a state then the Cities are populated. Now ...
2
votes
3answers
6k views

passing data from Page controller to component Controller

I want to pass list of record from VF page controller to component controller but when i access variable in component controller using object creation then i am getting null value. I am taking Example ...
2
votes
0answers
472 views

“Unsupported type java.lang.Class” error when checking ApexPages.Action with ISNULL

I have a custom component which doesn't use a Custom Controller. On of the optional attribute is of Type ApexPages.Action. The component renders a command button only when this attribute was set. It ...
2
votes
0answers
1k views

Custom component inside apex:repeat doesnt update controller value

I've been splitting this problem up into its core and created the following - A custom component and its controller, a page and its controller only using User object so it should be easy to get it up ...
2
votes
0answers
150 views

Data dependent dropdown

Our Contacts object has a custom field called is_prospect__c (checkbox).  We've been asked to alter the behaviour of the New/Edit Task's standard page so that the Type dropdown shows a different list ...
2
votes
1answer
2k views

Process Builder giving error The flow failed to access the value for [example] because it hasn't been set or assigned

I have a process builder which is giving error: unable to find field dataType for complex reference. In server log :The flow failed to access the value for myVariable_current.Product2....

1
2 3 4 5 6