3

So I'm used to this kind of sorting my source files, but I can't seem to be able to find a solution to this problem in Xpages. It would be great if I can store my images like for example: UI images in "ui", layout images in "layout" and so on... Is this possible? Or maybe some kind of workaround?

Thank you!

gkidd
  • 199
  • 4
  • 18

3 Answers3

5

In image resources, you can also use "virtual folders" to organize the image files.

E.g. If you have a header image named "header.png". Rename to "layout\header.png".

When you reference this image from the web browser, the path will be: http://somedomain.com/path/to/db.nsf/layout/header.png

Tommy Valand
  • 868
  • 6
  • 10
  • This is a handy way to do it so that you can filter by virtual folder (top right of designer client). – Simon O'Doherty Feb 01 '12 at 12:20
  • This workaround sounds interesting, but it's kind of "not serious" if you know what I mean. Thank you though. – gkidd Feb 01 '12 at 13:53
  • I would say it is serious, the problem is only the the domino designer doesn't show them in a nice folder structure that can be expanded and collapsed. – pathed Feb 02 '12 at 19:55
  • this would be "impossible" to do on an existing application. – gkidd Feb 03 '12 at 08:21
3

In Package Explorer (or Eclipse Navigator), locate the WebContent folder. This is treated as the "root" of the NSF when an XPage is accessed. If your images are already stored on your hard drive in the folder structure you want to create, you can literally just drag the top-level folder to WebContent, and it'll preserve the exact same structure. You can also manually add folders to WebContent (or any subfolder) using the context menu.

Tim Tripcony
  • 8,056
  • 1
  • 23
  • 34
0

Use the Eclipse Navigator view (add it to your perspective) - there you should be able to create a folder in the images. What works definitely is to use webDAV for design files

stwissel
  • 20,110
  • 6
  • 54
  • 101
  • now this is something that I need. But I can't create a folder, it gives me an error "Can not create a Resource at the location: [my_location] Also, maybe it'll be a silly question, but what's webDAV? – gkidd Feb 01 '12 at 13:57
  • Switch it on in the webconfiguration of your server and the database and then you can connect to the file design elements of your NSF using webfolders. Check this: http://jorgealbaladejo.com/2011/04/16/making-lotus-domino-webdav-actually-work/ – stwissel Feb 01 '12 at 14:16