+ Start a Discussion
Naresh Krishna.ax1176Naresh Krishna.ax1176 

how to disable a action of lookup field in pageblocktable ?

 

Hi All,

 

 I'm trying to display fields from objects in my visualforce page, but when i'm trying to display an standard fields like CreatedBy the fields are shown as lookup (like anchor tag). When I clicked  on lookup field it navigates to lookup object.

  can we able to disable the navigation to that object. 

 

here is my controller code:

 

appsReport = [select Name,XXXXXXXX,CreatedByID,CreatedDate from XXXXXXX]; 

 

and here is my apex page:

 

<apex:pageBlockTable value="{!appsReport}" var="report" >
<apex:column value="{!report.Name}">
</apex:column>
<apex:column value="{!report.XXXXXX}">
</apex:column>
<apex:column value="{!report.CreatedByID}" />
</apex:column>
<apex:column value="{!report.CreatedDate}">
</apex:column>
</apex:pageBlockTable>

 

Could you please help me on this issue.

 

Thanks.

Sridhar BonagiriSridhar Bonagiri

Hi,

Display  the value of CreatedBy using <apex:outputText> or <apex:outputlabel> instead of <apex:column>

Regards,
Sridhar Boangiri

harsha__charsha__c

Yes, what Sridhar said would be the best way to handle it.

 

You can use either of apex:inputText / apex:OutputText as per your UI need. 

 

Syantax will come like followed.

<apex:column>
     <apex:inputText value="{!Contact.AccountId}"/>
</apex:column