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
prasad1.3969574005596787E12prasad1.3969574005596787E12 

How to use actionsupport for displaying data from an object

Hi All,

I am trying to insert data to objects. And that data to displayed below the insertion block............!
Sonam_SFDCSonam_SFDC
Hi Prasad,

Actionsupport is used when you wish to refresh any component depending on the action performed : http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm

If you wish to display the data depending on a particular event occurs, such as a button click or mouseover - you can check the sample code on the link above to display data from an object record
MagulanDuraipandianMagulanDuraipandian
Using reRender in actionSupport, just use the id of the component which displays the record.

If this solves your problem, kindly mark it as the best answer.

Regards,
Magulan
http://www.infallibletechie.com
prasad1.3969574005596787E12prasad1.3969574005596787E12
This code is error free but output is displaying nothing..........!

page:

<apex:page controller="tableview" docType="html-5.0">
    <apex:form >
   <apex:pageBlock id="out" title="Read View">          
        <apex:pageBlockSection >
         <apex:repeat value="{!testMethod}" var="buclvl">
            <apex:outputField value="{!buclvl.lowdays__c}"/><br/>
            <apex:outputField value="{!buclvl.highdays__c}"/><br/>
            <apex:outputField value="{!buclvl.levelfee__c}"/>
         </apex:repeat>
       </apex:pageBlockSection>
    </apex:pageBlock>
   </apex:form>
</apex:page>

Apex Code:

public class tableview {
    public String pos { get; set; }
public bucketlevel__c testLst;
    public tableview(){
        testLst = new bucketlevel__c();
    }
    public bucketlevel__c getTestMethod()
    {
        try{
            testLst = [SELECT lowdays__c, highdays__c, levelfee__c FROM bucketlevel__c];
            return testLst;
        }
        catch(Exception e){
            return testLst = NULL;
        }
    }
}


output:
User-added image