Wednesday, December 23, 2009

Using IIPViewer in a web app

1. install apache besides tomcat
2. set up apache-tomcat connector
3. set up fastcgi in apache
4. install IIPImageServer
5. test the client (javascript mootools viewer, javascript prototype viewer, flash client)
iipmooviewer had did'nt show in our facelets composite page. This might have been because of some problems of mootools framework (look at this thread http://sourceforge.net/projects/iipimage/forums/forum/299494/topic/3493189). The Flash viewer is written in ActionScript and works quite fine.

Look at following links for different possibilities for an ajax large image viewer:


Ajaxian » IIPImage: Ajax-based Ultra High Resolution Image Viewer
Panoramic JavaScript Image Viewer (PanoJS) | mojavelinux.com
Google Maps Image Viewer Module - OpenMRS

Inside Deep Zoom – Part I: Multiscale Imaging — RTFM / Daniel Gasienica
panojs - Project Hosting on Google Code
Put Your Large Pictures in Web Pages without Resizing Them – Google Maps Image Viewer
Viewing Large Images – OpenLayers, GSIV, ModestMaps, DeepZoom, and Python « Itinerant Source

A filter for RichFaces tree using javascript

1. pseudocode: text box over tree, key press event calls a java script function which makes all tree nodes not containing the entered text invisible.
2. how RichFaces 3.3.2 implements a tree using TreeNodeAdapter (using tables and divs. Use DomNavigator firefox plug-in to investigate how RichFaces renders a tree).
3. using jquery and source code.

Saturday, December 5, 2009

Eclipse content assist and project natures

Well... I took till 4 A.M. but I found the problem.
In eclipse with JBoss Tools plug-ins installed I want to edit a .jsp page with editor of jboss tools. And the content asist do not work for ELs. For example if you have something like this

<h:outputText value="#{...}" ...


you expect the content assist to work inside the braces to show you for example your beans etc.
But it didn't work. After searching and searching, deleting the whole workspace and setting it up again, and lots of other crazy trial and errors, I realized that it is a project specific problem i.e. the content assist works in other projects.
After comparing the .project files in two projects I see the following lines are missing in my .project file in natures section:

<natures>

...

<nature>org.jboss.tools.jsf.jsfnature</nature>

...

</natures>

Do not forget the form

I think ajax-enabled html needs a form around it to work.
A typical scenario: I put a richfaces tree on the html page with the hope that when i click a node, the content of another area of page is updated (using ajax).
I looked over existing samples on richfaces demo site, and it looked not so complicated. But, as alway...IT DOESN'T WORK ;(
After a while, trying everything out and being quite upset, I changed the switchMode of the tree from "client" to "ajax" just to see what happens.
And I got an error message indicating that this poor tree cannot find its FORM
You can imagine how angry I was, when i realized that i've forgotten to put ... tags arround my page.