You need to sign in to do that
Don't have an account?
dfalso
Custom Component - onLoad equivilent?
HI all,
I asked this before in another post but got no response, so I just wanted to try once more before giving up.
I'm building a custom Apex component. I need a JavaScript function to run to initialize the component features. I have an <html> section in my component, so I've tried setting the onload attribute there with no luck. I've tried puting a document.onLoad() call in both the <head> and the <body>, and also tried a window.onLoad() in both places. Nothing has worked so far.
Am I missing something, or does this just not work?
Thanks for any help anyone can provide.
I asked this before in another post but got no response, so I just wanted to try once more before giving up.
I'm building a custom Apex component. I need a JavaScript function to run to initialize the component features. I have an <html> section in my component, so I've tried setting the onload attribute there with no luck. I've tried puting a document.onLoad() call in both the <head> and the <body>, and also tried a window.onLoad() in both places. Nothing has worked so far.
Am I missing something, or does this just not work?
Thanks for any help anyone can provide.
TehNrd
When you say "initialize the component features" what exactly are you initializing? Does this component use a custom controller? If so perhaps you could do some if the initializing here in the contructor.
dfalso
I am actually using a custom controller. Here's my specific scenario:
I'm basically managing a Many-to-many relationship, by putting a list of Unassigned strings in one listbox (Select1), and the currently assigned ones in the other (Select2). My input attribute is a class that has the two string arrays. So I need to initialize the two listboxes when the component is created.
Code: