Hello, Chris. > I wonder if it would be easier and cleaner to have different actions > depending on the model (e.g. bean / dom) like you demonstrate on the > wiki page or at least two different parameters for specifying the > model. Automagic is fine but hiding the information whether it is a > class to instantiate or a source to read seems to be wrong IMO.
Well, I'd go further, I just don't like automagic. In fact, I had a working form where you should not write any Java code but the perform() method. Connection to the Xindice DB was done by the XMLDBTransformer. I was thinking about extending it more to some mechanism that would create the Action, too so you won't need to write the Java code, but I gave up cause I didn't like it. You end up coding complex logic in XML (XSP and such), and I don't want XML for that. I like Java for that. But why do you think the proposed way is hiding the model? The model parameter is clearly coded in the sitemap, so the contract between model and form is declared clearly there. If you mean the SourceResolver would hide where the model really is, well, we just take advantage of the Cocoon protocols for locating the model, and I think that's good and very flexible. You can use this mechanism to do bad things...maybe, but just don't do it ;-) If you like more than one parameter for the model can you tell us what for? Would you like to have more than one model per form or just different representations of the same model, i.e., javabean and xml file? I'm curious cause someone already mentioned this feature previously about the W3C forms. Anyway, this point could be a step beyond the change I proposed. I like the discussion going on in this thread, you are all sending in nice ideas and I'm learning a lot. Best. ps: OT: I'm not getting some of the messages from the list while I get some of them twice or more, anybody else? --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>