Search code examples
jsfintegrationpicasa

What is the best way to integrate Picasa and JSF-software?


I am implementing small software with JSF. I would like to show users' photos from Picasa, but I have no idea what is the best way to do it? There can be many users and everyone of them has their own Picasa albums.

What do you recommend and why? Is it the wisest to use already implemented JavaScript-softwares like JQuery plugins or Googles Picasa Web Albums Data API to fetch photos etc?

Thanks! Sami

EDIT:

Have you or somebody else tried Fancybox, I have problems with js and css-files and I think that because of paths to those files. What is the correct way to refer to JS and CSS-files in JSF-files.


Solution

  • I recommend using a jQuery based solution like Picasa Webalbum Integrator. All you have to do is to add the required script files to your page and call the needed function, passing it the username of the gallery, like this:

    <script type="text/javascript">
    $(document).ready(function() {  //-- default jQuery call, do stuff when page is loaded
        $("#container").pwi({  //--specify your DIV's ID here
            username: '#{user.userName}' 
        });
    });
    </script>
    

    Where #{user.userName} is an EL expression pointing to the name of the user which gallery you want to show.