You need to sign in to do that
Don't have an account?
kkaal
Mimik SFDC style in a PageBlock
I thought, that would be easy:
I use a pageBlock this way:
<apex:pageBlock id="pb2" tabStyle="Account"> <apex:pageBlockSection columns="1" id="pbs1"> <apex:pageBlockSectionItem id="pbsi2"> <apex:pageBlockSection columns="2"> <apex:pageBlockSectionItem > <apex:outputLabel id="ot1" value="Contact Name" for="ot2"/> <apex:outputText id="ot2" value="javascript:contactArr[0]['name']"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:pageBlock>
I would like to have these outputs formatted according to the detail block of SFDC with the font formatting and the grey lines under the datacell.
I tried various options and it did not format.
Hi,
I do not understand why you have a pageblock inside a pageblocksection... The usual hierarchy is
pageblock, pageblocksection, pageblocksectionitem... If you have this hierarchy, then things hsould work fine...
Let me know if you still face issues...
Sorry, that was a copy / paste error. But I rechecked my code and still have no clue why it does not work:
As you see, there is a tab tag which contains a pageBlock. This divides the tab into 2 sections (with pageBlockSection and pageBlocSectionitems). The section #2 contains a new pageBlockSection which is intended to do a division of id="psbi2" into 2 columns. And the output in these secitons is not formatted.
you have a pageBlockSection inside a pageBlockSectionItem. The previous poster noted the proper hierarchy. A pageBlockSectionItem is supposed to be a direct parent of up to two pairs of labels and fields, or just two fields, or 4 labels, etc. It's not supposed to contain larger elements.
Thanks Paul-lmi, understood,
but what can I do when I want a pageBlockSectionItem to hold another structure like pageBlockSection/pageBlockSectionitem/textoutputs?
I checkt to use outputPanels. That works without errors or so, but I still do not get the formating in the SFDC style
you can't, they only designed pageBlockSectionItem for labels and fields, not full structured hierarchies. you'll have to do it with custom CSS overrides instead.