• EvaD
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 8
    Replies
I am missing how you're supposed to use the .jsp tags in a Visualforce page if you're using the "<apex:canvasApp..." tag. 

No where is there a "map" of how all the pieces fit together or I haven't found it.  Any help would be appreciated.  The SDK has jsps - where are those supposed to be placed?  In static resources? 

I have a canvas app set up to connect to a 3rd party application that our company created which was done in .net.  I don't have access to that dev environmnet, but I do have the URL.  I'd like to be able to have the app talk to SFDC.  It would be nice just to tell the canvas app to resize itself. 

Any ideas?  Thanks - just waiting for all the info to "click" and make sense.
  • January 24, 2014
  • Like
  • 0
I'm using a Visualforce page with a tabPanel and when winter 14 was released the user could no longer click on the tabs to navigate.  After debugging, I found that the SFDC script was expecting a parameter previously not required. 

Code that used to work prior to release:

<apex:tabPanel id="AccountTabPanel" value="{!TabInFocus}" tabClass="activeTab" inactiveTabClass="inactiveTab">

Fixed code includes the activeTabClass attribute:

<apex:tabPanel id="AccountTabPanel" value="{!TabInFocus}" tabClass="activeTab" activeTabClass="activeTab" inactiveTabClass="inactiveTab">

This isn't documented anywhere and clearly wasn't regression tested.  I have an AppExchange app that is broken because of this and since it's managed, I will have to contact the developers to get a new version with working tabs.  I submitted a case to SFDC Premier support which didn't get anywhere. 

 
  • January 09, 2014
  • Like
  • 0

My issue solved!

 

I want to collapse all Page Block sections by default on page open.

I can write code in a VF Page, but I get cross site scripting errors.

 

Create a Static Resource using JavaScript to accomplish the default collapse:

 

function twistSection(twisty, sectionId) {
    //twistSection code from salesforce.com
   var parentDiv = twisty;
   while (parentDiv.tagName != 'DIV') { parentDiv = parentDiv.parentNode; }
   var headerId = sectionId || (parentDiv.id.split('_'))[1];
   var div = parentDiv.nextSibling;
   var elemWasOn = false;
   if (div.style.display != 'none') {
       div.style.display = 'none';
       twisty.className ='showListButton';
       twisty.alt = twisty.title = 'Show Section - '+twisty.name;
       elemWasOn = true;
   }
}

var registeredSections = new Array();
function registerTwistableSection(headerId, mainTableId) {
   var obj = new Object();
   obj.headerId = headerId;
   obj.mainTableId = mainTableId;
   registeredSections[registeredSections.length] = obj;

   for (var i = 0; i < registeredSections.length; i++) {
      var obj = registeredSections[i];
      
      var img = parent.document.getElementById("img_" + obj.headerId);
        //go right into twistSection if we have the img obj.
       if(img){
       if (img.className =='hideListButton') {
         twistSection(img, obj.headerId, obj.mainTableId);
       }
   }
}
}
function registerTwistableSections_ep() {
//these are the sections I know about from viewing source code...
registerTwistableSection('01B30000003osTc', 'ep');
registerTwistableSection('01B30000003osTd', 'ep');
registerTwistableSection('01B30000003osTe', 'ep');
registerTwistableSection('01B30000003osTg', 'ep');
registerTwistableSection('01B30000003osTh', 'ep');
registerTwistableSection('01B30000003osTi', 'ep');
registerTwistableSection('01B30000003osTj', 'ep');
registerTwistableSection('01B30000003osTk', 'ep');
}
registerTwistableSections_ep();

 

Now for the cross site scripting hack:

Found this in another post and am so thrilled that it works:

 

1.  Create a Custom Homepage Component that is HTML, refer to your Static Resource code:

 

<script src="/resource/1284395872000/pageBlockSupplement" type="text/javascript"></script>

 

 

2.  Make sure this component is included on the Home Pages layouts.  It is invisible, so you don't have to worry about it.

 

  • September 13, 2010
  • Like
  • 0
I'm using a Visualforce page with a tabPanel and when winter 14 was released the user could no longer click on the tabs to navigate.  After debugging, I found that the SFDC script was expecting a parameter previously not required. 

Code that used to work prior to release:

<apex:tabPanel id="AccountTabPanel" value="{!TabInFocus}" tabClass="activeTab" inactiveTabClass="inactiveTab">

Fixed code includes the activeTabClass attribute:

<apex:tabPanel id="AccountTabPanel" value="{!TabInFocus}" tabClass="activeTab" activeTabClass="activeTab" inactiveTabClass="inactiveTab">

This isn't documented anywhere and clearly wasn't regression tested.  I have an AppExchange app that is broken because of this and since it's managed, I will have to contact the developers to get a new version with working tabs.  I submitted a case to SFDC Premier support which didn't get anywhere. 

 
  • January 09, 2014
  • Like
  • 0

