function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bingi crm 7bingi crm 7 

this is the vf page . they are not showing the record why . i am write the soql query feach the records

User-added image
Nayana KNayana K
Can you please post VF page and controller code so that we can check further.
bingi crm 7bingi crm 7
public class Displayprods
{

 //This is where we have defined the Wrapper Class. 
    public class OpportunityLineItemwrapper
    {
      // all the line record instance create
        public OpportunityLineItem prd{get; set;}
        public Boolean selected {get; set;}
        public OpportunityLineItemwrapper(OpportunityLineItem a)
        {
            prd = a;
            selected = false;
        }
    }
 // This is the Wrapper Name for the object Opportunity Line Items
    List<OpportunityLineItemwrapper> OppList = new List<OpportunityLineItemwrapper>();
    List<OpportunityLineItem> selectedProducts = new List<OpportunityLineItem>();

 //Defines a Map to store all items selected based on the ID from the  ID from the URl.
    Map<Id,OpportunityLineItem> selectedProductsMap = new Map<Id,OpportunityLineItem>();
   

    public Displayprodsinopprtunity(ApexPages.StandardController controller) {

    }
        
    public List<OpportunityLineItemwrapper> getProducts() {
        ID str = ApexPages.currentPage().getParameters().get('ID');         
        OppList.clear();
        
        for(OpportunityLineItem a : [Select Id,Quantity,
ListPrice,PricebookEntry.Product2Id,TotalPrice
 PricebookEntry.Name From OpportunityLineItem
 where Opportunity.id=:str]){
            
            
            OpportunityLineItemwrapper opplineItem = new OpportunityLineItemwrapper(a);            
            if (selectedProductsMap.get(a.Id) != null)
                opplineItem.selected = true;

            OppList.add(opplineItem);        
        }
        return OppList;
    }
    
    public PageReference getSelected() {
        selectedProducts.clear();
        for(OpportunityLineItemwrapper accwrapper : OppList)
        if(accwrapper.selected == true) {
            selectedProducts.add(accwrapper.prd);
            selectedProductsMap.put(accwrapper.prd.id, accwrapper.prd);
        }
        return null;    
        
    }
    
    public List<OpportunityLineItem> GetSelectedProducts()  {
        if(selectedProducts.size()>0)
   return selectedProducts;
        else
   return null;
    }    

    public void updateQuantity() {
        List<Id> SelectedIds = new List<Id>();
       
        for(OpportunityLineItem litem: selectedProducts) {            
             OpportunityLineItem updateQuantity = new OpportunityLineItem (Id=litem.Id,Quantity=22); 
             Update updateQuantity ;            
        }      
    }
        }
 
bingi crm 7bingi crm 7
<apex:page standardController="Opportunity" extensions="Displayprod" Tabstyle="Opportunity" >
 <script>
 function checkAll(cb)
 {
  var inputElem = document.getElementsByTagName("input");
  for(var i=0; i<inputElem.length; i++)
  {
   if(inputElem[i].id.indexOf("checkedone")!=-1)
    inputElem[i].checked = cb.checked;
  }
 }    
 </script>
 <apex:form >
  <apex:pageBlock >
   <apex:pageBlockSection Title="List of Available Products" id="ListProd">
   <apex:dataTable value="{!Products}"  var="a" columnswidth="50px,50px" cellpadding="4" border="1">
    <apex:column >
     <apex:facet name="header">
      <apex:inputCheckbox >
       <apex:actionSupport event="onclick" action="{!GetSelected}" onsubmit="checkAll(this)" rerender="Selected_PBS"/>
      </apex:inputCheckbox>
     </apex:facet>
     <apex:inputCheckbox value="{!a.selected}" id="checkedone">
      <apex:actionSupport event="onclick" action="{!GetSelected}" rerender="Selected_PBS"/>
     </apex:inputCheckbox>
    </apex:column>
    <apex:column headervalue="Product Id" value="{!a.prd.Id}" />
    <apex:column headervalue="Product Name" value="{!a.prd.PricebookEntry.Product2Id}" />
    <apex:column headervalue="List Price" value="{!a.prd.ListPrice}" />
    <apex:column headervalue="Quantity" value="{!a.prd.Quantity}" />
   </apex:dataTable>
   </apex:pageBlockSection>
   <apex:pageBlockSection Title="Selected Products" id="Selected_PBS">
    <apex:dataTable value="{!SelectedProducts}" var="s" columnswidth="50px,50px" cellpadding="4" border="1">
     <apex:column headervalue="Product Id" value="{!s.Id}" />
     <apex:column headervalue="Name" value="{!s.PricebookEntry.Name}" />
     <apex:column headervalue="List Price" value="{!s.ListPrice}" />
     <apex:column headervalue="Quantity" value="{!s.Quantity}" />
    </apex:dataTable>
   </apex:pageBlockSection>
   <apex:commandButton action="{!updateQuantity}" ReRender="ListProd"  Value="Update Quantity"/>
   <apex:commandButton action="{!SendMail}" ReRender="ListProd"  Value="Send Mail"/>
  </apex:pageBlock>
 </apex:form>
</apex:page>
 
Nayana KNayana K
public class Displayprods
{

	//This is where we have defined the Wrapper Class. 
    public class OpportunityLineItemwrapper
    {
      // all the line record instance create
        public OpportunityLineItem prd{get; set;}
        public Boolean selected {get; set;}
        public OpportunityLineItemwrapper(OpportunityLineItem a)
        {
            prd = a;
            selected = false;
        }
    }
	
