You need to sign in to do that
Don't have an account?
anju
Using Active Widget in visual force
Hi,
I want to use Active Widget in visual force.
For that I have uploaded AW css, javascript and image files as static resources. In AW CSS file I have replaced image names with resource id. For e.g. image name was tab.png and I replaced it as /resource/1234567890/tab. Then I gave css file reference in visual force page as <apex:stylesheet value="/resource/12222355677/awcss" /> where 'awcss' is my AW CSS file. I have done the coding as follows. And for javascript I have used tag - <script type="text/javascript" src="{!$Resource.awjs}" />. But I didn't get any result. Can anybody help me?
<apex:page>
<apex:stylesheet value="/resource/12222355677/awcss" />
<script type="text/javascript" src="{!$Resource.awjs}" />
<style>
#tab1 {width=100;}
</style>
<div id="divTest" name="divTest"></div>
<script>
var objTab=new AW.UI.Tab;
objTab.setId("tab1");
document.getElementById("divTest").innerHTML=objTab;
</script>
</apex:page>
- do not hard code the versioned resource url like you are doing - this is a recipe for heartache, use $Resource for what its there for - to provide a layer of abstraction that will keep things from breaking over time.
- breaking apart 3rd party library code and then modify its source like you describe is also a bad idea for many reasons, perhaps the most important of which is that most libraries expect a very specific physical structure and you are breaking that with what you are doing currently.
I looks to me like you are not aware of the most powerful part of static resources: archives like ZIP and JAR files can be uploaded and then they can be used as a virtual file system, web root, or a file system in a file including maintaining full support for relative references.
In you specific case of AW, I would take the AW zip file, expand it on your local drive, remove the examples folder and re ZIP it into a file called aw.zip. Then create a static resource called aw and upload aw.zip as the resource's content file.
Now you can refer to things like this:
And for extra credit we can leverage the Component Development Kit that is part of Visualforce to abstract things out a bit:
and the new custom component:
Message Edited by dchasman on 10-16-2008 09:33 PM
Hi..
I want to display a static resource image in PDF as header image.. (ie I want to display in each page in PDF)
Is it possible in Visualforce..?
I am using following code.. It doesnt work..
@top-left{
background-image: url(!urlfor($resource.logo));
}
How to display today date as footer (ie every page in PDF)
Give me a guidance.. How to fix it..