function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deepika Gupta 26Deepika Gupta 26 

Page showing without sidebar and showheader

Hi All,
This is my code of VF page where i have already set sidebar and showheader still its not showing both the things and only showing data on blank page which is not looking fine.please suggest how can i solve this issue
<apex:page standardController="Account" sidebar="true" tabStyle="Account" showHeader="true" extensions="WithContactButtonController">

<apex:form >

<c:HierarchyTree currId="{!Account.id}" />

<input type="button" value="Back to Account" onclick="window.history.back()" /> <b><apex:commandLink action="{!doSomething1}" target="_top" value="IncludeContact" id="theButton"/></b>

 
JethaJetha
By default, sidebar and showHeader is true for any visualforce page. Please try removing those attribute from page.
Amit Chaudhary 8Amit Chaudhary 8
Please chck you component "HierarchyTree ". Please post code if you can
Deepika Gupta 26Deepika Gupta 26
Yes here is the code : 
<apex:component controller="HierarchyTree">
    
    <apex:attribute name="currId" description="This is the Account Id for displaying Acccount Hierarchy" type="String" required="true" assignTo="{!currentId}"/>

    <apex:outputPanel rendered="{! currId == null}" layout="none">
        <span style="font-size:16px; font-weight:bold; padding-top: 15px; display: inline-block;">{!$Label.AccountIdIsRequired}</span>
    </apex:outputPanel>

    <apex:outputPanel rendered="{! currId != null}" layout="none">

        <apex:stylesheet value="{!URLFOR($Resource.jsTree, 'dist/themes/default/style.min.css')}"/>
        <apex:includeScript value="{!URLFOR($Resource.jquery_1_11_3)}"/>
        <apex:includeScript value="{!URLFOR($Resource.jsTree, 'dist/jstree.min.js')}"/>

        <script>
            var j$ = jQuery.noConflict();

            j$(function(){

                j$('#jstree')
                // listen for event
                .on('changed.jstree', function (e, data) {
                    if( (typeof sforce != 'undefined') && sforce && (!!sforce.one) ) {
                        // Salesforce1 navigation
                        sforce.one.navigateToSObject('' + data.selected);
                    } else {
                        // Set the window's parent URL using a javascript expression
                        window.top.location.href = '/' + data.selected;
                    }
                })
                // create the instance
                .jstree({
                    'core' : {
                        'data' : {!JsonTree}
                    }
                });

            });
            
        </script>

        <div id="jstree"></div>

    </apex:outputPanel>

</apex:component>

after deleting the tags its not working.
Amit Chaudhary 8Amit Chaudhary 8
Page look good to me . How you are opening above page ? By any button if yes please share screen shot of button
Deepika Gupta 26Deepika Gupta 26
I am opning the page via link.