You need to sign in to do that
Don't have an account?

VF, related lists and links; how do they work??
ive got a custom visualforce page that im using as a related list
originally in my testing, it was a straight up vf page, now im editing it slightly to be a realted list
1) how do i remove the pageblock formatting so it looks more like a native related list?
2) how do i format the link so that it opens in a new window rather than the related list iframe looking section?
<apex:page StandardController="Account" extensions="AccountAssetController" tabStyle="Account"> <apex:pageBlock > <apex:pageBlockTable value="{!AllAssets}" var="asset"> <apex:column headerValue="Asset"> <apex:outputLink value="{!URLFOR($Action.Asset.View, asset.Id)}">{!asset.Name}</apex:outputLink> </apex:column> <apex:column value="{!asset.Product2Id}"/> <apex:column value="{!asset.AccountId}"/> <apex:column value="{!asset.Status}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>


I can help with question 2.
You can use the attribute "Target" to control what the link does. For example target="_blank" will open in a new window. The same attribute is used by HTML. Nice examples of the options can be found here: http://allwebco-templates.com/support/S_target_link.htm
As to your first question, I don't think any of the standard components defaults to the style of a related list.
You could check out the class being used by Salesforce and if you use that class on your pageblock it MIGHT work. A second alternative is to look at the page source that contains a normal related list and copy the Table and div setup. I use Chrome's inspector (Ctrl-**bleep**-I) to do this.
Be forwarned that this isn't a "supported" method. Salesforce can decide to change their class names and styles at any point.