You need to sign in to do that
Don't have an account?
danielfnz
Get Static Resource Dynamically
Hi,
I am trying to determine if it is possible to determine the static resource dynamically.
So e.g. I have 2 users who have alias of User1 and User2. I have 2 images User1.jpg and User2.jpg and they should see their corresponding image when they view the visualforce page.
I want to do something like
$Resource.($User.Alias).jpg
But I can't get the syntax right if it is at all possible.
Any advice appreciated. Thanks
Message Edited by danielfnz on 09-01-2008 03:18 AM
I am trying to determine if it is possible to determine the static resource dynamically.
So e.g. I have 2 users who have alias of User1 and User2. I have 2 images User1.jpg and User2.jpg and they should see their corresponding image when they view the visualforce page.
I want to do something like
$Resource.($User.Alias).jpg
But I can't get the syntax right if it is at all possible.
Any advice appreciated. Thanks
Message Edited by danielfnz on 09-01-2008 03:18 AM
The controller uses UserInfo.getFirstName() and UserInfo.getLastName() to determine which URL to return to the visualforce page.
Not ideal as the controller code needs to be updated everytime a static resource is changed or a new one uploaded, so I'm still interested in a smarter solution if someone can see one.
Thanks