cancel
Showing results for 
Search instead for 
Did you mean: 

Thumbnail view

sjeek
Champ in-the-making
Champ in-the-making
Hi,

I'm working on a thumbnail view to find images on a quick way.
Now, in my first version, I used the following code


<h:graphicImage id="graphicimageview" value="#{r.url}" height="#{BrowseBean.thumbnailH}" width="#{BrowseBean.thumbnailW}" />

But, now, I want to show also thumbnails of jpeg2000, tiff images etc.
I can display these images with the embed tag. (quicktime, other plugins, …)


<h:outputText id="thumbnail_images" value="<embed src='/alfresco#{r.url}' width='#{BrowseBean.thumbnailW}' height='#{BrowseBean.thumbnailH}'>" escape="false" />

In Firefox, regular images are also showed with the embed tag, but IE can't show jpg, gif etc with the embed tag., so, here, we need a solution for.


If the mimetype of the file is jpg, gif, …, then we want to use the regular <img> tag.
And if the mimetype of the file is jp2, tiff, swf, … etc, then we want to use the <embed> tag.

I'm trying to work something out with the booleanEvaluator, but till now, I still didn't succeed.

Anyone a suggestion?

Here is an example of how i want to do this, but I don't know how i can check the mimetype in the checkincheckoutbean because i can't give the ID along with it.

example:


<a:booleanEvaluator id="showThumb" value='#{CheckinCheckoutBean.thumbnailFile == false}' >
   <h:outputText id="thumbnail_images" value="<embed src='/alfresco#{r.url}' width='#{BrowseBean.thumbnailW}' height='#{BrowseBean.thumbnailH}'>" escape="false" />
</a:booleanEvaluator>
<a:booleanEvaluator id="showThumb" value='#{CheckinCheckoutBean.thumbnailFile == true}' >
   <h:outputText id="thumbnail_images" value="<img src='/alfresco#{r.url}' width='#{BrowseBean.thumbnailW}' height='#{BrowseBean.thumbnailH}'>" escape="false" />
</a:booleanEvaluator>

Here, i can give the ID along with it, but i don't hav any action events in the other code sample.

<a:actionLink id="inlinelistlink" value="#{r.name}" styleClass="title" actionListener="#{CheckinCheckoutBean.inlineFile}">
<f:param id="inlinelistparam" name="id" value="#{r.id}" />
</a:actionLink>

friendly regards
3 REPLIES 3

sjeek
Champ in-the-making
Champ in-the-making
I used the following solution for my problem


<h:outputText rendered="#{r.fileType32 == '/images/filetypes32/jp2.gif' || r.fileType32 == '/images/filetypes32/swf.gif' || r.fileType32 == '/images/filetypes32/tif.gif' || r.fileType32 == '/images/filetypes32/avi.gif' || r.fileType32 == '/images/filetypes32/wmv.gif' || r.fileType32 == '/images/filetypes32/mov.gif'}" id="thumbnail_other" value="<embed src='/alfresco#{r.url}' width='#{BrowseBean.thumbnailW}' height='#{BrowseBean.thumbnailH}'>" escape="false" />

<h:outputText rendered="#{r.fileType32 == '/images/filetypes32/jpg.gif' || r.fileType32 == '/images/filetypes32/gif.gif' || r.fileType32 == '/images/filetypes32/png.gif' || r.fileType32 == '/images/filetypes32/bmp.gif'}" id="thumbnail_jpg" value="<img src='/alfresco#{r.url}' width='#{BrowseBean.thumbnailW}' height='#{BrowseBean.thumbnailH}'>" escape="false" />

I got also another outputtext with all the other filetype32 who has got no thumbnail. here for, I just show the image of the fileType

But If someone knows a better way to solves this…  :wink:

csnell52
Champ in-the-making
Champ in-the-making
Please can any body give me an idiots guide to providing a thumbnail dashboard such that all images can be viewed as thumbnials (I dont want the originals to be affected/transformed).

By idiots guide, I really do mean idiots guide by way of what bolt ons I need and any source code and a step by step guide of what goes where.
We have Alfresco 1.3.1 running with Tomcat and mySql.

I realise this is a big ask, but I really havent got a clue where to start and the wiki isnt much help.

many thanks in advance

rgauss
Champ in-the-making
Champ in-the-making