• ShambolicRuse
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

I am working on an app that doesn't use any of the standard salesforce styles. However, I notice they take significantly longer to load than any resources on my org.. In particular:

 

https://c.na7.visual.force.com/sCSS/18.0/1271110997000/PortalDefault/dStandard.css

https://c.na7.visual.force.com/sCSS/18.0/1269636689000/PortalDefault/default/elements.css

 

take about five seconds each. Since I'm not using them, how do I disable them? I have showHeader="false" standardStyleSheets="false" set in the page tag.

 

Thanks,

 

Mike

 


Hi,

 

I have found some strange behavior of apex attribute component.  Whenever I load the page it calls component setter method twice. I don't know why. Please suggest.

 

Component

 

<apex:component controller="sampleCon1"> <apex:attribute id="compKey" name="componentKey" description="component key" assignTo="{!componentKey}" type="String"/> </apex:component>

 Page

 

<apex:page > <c:reloadtestcomponent componentKey="CC-006"></c:reloadtestcomponent> </apex:page>

 class

 

 

public with sharing class sampleCon1 { private String componentKey; public String getComponentKey() { System.debug('Inside Component Key : -' + componentKey); return componentKey; } public void setComponentKey(String key) { componentKey = key; System.debug('Inside Set Component Key : -' + componentKey); } public sampleCon1() { System.debug('Inside Contructor'); } }

 

 

 output

15:46:30 DEBUG - ***Begining Page Log for /apex/reloadTestComponentPage 20100118101630.551:Class.sampleCon1.<init>: line 16, column 3: Inside Contructor 20100118101630.551:External entry point: returning from end of method public sampleCon1<Constructor>() in 0 ms 20100118101630.551:Class.sampleCon1.setComponentKey: line 12, column 3: Inside Set Component Key : -CC-006 20100118101630.551:External entry point: returning from end of method public void setComponentKey(String) in 0 ms 20100118101630.551:Class.sampleCon1.setComponentKey: line 12, column 3: Inside Set Component Key : -CC-006 20100118101630.551:External entry point: returning from end of method public void setComponentKey(String) in 0 ms Cumulative profiling information: No profiling information for SOQL operations. No profiling information for SOSL operations. No profiling information for DML operations. 2 most expensive method invocations: Class.sampleCon1: line 10, column 14: public void setComponentKey(String): executed 2 times in 0 ms Class.sampleCon1: line 15, column 9: public sampleCon1<Constructor>(): executed 1 time in 0 ms ***Ending Page Log for /apex/reloadTestComponentPage

 

 

Hi,

I can't access a custom component's attribute value from it's controller's constructor. Below is a simple test case that demostrates the problem:
 

<apex:page showHeader="false"> <c:Scratch testAttr="Test Value"/></apex:page>

 

<apex:component controller="Scratch"> <apex:attribute name="testAttr" description="test desc" type="String" assignTo="{!TestProp}"/> <div> <apex:outputText value="testAttr: {!testAttr}"/> </div> <div> <apex:outputText value="TestProp: {!TestProp}"/> </div></apex:component>

 

 

public class Scratch { public Scratch() { System.debug('TEST_PROP: ' + TestProp); } public String TestProp { get; set; } }

 

As you can see the outputText for both testAttr & TestProp correctly dislpay "Test Value" but the System.debug message shows TestProp's value as being null.
 
Anyone know what's going on here?
 
Thanks a lot,
Mike

Hi,

 

Does anyone know under what circumstances a custom component's controller would be instainated twice? This custom component only appears once on the page. I have other custom components who's constructors only get instainated once as expected.

 

I have tried to root cause it by creating a blank custom component/controller combo and adding suspect functionality to it one by one, but have been unsuccessful thus far. 

 

Thanks,

Mike