You need to sign in to do that
Don't have an account?
outputLink in pageBlockTable displaying in section
Hi everyone,
Sorry if this is a stupid question but here goes. I have a visualforce page that displays a custom table of child objects related to Opportunities and one of the columns is an outputLink to the child object page. The link is based on a lookup field. My page is imbedded in a section of a standard page layout. My problem is that when I click the link, the page I want to redirect to displays in the section in the Opportunity page instead of the full window.
Here is my VF code (unnecessary stuff removed):
<apex:page standardController="Opportunity" extensions="AllocateBudgetextension" id="opportunity" showHeader="false" sidebar="false" standardStylesheets="true">
<apex:form >
<apex:pageBlock id="block" mode="maindetail">
<apex:pageBlockSection columns="1">
<apex:outputPanel id="table">
<apex:pageBlockTable value="{!CampaignListDummys}" var="dummy" rendered="{!(CampaignListDummys.size != 0)}" style="margin-bottom:5px">
<apex:column headerValue="Action" width="50px">
<apex:commandLink action="{!removeCampaign}" reRender="table">
<apex:param name="cid" value="{!dummy.budgets.Id}" assignTo="{!dcbid}"/>Remove
</apex:commandLink>
</apex:column>
<apex:column headerValue="Allocation" width="110px">
<apex:outputField value="{!dummy.budgets.Budget__c}" rendered="{!NOT(editmode)}"/>
<apex:inputField value="{!dummy.budgets.Budget__c}" rendered="{!editmode}" style="height:11px;margin:-1px;width:100px"/>
</apex:column>
<apex:column headerValue="Campaign" id="campaign">
<apex:outputField value="{!dummy.budgets.Advertiser_Campaign__c}" rendered="{!NOT(editmode)}"/>
<apex:selectList value="{!dummy.budgets.Advertiser_Campaign__c}" size="1" rendered="{!editmode}" style="font-size:8px;margin:-1px">
<apex:selectOptions value="{!CampaignOptions}"/>
</apex:selectList>
</apex:column>
<apex:column headerValue="Inventory Type" width="101px">
<apex:outputText value="{!dummy.campaigns.Inventory_Type__c}" rendered="true"/>
</apex:column>
</apex:pageBlockTable>
<apex:outputPanel>
<apex:commandLink value="Allocate" action="{!newCampaignBudget}" reRender="table"/>
</apex:outputPanel>
</apex:outputPanel>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I hope this makes sense. Any ideas?
Yes, using target="_top" worked.
All Answers
Hi,
Have You tried target attribute with <apex:outputlink>?You can assign target="_self" with apex:outputlink.It may help you.
<apex:outputlink target="_self" value="Remove"/>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks for your response. I tried the target attribute but I sitll have the same problem. The code now looks like this:
The link to the Advertiser Campaign object still opens in the section of the page.
Bump
I've seen this asked a few times but no one ever answers. Is there possibly a javascript solution?
Hi Jakem,
Did you ever find a solution to this?
Thanks!
Sam
Yes, using target="_top" worked.
Thank you so much! It worked perfectly!