• divya sri 27
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
option to open detail page of the records returned in search.

this is my vf page
<apex:page showChat="false" sidebar="false" controller="book4">
<apex:form >
  <apex:pageblock >
   <apex:pageblockButtons location="top" >
          <apex:commandButton value="search" action="{!search}"/>
          </apex:pageblockButtons>
         <apex:pageBlockSection title="book">
         <apex:inputText value="{!N1}"/>
         <apex:pageBlockTable var="a" value="{!Bk1}">
          <apex:column value="{!a.name}"/ >
          
          </apex:pageBlockTable>
          </apex:pageBlockSection>
      </apex:pageblock>
   </apex:form>
  </apex:page>


and this is my controller


public with sharing class book4 {

    public  list<Book__c> Bk1 { get; set; }
 public String N1 {get;set;}
 
  public book4() {
  
  Bk1 = new list<Book__c>();
  }
  
  public void search(){
  
    
     Bk1 = [select Name from Book__c where Name LIKE:('%'+N1+'%')];
    
    
    }

}
option to open detail page of the records returned in search.

this is my vf page
<apex:page showChat="false" sidebar="false" controller="book4">
<apex:form >
  <apex:pageblock >
   <apex:pageblockButtons location="top" >
          <apex:commandButton value="search" action="{!search}"/>
          </apex:pageblockButtons>
         <apex:pageBlockSection title="book">
         <apex:inputText value="{!N1}"/>
         <apex:pageBlockTable var="a" value="{!Bk1}">
          <apex:column value="{!a.name}"/ >
          
          </apex:pageBlockTable>
          </apex:pageBlockSection>
      </apex:pageblock>
   </apex:form>
  </apex:page>


and this is my controller


public with sharing class book4 {

    public  list<Book__c> Bk1 { get; set; }
 public String N1 {get;set;}
 
  public book4() {
  
  Bk1 = new list<Book__c>();
  }
  
  public void search(){
  
    
     Bk1 = [select Name from Book__c where Name LIKE:('%'+N1+'%')];
    
    
    }

}