+ Start a Discussion

Embedded VF page in page layout, confused...

OK, I have to create a special "control" that will be part of the page layout for one of the case record type's layout. I see that I can place an vf page as a 'field' in the page layout and I wanted to use this functionality. 


I created the vf page and simply put it has an apex:inputfield plus some of our own content in it. The extension class does get loaded and tied to case's controller and the field binds. The problems I have are:


1. I want to make it look like just another section item in the layout, since it now renders as an independent IFRAME. If I create a full vf layout from <apex: pageBlock> as I would for a full blown page then I get a block in a block which is utterly ugly. What am I missing?  


2. The vf page only shows in the VIEW mode, and with the field in edit mode, whilst when the whole page is in edit mode the vf page is not rendered at all? Again, how do I adjust that my control follow the layout's  mode (be a view when in view mode and show as editable when in edit mode)?


3. If #1 is impossible, can I at least embed a VF page as a pageBlock on its own. I tried dragging the page between two page blocks in page layout editor but it wont stick as a block, only as a section item.



Message Edited by mmix on 02-11-2009 11:22 AM

Hi Mate,


I was also experiencing the same problems with VF.


1. There is no other alternative to this problem in VF so far.

2. This is also correct and you need to override edit button to make this happen. It won't work automatically.

3. You are also right here. This is also not possible.


Thanks !



Can you please provide some more detail on #2...I have a VF page that uses a controller extension and I am embeding this on a standard page layout.  When the standard page goes into edit mode, my VF page no longer shows within the standard page.


I have been trying to define properties on the controller extension and using these to set the "rendered" property on pageBlocks, etc., but it does not seem to work.