Saturday, August 20, 2005

OpenLaszlo Prototype - Task Grid - No Love

The task grid for my web-based Project Management application, Ataraxis Unity, isn't coming together as easily as I thought it would. The task grid needs to be a mix of a "grid" and a "tree" with support for drag and drop.

When I first decided to use OpenLaszlo I figured I'd use the "grid" component for my task grid. But the task grid doesn't have any tree-like or drag and drop features, which is understandable, it's a grid. I briefly entertained the idea of extending the grid component and adding tree and dnd features. After I worked with the grid component a few times I wanted to pull my eyeballs out of my head, so I scratched that idea. (I've also removed the "grid" component from most of the screens on my prototype and replaced it with custom list-style views. Easier to work with, and they look better than the grid!)

Last week I started making the prototype for the task grid with custom views. Once I got to the part where I had to start thinking about how the subtasks would be shown and hidden I thought to myself, "Why not try and extend OpenLaszlo's basetree component." I extended the basetree component and used some of the code in the existing tree component to get started with my custom one. But after a day of hacking I just don't think I'll be able to get it to do what I want.

The problem I ran into is that the tree component indents all the "children" before their parent. Which is great, right? Well, not for this particular situation. I'm giving each row a background color, and as a result of the indentation, the grid has this silly upside-down staircase look to it. I also wanted to put a few static items to the left of each task row. Since each child/row of the tree is indented the static items are also indented and it just looks terrible. (I was also having some weird spacing and coloring issues. I didn't bother trying to tackle them because I was working on the indentation issues.)

Maybe I'm just not all that great of a programmer, but after about 5 hours of hacking I just couldn't get it to do what I want.

I did a search on the OpenLaszlo forum and it seems a few people have been able to custom role their own "tree" component. And it doesn't look like any of them were extending the basetree component. I think in my next work session I'll just sit down and try to figure out how to write what I want from scratch. So far, in OpenLaszlo development, that has yielded me the best results. (Except for the wicked-cool window component. I love that thing. :) )

0 Comments:

<< Home