You need to sign in to do that
Don't have an account?
amitashtekar
how to retrieve file names in a zipped static resouce file via apex
Hi all,
I want to retrieve file names within a zipped static resource file via apex.
can anybody help me.
I am stuck with this.
i think you can't access the static resource via apex...through visual force u can do rhis like
URLFOR($Resource.<name>,'<path>') where <name> is the resource name and <path> is the path to that file within the ZIP file
If you want to access static resource through Apex then you will have to create a component which will set a parameter containing the {!$Resource.your_static_resource_name} and then you can access it in Apex by ApexPages.currentPage().getParameter().get('ur param');
Note:
If you want to have the Resource URL loaded before page i.e.. in constructor, it wont be possible, then you will have you use VFP only or create logic within VFP.
Regards,
Lakshman
Appreciated your answer.
Can you please give me a example to create a component and controller for this.
Thanks,
vishal