+ Start a Discussion
ssssssss 

how to capture the value in dataTable using apex

Hi everyone,

 

in my application i was displaying the dataTable.but i want to capture the dataTable value using apex class.

 

plz help me.

my code is

 

VF page:

 

<apex:page standardController="CAF_Charge__c" extensions="popupwindow">
<apex:form >
<apex:dataTable value="{!DesCharge}" var="a" cellPadding="4" border="1"  >

<apex:column headervalue="Charge header information">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Charges_Head__c}"/>
{!a.Charges_Head__c}</apex:commandLink></apex:column>

<apex:column headervalue="Description of charge">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Description_Of_Charges__c}"/>
{!a.Description_Of_Charges__c}</apex:commandLink></apex:column>

<apex:column headervalue="Percentage">
<apex:commandLink action="{!filltextval1}">
<apex:param name="name1" value="{!a.Percentage__c}"/>
{!a.Percentage__c}</apex:commandLink></apex:column>

</apex:dataTable>

</apex:form>
</apex:page>

 

controller:

 

public class popupwindow
{

    public popupwindow(ApexPages.StandardController controller) {

    }
  
    Public string chargeshead{get;set;}
    Public string doc{get;set;}
    Public string percentage{get;set;}
      
    public List<chiranjeevi__CAF_Charge__c> getDesCharge()
    {
     List<chiranjeevi__CAF_Charge__c> descharge=[select chiranjeevi__Charges_Head__c,chiranjeevi__Description_Of_Charges__c,chiranjeevi__Percentage__c  from chiranjeevi__CAF_Charge__c  limit 10];
     return descharge;
    }

    Public void filltextval1()
    {
    chargeshead= apexpages.currentpage().getparameters().get('name1');
    }
   
   
}

 

plz help me with code.

 

Thanks,

manu..