4

I have a page that will render properly only when showHeader="false" in the apex:page tag.

When it's set to true I get the following...

enter image description here

However, when it's set to false, I get a full-page map from Google (further down).

My page is very simple...

<apex:page standardController="Feral_Cat_Map__c"  showHeader="false" >
    <c:mapping /> 
</apex:page>

Then the component is...

<apex:component controller="mappingController">
    <!-- A lot of JavaScript -->

    <body class="area">
        <div id="panel">
            <b>Enter address: </b><input id="address" type="textbox" size="50" />
            <input type="button" value="Search" onclick="geocodeAddress()"/>
            </div><br/><br/><br/>
            <div id="map-canvas"></div>             
    </body>
</apex:component>

So - have you come across this before? Any ideas why changing the showHeader setting would cause it to fail?

What it should look like follows...with the header added, of course

enter image description here

  • Some of your javascript code clashes with the standard salesforce javascript. Try rename some of your global variables and methods see if that fixes it. – Boris Bachovski May 1 '15 at 5:46
  • I'm pretty sure having a <body> tag in a component might be the cause of your pain... – Matt Lacey May 1 '15 at 5:53
  • @LaceySnr - thanks for the tip but the behavior is exactly the same with the body tag in the component or in the page. – sberley May 1 '15 at 5:57
  • Doh, worth a crack. What's controlling the styling for the map? – Matt Lacey May 1 '15 at 6:00
  • Styling is from Google Maps settings (mostly defaults) with custom based on logic in the JS code. Data's coming in via JS remoting to the Apex controller. – sberley May 1 '15 at 6:03
0

Since the solution isn't obvious, I was thinking...it works perfect when added as a VisualForce page through the Layout Editor (shown below).

So, rather than hunting for the problem, couldn't I just mimic that infrastructure?

What does the wrapper around dropped in pages look like?

enter image description here

  • sberley, did you want to make an edit to your question ? It's a "best practise" to keep all parts of your question centralized there, so that answers are only solutions to that questoin and not replies. If you're new to stackexchange, i'd recommend having a look at our welcome your – Samuel De Rycke May 4 '15 at 7:48
0

I had posted this on another thread asking about a different approach that might solve the problem. Shortly afterward I had an idea that resolve it.

See this posting in case you're faced with a similar problem...

Good luck,

Steve

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.