Thursday, 19 December 2013

Searching In Google Search from Visua lforce page

Here in this example we just use "Search" custom object which can hold searchable things what we want to have in the vf page for searching we have sample tool bar with different links to navigate.

When we click on "Search Google" link in a particular row then it shows the search result of that record which we  displayed in vf page.

public with sharing class acccon2 {
    List<SearchObject__c> acc;
        public acccon2(ApexPages.StandardController controller) {

    public String accid{get; set;}
    public List<SearchObject__c> getlstaccounts()
    acc=[Select id,name, Search__c from SearchObject__c];
    return acc;
    public pagereference ref()
    pagereference ref= new pagereference('/'+accid);
    return ref;

<apex:page standardController="SearchObject__c" extensions="acccon2" showHeader="false" >

 <apex:toolbar >
 <apex:toolbarGroup itemSeparator="line" >
 <apex:outputLink value="" target="_blank" ><font color="white"  >AppsharkMail</font></apex:outputLink>
  <apex:outputLink value="" target="_blank"><font color="white">Gmail</font></apex:outputLink>
  <apex:outputLink value="" target="_blank"><font color="white">LinkedIn</font></apex:outputLink>
  <apex:outputLink value="" target="_blank"><font color="white">MypptSearch</font></apex:outputLink>
   <apex:outputLink value="" target="_blank"><font color="white">WikiDeveloperforce</font></apex:outputLink>
    <apex:outputLink value="" target="_blank"><font color="white">SalesForcelogin</font></apex:outputLink>

 <apex:form >
 <apex:pageBlock title="Search the following Things Here Itself" >
 <apex:pageBlockTable value="{!lstaccounts}" var="acc">

 <apex:column >
 <apex:commandLink value="{!}" action="{!ref}">
 <apex:param value="{!acc.Id}" name="accid" assignTo="{!accid}" />
 <apex:column HeaderValue="Clickon Search Google">
 <apex:outputLink value="" target="_blank">

        Search Google

        <apex:param name="q" value="{!}"/>



No comments:

Post a Comment

Create Dynamic Picklists for Your Custom Components (design:component)

Hi, We can expose a component property as a picklist when the component is configured in the Lightning App Builder. The picklist’s value...