My issue solved!

 

I want to collapse all Page Block sections by default on page open.

I can write code in a VF Page, but I get cross site scripting errors.

 

Create a Static Resource using JavaScript to accomplish the default collapse:

 

function twistSection(twisty, sectionId) {
    //twistSection code from salesforce.com
   var parentDiv = twisty;
   while (parentDiv.tagName != 'DIV') { parentDiv = parentDiv.parentNode; }
   var headerId = sectionId || (parentDiv.id.split('_'))[1];
   var div = parentDiv.nextSibling;
   var elemWasOn = false;
   if (div.style.display != 'none') {
       div.style.display = 'none';
       twisty.className ='showListButton';
       twisty.alt = twisty.title = 'Show Section - '+twisty.name;
       elemWasOn = true;
   }
}

var registeredSections = new Array();
function registerTwistableSection(headerId, mainTableId) {
   var obj = new Object();
   obj.headerId = headerId;
   obj.mainTableId = mainTableId;
   registeredSections[registeredSections.length] = obj;

   for (var i = 0; i < registeredSections.length; i++) {
      var obj = registeredSections[i];
      
      var img = parent.document.getElementById("img_" + obj.headerId);
        //go right into twistSection if we have the img obj.
       if(img){
       if (img.className =='hideListButton') {
         twistSection(img, obj.headerId, obj.mainTableId);
       }
   }
}
}
function registerTwistableSections_ep() {
//these are the sections I know about from viewing source code...
registerTwistableSection('01B30000003osTc', 'ep');
registerTwistableSection('01B30000003osTd', 'ep');
registerTwistableSection('01B30000003osTe', 'ep');
registerTwistableSection('01B30000003osTg', 'ep');
registerTwistableSection('01B30000003osTh', 'ep');
registerTwistableSection('01B30000003osTi', 'ep');
registerTwistableSection('01B30000003osTj', 'ep');
registerTwistableSection('01B30000003osTk', 'ep');
}
registerTwistableSections_ep();

 

Now for the cross site scripting hack:

Found this in another post and am so thrilled that it works:

 

1.  Create a Custom Homepage Component that is HTML, refer to your Static Resource code:

 

<script src="/resource/1284395872000/pageBlockSupplement" type="text/javascript"></script>

 

 

2.  Make sure this component is included on the Home Pages layouts.  It is invisible, so you don't have to worry about it.

 

  • September 13, 2010
  • Like
  • 0

This is what I have right now, but I want the select options list to show the field label to the user and pass the field name when selected by the user.

 

Schema.DescribeSObjectResult obj = Quote_Comment__c.sObjectType.getDescribe(); Map<String, Schema.SObjectField> objFields = obj.fields.getMap(); for( String fieldName : objFields.keySet() ) { orderByOptions.add(new SelectOption(fieldName,fieldName )); }

 

Has anyone had any luck unit testing against information in the history table for an object?

 

We have a custom history popup, similar to the SF history display, but generated from scratch in a VisualForce controller.

 

I'm attempting to write some unit tests for the controller.  I am creating and updating an object of a type which has history tracking turned on, but I never get any entries in the history table.  I'm assuming that this is because the history table is populated from a trigger or similar when the transaction commits, and the transaction is rolled back in test mode.

 

I'm going to restructure to the code to get around this from the coverage point of view, but before I do that I'd appreciate it if anyone could confirm that this is the case.

Hi,

I need to put a custom related list on the account detail page and put the Hover link on the top of the page for the custom related list.

 

I was able to do the custom related list displayed on the bottom of the Account detail page wiring a standard controller extension and visula force page.

 

Now the problem is How do I place the Hover link on the top of the page for the custom list? I saw couple of threads for the above, but the hover links issue was never discussed?.

 

Can any one please guide me how can I do this.

 

Thank you.

We are creating a form with input fields, and we want the ability to display the hover over help text for every input field. We are currently defining the input field within the <table> tag enveloped in a <pageBlock> but have not been able to display the help text using this method.
 
However, we also tried using <Page Block Section> to envelope the input fields and were able to display the hover over text, but were limited to using only two columns per section and were unable to define custom labels for the input fields. This forced us to switch to the <table>tag. 
Is there a way for us to display the hover over text while using custom labels and having more than two columns?
Hi,

I need to add the field history from a custom object to a page, but am running into a lot of problems.  The related list displays with no problem when viewing the custom object through the salesforce custom object tab, but on my custom page it says that Histories is not a valid child relationship name for the entity.  I have checked the child relationships of my custom object and the History object that salesforce generates automatically when "Track Field History" is checked is listed with the name "Histories" as the child relationship name.  I have tried this on multiple custom objects (making them as simple as possible) and a relatedList on Histories just doesn't seem to be possible.  Has anyone been able to make this work?

-David