Form Tool
So I got tired of not having a "low-dependency" HTML form tool that allowed for structured form data. Form Tool gets born. It basically takes a Properties file (made it Properties as it relies on everything being a String) and builds an object graph from it. Starting with the properties:
It will build graph of objects for you that will play nicely with JXPath and BeanUtils variously. Accessing the model directly works like:one.two.three = normal a.b.c = special one.two.four = other a.two = never
Right now I am playing with making it play nicely with BeanUtils, but as I am not super familiar with BeanUtils inner workings yet I haven't messed with nested properties, or really even making copy props work (need to investigate its inner workings). I may wind up reimplemting somehting like it to do bean population, particularly if I want nested stuff (ie, copying properties from graph to graph).Model model = new Model(props); // Where props contains the above mentioned properties model.getRoot().getChild("one").getChild("two").getChild("three").getValue(); // == "normal" // or more conveniently for BeanUtils model.getRoot().getChild("one").getChild("two").get("three"); // == "normal" model.getRoot().getChild("a").get("two"); // == "never"
Think I will see if a Jakarta-Commons-er knows enough to point me the right way on copying graphs - would be very convenient if I didna have to reimplement. So many people are stuck using BeanUtils anyway anymore (as was best put by someone else, commons-* libraries are like warts -- they are all so codependent it hurts).