On 14.Feb.2003 -- 02:07 PM, Josema Alonso wrote:
<snip/>
> In this how-to I explored new ways of storing the form model. This new way
> the XML model is stored in a file in the system with an empty structure.
> Then it is loaded into a JXPath Container and manipulated from there. The
> getFormModel() is overriden so you don't need a Bean, but just the file.
>
> Ivelin thought this could be a great addition to the framework, so we were
> discussing how to make this available for the end user.
>
> We exchanged some ideas and they led us to incorporating some mechanism to
> the sitemap. We were thinking about a prefix. This way, passing the model
> parameter to the form would be like this:
> <map:parameter name="xmlform-model" value="java:MyBean"/>
>
> The 'java:' prefix would be used for java models. If you would like to use
> the pure XML model approach you could do something like:
> <map:parameter name="xmlform-model" value="xml:MyDocument"/>
<snip/>
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.
Chris.
--
C h r i s t i a n H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
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]>