	// This is the Wrapper Name for the object Opportunity Line Items
    List<OpportunityLineItemwrapper> OppList = new List<OpportunityLineItemwrapper>();
    List<OpportunityLineItem> selectedProducts = new List<OpportunityLineItem>();

	//Defines a Map to store all items selected based on the ID from the  ID from the URl.
    Map<Id,OpportunityLineItem> selectedProductsMap = new Map<Id,OpportunityLineItem>();
   

    public Displayprods(ApexPages.StandardController controller) 
	{

    }
        
    public List<OpportunityLineItemwrapper> getProducts() 
	{
        ID str = ApexPages.currentPage().getParameters().get('Id');         
        OppList.clear();
        
        for(OpportunityLineItem a : [Select Id,Quantity,
											ListPrice,PricebookEntry.Product2Id,TotalPrice,
											PricebookEntry.Name 
									From OpportunityLineItem
									where Opportunity.id=:str])
		{
            
            
            OpportunityLineItemwrapper opplineItem = new OpportunityLineItemwrapper(a);            
            if (selectedProductsMap.get(a.Id) != null)
                opplineItem.selected = true;

            OppList.add(opplineItem);        
        }
        return OppList;
    }
    
    public PageReference getSelected() 
	{
        selectedProducts.clear();
        for(OpportunityLineItemwrapper accwrapper : OppList)
        if(accwrapper.selected == true) 
		{
            selectedProducts.add(accwrapper.prd);
            selectedProductsMap.put(accwrapper.prd.id, accwrapper.prd);
        }
        return null;    
        
    }
    
    public List<OpportunityLineItem> GetSelectedProducts()  
	{
        if(selectedProducts.size()>0)
		   return selectedProducts;
				else
		   return null;
    }    

    public void updateQuantity() 
	{
        List<Id> SelectedIds = new List<Id>();
       
        for(OpportunityLineItem litem: selectedProducts) 
		{            
             OpportunityLineItem updateQuantity = new OpportunityLineItem (Id=litem.Id,Quantity=22); 
             Update updateQuantity ;            
        }      
    }
}
 
<apex:page standardController="Opportunity" extensions="Displayprods" Tabstyle="Opportunity" >
	<script>
		function checkAll(cb)
		{
			var inputElem = document.getElementsByTagName("input");
			for(var i=0; i<inputElem.length; i++)
			{
				if(inputElem[i].id.indexOf("checkedone")!=-1)
				inputElem[i].checked = cb.checked;
			}
		}    
	</script>
	
	<apex:form>
		<apex:pageBlock >
			<apex:pageBlockSection Title="List of Available Products" id="ListProd">
				<apex:dataTable value="{!Products}"  var="a" columnswidth="50px,50px" cellpadding="4" border="1">
					<apex:column >
						<apex:facet name="header">
							<apex:inputCheckbox >
								<apex:actionSupport event="onclick" action="{!GetSelected}" onsubmit="checkAll(this)" rerender="Selected_PBS"/>
							</apex:inputCheckbox>
						</apex:facet>
						<apex:inputCheckbox value="{!a.selected}" id="checkedone">
							<apex:actionSupport event="onclick" action="{!GetSelected}" rerender="Selected_PBS"/>
						</apex:inputCheckbox>
					</apex:column>
					<apex:column headervalue="Product Id" value="{!a.prd.Id}" />
					<apex:column headervalue="Product Name" value="{!a.prd.PricebookEntry.Product2Id}" />
					<apex:column headervalue="List Price" value="{!a.prd.ListPrice}" />
					<apex:column headervalue="Quantity" value="{!a.prd.Quantity}" />
				</apex:dataTable>
			</apex:pageBlockSection>
			
			<apex:pageBlockSection Title="Selected Products" id="Selected_PBS">
				<apex:dataTable value="{!SelectedProducts}" var="s" columnswidth="50px,50px" cellpadding="4" border="1">
					<apex:column headervalue="Product Id" value="{!s.Id}" />
					<apex:column headervalue="Name" value="{!s.PricebookEntry.Name}" />
					<apex:column headervalue="List Price" value="{!s.ListPrice}" />
					<apex:column headervalue="Quantity" value="{!s.Quantity}" />
				</apex:dataTable>
			</apex:pageBlockSection>
			<apex:commandButton action="{!updateQuantity}" ReRender="ListProd"  Value="Update Quantity"/>
			<!--<apex:commandButton action="{!SendMail}" ReRender="ListProd"  Value="Send Mail"/>-->
		</apex:pageBlock>
	</apex:form>
</apex:page>


Display part is working properly for me.

1. I noticed here your using extension 'Displayprod' but class name was Displayprods.

2. sendEmail() method doesn't exist in Displayprods, so I commented out in VF page

3. public Displayprodsinopprtunity(ApexPages.StandardController controller) {

    }
constructor name is wrong!! It should be :

public Displayprods(ApexPages.StandardController controller) {

    }
bingi crm 7bingi crm 7
alredy i am modified this all. but record are not showing .  can you  observed the my screen shot first one
bingi crm 7bingi crm 7
1)  i have scenario product name , price , quantity , total  
           price and quantity =  total 
ex:-      100    *     2         =  200
2)   on that page create check box if you click the check box
any select the record those select record they display on downside

i am try to first  record dispaly if you check the check box they showing the record
but i am unable to showing record