Loading javascript resources in custom controls on xPages partial refresh
I have several custom controls in my xPage, each of the custom control contain client side javascript resources.

I have noticed that if I add custom controls to my xpages and set rendered to false (or true) the javascript resorces are loaded in when i load my xpage instead of when the custom control is changed to true. I guess this is ok behaviour as the even if I set rendered to false the loaded property is true.

If I instead use the dynamic Content control in extLib the custom controls or the javascript resources are not loaded when the xpage is loaded and if I trigger the load of a custom control from my xpage the custom control is loaded in nicely but the javascript resources are not loaded in.

My guess here is that both these scenarious is related. all javascript resources are only loaded in to the xpage if they are loaded when the xpage is loaded. (i.e I can't find a way to load in javascript resources using partial refresh)

So...regardless if I am using extlib or not, Is there a way to load javascript resources located in a custom control after the xpages has been loaded using partial refresh. I have tried different ways using the onClientLoad event but not managed to get it working.


Thanks
Thomas


 





Loading javascript resources in custom controls on xPages partial refresh
===

I have several custom controls in my xPage, each of the custom control contain client side javascript resources.

I have noticed that if I add custom controls to my xpages and set rendered to false (or true) the javascript resorces are loaded in when i load my xpage instead of when the custom control is changed to true. I guess this is ok behaviour as the even if I set rendered to false the loaded property is true.

If I instead use the dynamic Content control in extLib the custom controls or the javascript resources are not loaded when the xpage is loaded and if I trigger the load of a custom control from my xpage the custom control is loaded in nicely but the javascript resources are not loaded in.

My guess here is that both these scenarious is related. all javascript resources are only loaded in to the xpage if they are loaded when the xpage is loaded. (i.e I can't find a way to load in javascript resources using partial refresh)

So...regardless if I am using extlib or not, Is there a way to load javascript resources located in a custom control after the xpages has been loaded using partial refresh. I have tried different ways using the onClientLoad event but not managed to get it working.


Thanks
Thomas


 




