All Projects → SalesforceFoundation → Visualforce Typeahead

SalesforceFoundation / Visualforce Typeahead

Licence: bsd-3-clause
A flexible typeahead component for use on Visualforce pages. Uses the typeahead.js library from Twitter.

Labels

Projects that are alternatives of or similar to Visualforce Typeahead

Forcedotcomsprintwall
An agile sprint wall built on the force.com platform with jQuery and Javascript Remoting
Stars: ✭ 42 (-42.47%)
Mutual labels:  apex
Wsdl2apex
Stars: ✭ 54 (-26.03%)
Mutual labels:  apex
Rflib
Salesforce open source library with logging framework, trigger framework, feature switches, and advanced monitoring capabilities
Stars: ✭ 69 (-5.48%)
Mutual labels:  apex
Gh Polls
Create a poll with gh-polls
Stars: ✭ 45 (-38.36%)
Mutual labels:  apex
Streams
Durable event pipelines.
Stars: ✭ 51 (-30.14%)
Mutual labels:  apex
Apex Domainbuilder
Framework to setup Apex test data in a highly flexible and readable way using the Test Data Builder pattern.
Stars: ✭ 61 (-16.44%)
Mutual labels:  apex
Forcedotcom Enterprise Architecture
Force.com Enterprise Architecture - First Edition - Source Code
Stars: ✭ 35 (-52.05%)
Mutual labels:  apex
Sfdc Convert Attachments To Chatter Files
📎 Easily migrate your Attachments to Salesforce Files.
Stars: ✭ 72 (-1.37%)
Mutual labels:  apex
Apex Legends Internal
Simple Apex Legends esp source
Stars: ✭ 53 (-27.4%)
Mutual labels:  apex
Apexunit
ApexUnit is a powerful continuous integration tool for the Force.com platform
Stars: ✭ 69 (-5.48%)
Mutual labels:  apex
Ridge
AWS Lambda HTTP Proxy integration event bridge to Go net/http.
Stars: ✭ 45 (-38.36%)
Mutual labels:  apex
Stripeforce
Stripe API Client Library for Force.com
Stars: ✭ 50 (-31.51%)
Mutual labels:  apex
Purealoe
Salesforce Sample App part of the sample gallery. Agriculture and retail use case. Get inspired and learn best practices.
Stars: ✭ 65 (-10.96%)
Mutual labels:  apex
Purealoe Lwc
Sample application for Lightning Web Components on Salesforce Platform. Part of the sample gallery. Agriculture and retail use case. Get inspired and learn best practices.
Stars: ✭ 43 (-41.1%)
Mutual labels:  apex
Cinnamon
Cinnamon is a Force.com app that enables you to build and run Selenium tests to validate custom UI pages with Visualforce/Javascript in your Salesforce org.
Stars: ✭ 70 (-4.11%)
Mutual labels:  apex
Data Ingestion Platform
Stars: ✭ 39 (-46.58%)
Mutual labels:  apex
Sobject Remote
JavaScript library to simplify CRUD DML operations with JavaScript Remoting on the force.com platform.
Stars: ✭ 57 (-21.92%)
Mutual labels:  apex
Connectapihelper
Helper class that makes it easier to post Chatter @-mentions, rich text, and inline images with Apex code.
Stars: ✭ 72 (-1.37%)
Mutual labels:  apex
Apex Dml Manager
Enforces CRUD/FLS in the least disruptive way possible
Stars: ✭ 70 (-4.11%)
Mutual labels:  apex
Lwc Recipes
A collection of easy-to-digest code examples for Lightning Web Components on Salesforce Platform
Stars: ✭ 1,147 (+1471.23%)
Mutual labels:  apex

visualforce-typeahead

A flexible typeahead component for use on Visualforce pages. Uses the typeahead.js library from Twitter.

Use this component to provide a lookup field for related objects, such as the account for a contact.

Typeahead Lookup Example Page

###Installation Click here to install: https://githubsfdeploy.herokuapp.com/?owner=SalesforceFoundation&repo=visualforce-typeahead

###Video Intro A 4-minute video showing the basic functionality: http://youtu.be/Cc87v39Z9tY

###Usage If you include the component on a Visualforce page in its simplest form, it will search Contacts:

<c:Typeahead />

For other objects, pass in the object parameter:

<c:Typeahead object="Account" /> 

For an example of the component in use, see the TypeaheadTest page.

###Component Attributes

There are many attributes you can pass to the component to change its behavior. For example, the following searches Accounts and puts the ID it finds into a hidden field you can access in your controller.

<h3>Account Name:</h3>
<c:Typeahead object="Account" destinationForSelectedId="accountId" />	
<apex:hidden id="accountId" value="{!accountId}" />		

This table lists the attributes:

Attribute Type Description Default
searchBoxId String Id attribute for the search input box. searchBox
styleClass String CSS class attribute to apply on the search input box.
style String CSS style attribute to apply on the search input box.
placeholder String Text to display as a placeholder in the search input box. Search
object String The type of record we are searching. Contact
objectIdField String The field that provides the object Id. Id
primaryField String The field that provides the primary display value. Name
secondaryField String A field to differentiate the display value. Appears in parens.
minSearchLength Integer How many characters you must type before searching. Must be 2 or more. 2
searchScope String Indicates which types of fields on the object to search. One of ALL, NAME, EMAIL, PHONE, SIDEBAR. ALL
filterClause String WHERE clause to filter records. Do not include WHERE.
orderBy String Name of field to sort records by. Name
recordLimit String Maximum number of records to return to the list. 2000
destinationForSelectedId String Id of a field, such as an apex:inputHidden, that should get Salesforce Id of the selected item.
destinationForSelectedValue String Id of a field, such as an apex:inputHidden, that should get the displayed name/value of the selected item.
stealFocus Boolean Whether to automatically move the focus to the search box when the component is displayed. true

###Possible Improvements

  • pass in a function to call when something is selected (so they don't have to click a button)
  • specify where to put errors (and then use an alert if not specified)
  • specify when to show secondary field (all the time or only when needed to make name unique)
  • attribute to pass in HTML suggestion template, or function to render the template
  • list of extra fields to query (especially if needed for suggestion template)
  • option to use SOQL instead of SOSL - less flexible but faster and possibly more reliable

###License This project is released for your page-designing pleasure by the Salesforce Foundation Business Applications Team under the open-source BSD license. Contributors to the project are welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].