Monday, January 16, 2006

Day 5: Web Framework I Need

Previous: UI Stuff

So Facelets documentation says it takes our html and when it sees a tag with jsfc attribute it creates corresponding JSF component for that tag. It takes string from jsfc attribute as a component's tag name. And this appears to be a problem.

What it means is that for this scheme to work, for every custom component I made I have to create a corresponding Tag class and register it within XML configs somewhere. Could Facelets work another way? And as I aimed to create some custom components like MessageList etc. - I will end up creating tag classes for every new component, registering them in some xml, and who knows what else. This is just unnecessary. A better way would be if I would be free from all this stuff.

For JSF html templating mechanism, I will use my library which I will publish soon. It will let me to:
  • Create MessageList JSF component which will take my list of Messages and present it to the user;
  • Create ListItem component which will be a child element of HTML list;
  • Create KnowledgeExchangeViewHandler which will give control to MessageList if user asks for it in request;
  • That’s basically all.

Correction: Facelets actually works slightly differently. See https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-create-component.

Next: Help Me Improve

No comments: