+ Start a Discussion
iBr0theriBr0ther 

How to ExtJS

Dear all developers!
I am a newbie in saleforce. I am about to create a page with ExtJS but I don't know how to include the Ext Library.
Does any one experiance with this, pls pay attention to help me.

Thanks in advance.
PoorMan.
DevAngelDevAngel
Take a look at static resources in the VisualForce documentation. Static resources are a new feature that provide a web addressable resource tree to your scontrols and visualforce pages.

You can create a static resource that is a zip file of the ext library and reference parts of it using formula fields.

So the src attribute of your script tag might look like:

src="{!URLFOR($Resource.extLib, '/ext/lib/bin/function.js')}"

As long as any url references in ext (such as dynamic js loading) are relative references, they will resolve properly.
iBr0theriBr0ther
Dear Dave.
Thanks to much your help. I've a document about ExtJS in VF that  I can use it to keep on going for my module. And another question is about S-Control, can I use ExtJS is S-Control? if possible, how to include the Ext library to my custom S-Control?
Thanks in advanced.
ShinShin
Even if you're not using Static Resources feature, Ext JS can be included in S-Control from remote web server static file, doing like this :
Code:
<head>
<link rel="stylesheet" type="text/css" href="http://yourserver.com/ext-2.0.2/resources/css/ext-all.css" />
<script type="text/javascript" src="http://yourserver.com/ext-2.0.2/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="http://yourserver.com/ext-2.0.2/ext-all.js"></script>
</head>

 Also, you can upload all files in the Ext JS archive as documents to salesforce. Note that you have to change some code in css files to address proper file path, it's a little heavy task, I suppose.