You need to sign in to do that
Don't have an account?
snejana
Issue with doesn't exist file into zip static resource
Hi all.
I have logos.zip into static resource, which contains images with names: 'first.jpg' and 'second.jpg'.
'first' and 'second' are variables, which I retrieve from some field in custom object.
<apex:variable var="propertySlide" value="{!property.PropertyCode__c}.png" /> <apex:image url="{!URLFOR($Resource.logos, propertySlide)}" />
I need to be sure that if this field was empty or, for example, it equals 'third', I shouldn't see doesn't found image icon.
What should I need to do?
<apex:image url="{!URLFOR($Resource.logos, propertySlide)}" rendered="{!if((propertySlide == 'first' || propertySlide == 'second'),true,false)}" />
All Answers
<apex:image url="{!URLFOR($Resource.logos, propertySlide)}" rendered="{!NOT(ISNULL(propertySlide))}" />
Thank you Avidev9, but it did not help.
<apex:image url="{!URLFOR($Resource.logos, propertySlide)}" rendered="{!if((propertySlide == 'first' || propertySlide == 'second'),true,false)}" />
Yea! It is works. Thank you very much.
This decision led me to another question:
Is there a way to programmatically determine the names of all the files in the archive?
have a look here
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_compref.htm|StartTopic=Content%2Fpages_compref.htm|SkinName=webhelp
kiran_mutturu, I did not understand the last help message or maybe I badly explain my new issue.
I want to have some ability to fetch names all files from zip static resource.
Is it possible? If yes, what is a construction I should use. Maybe it's better to do in the class...