Saturday, February 20, 2010

Finally getting somewhere...


I feel like we are finally getting somewhere. Now that we figured out what files we were working with, we are actually getting somewhere with the ticket. After spending some time trying to figure out jsp syntax, I finally got the conditional statement to work.

We were just trying to figure out how to test the obs as the page was looping through them to see if they were of the complex datatype.The first issue with that was that we didn't know how to write a conditional statement in jsp. We found out that an if/else statement is actually written as a when/otherwise statement.

So after we figured out the syntax, we had to figure out how to test for a complex datatype. I found out that each concept has an integer variable called conceptDatatypeId, and that (as far as I can tell) complex datatypes hold the integer value 13. I have been trying to get on IRC to make sure that my assumptions are correct, but I haven't been able to get anyone on there yet.

The issue that I think I have now is that this value (13) is the same regardless of what type of complex datatype (image or text). So I think that I'm going to have to find another way to test the obs.

I also found some good code for a popup preview image. I got it implemented (after fighting with it for a while!), but I'm not even sure that it's exactly what we want. I have it set to popup the image when you hover over the small note (note icon now, we need a small pic icon or something) icon. Also, the value is a link to the data the observation holds. This is what they basically wanted; now we just need to iron out a few of these issues.

The other issue that we have is how to handle thumbnails/preview images. The ticket mentions that they wanted a preview/thumbnail to popup (right now the popup shows the picture (original size)). So I know Dr. Matocha mentioned that we might have to figure out how to generate a re-sized thumbnail version as the image is uploaded. Honestly, I haven't the first clue on how to do this. I spent some time reading through the image handler class, and I kind of understand what is going on but not completely.

To do:
1. Figure out how to test for which handler the complex datatype uses
2. Figure out how to generate a thumbnail when an image is uploaded
3. Make a small icon to replace the note icon

2 comments:

  1. Hi Tyler. If no one is available in IRC when you stop in, you should write a short note to the developer mailing list with your question. It is active around the clock and you're much more likely to get a prompt response.

    Michael

    ReplyDelete
  2. Man, you've made some serious progress! I still find the "when/otherwise" syntax fascinating. It makes sense if you think about it, linguistically, but that they would break the trend is unusual.

    ReplyDelete