Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. public Map<Id, DateTime> photos {
  2. get {
  3. if(photoIds == null) {
  4. photoIds = new Map<Id,DateTime>();
  5. for(Attachment att : [select Id,CreatedDate from Attachment where ParentId = :account1.Id and name LIKE '%.jpg' LIMIT 5]) {
  6. //photoIds.put(1,att.Id);
  7. //photoIds.put(2,att.CreatedDate);
  8. photoIds.put(att.Id,att.CreatedDate);
  9.  
  10. }
  11. }
  12.  
  13. return photoIds;
  14. }
  15. }
  16.  
  17. <apex:repeat value="{!photos}" var="photo">
  18. <th class="tg-031e">
  19. <apex:outputlink value="{!URLFOR($Action.Attachment.Download, photo)}" id="theLink" onclick="window.open(this.href, 'mywin',
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement