You need to sign in to do that
Don't have an account?
JimPDX
Static Resource, Dynamic file?
Sorry for what might be a stupid question here. I would like the file reference within my URLFOR($Resource) to be dynamic - either a variable set in my controller or in the VF page itself. Can this be done? I am trying to show dynamic images within a page based on which page you are on. Thx.
Not a stupid question a common ask. You have to specify the resource explicitly using $Resource.resourcename but if it's an image you want to reference dynamically you can bundle the images into a zip, upload the zip as a static resource and then specify which element within the zip you want to show dynamically.
Check out the introduction to Visualforce article and scroll down close to the bottom to the Miscellanea section for the brief description to Static Resources and later the sample custom component where this is demonstrated.
All Answers
Not a stupid question a common ask. You have to specify the resource explicitly using $Resource.resourcename but if it's an image you want to reference dynamically you can bundle the images into a zip, upload the zip as a static resource and then specify which element within the zip you want to show dynamically.
Check out the introduction to Visualforce article and scroll down close to the bottom to the Miscellanea section for the brief description to Static Resources and later the sample custom component where this is demonstrated.
Hi..
I have to display all zipped files in a Picklist.. That is if I zip 3 files a.gif,b.gif,c.gif into one file and upload into static resource. In my VF page I have to display this 3 names in a picklist. I have to store the selected picklist value, based on the picklist selection I have to change the logo in my PDF generation.
From Zip file we can fetch the appropriate file. But how to display the zipped files names in Picklist..?
Is it possible..?