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
HydHyd 

Reg: OnRowClick() event in Apex

Hi,

 

I used <apex:pageblocktable>  to display all records in VF page.

When i click on each row i would like to display the detail page of particular record at the bottom of pageblocktable.

I tried it using actionsupport with the help of an event "onclick".

But i would like to do this one using "onrowclick" event without using action support.

 

can any one help me. 

 

 

Thanks.

 

 

b-Forceb-Force

We can define javascript events at various levels , like onRowClick, onRowDblClickfor pageblock level,

 

and few more for columns [Content of page row ]

 

what did you mean to show detail page of record ? If you are thinking standard salesforce page ,


then you can load this detal page in some Iframe

 

Thanks,

Bala

HydHyd

Thanks for your reply.

I wrote the below code to display detail page view.

 

 

<apex:page standardController="student__c" recordSetVar="s">
    <apex:form >             
            <apex:pageBlock>
                <apex:pageBlockTable value="{!s}" var="x">
                    <apex:column >                           
                        <apex:actionSupport event="onclick" rerender="detail" status="Mystatus">
                            <apex:param name="cid" value="{!x.id}"/>  
                            {!x.name}        
                        </apex:actionSupport>
                    </apex:column>       
                </apex:pageBlockTable>                                       
            </apex:pageBlock>
    
            <apex:actionstatus id="Mystatus" starttext="loadind data....." >
                    <apex:facet name="stop">
                        <apex:outputPanel id="detail">
                            <apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="true"  title="false"/>
                        </apex:outputPanel> 
                    </apex:facet>
            </apex:actionStatus>
     </apex:form>
</apex:page>

 

I need to do the above  task without using action support. 

please help me.

 

I feel very happy if u did it.

Pradeep_NavatarPradeep_Navatar

Use an iframe to open the detail page by sending record id on rowClick using JavaScript code if you want to open Standard Salesforce detail page but if you want to open content of the detail page in output panel then use ApexOutput panel, ActionFunction and a Controller through ActionFunction sent the record id on rowClick into the controller and display the detail in ApexOutput panel.

 

Below is the sample code to display Standard Salesforce page inside the iframe :

 

<apex:detail subject="{!account.Id}" relatedList="false" title="false"/>

LionLion

Can u please send the code...