cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <ive...@apache.org>
Subject Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]
Date Thu, 23 Jan 2003 14:44:30 GMT
Excelent document.

I would like to suggest a slight improvement.
The Model part can be improved quite a bit if you use a DOM object directly
instead of a JavaBean wrapper.

more specificly:

1) You can remove ArtistBean altogether
2) Store the empty id structure in a static file or local constant
3) Override the getForm() method in the action
4) Use the JXPath DOMContainer to load the xml file(constant)
5) Use the DOMContainer object as the Form model
6) When you need to reference a node in the model, instead of using the DOM
API, you can directly use XPath,
like this: getForm().getValue("/@id")


If you follow these steps and I am not totally wrong, you should be able to
cut about 50 lines from the sample.


-=Ivelin=-

----- Original Message -----
From: "Josema Alonso" <josema@simbiosystems.com>
To: <cocoon-users@xml.apache.org>
Sent: Thursday, January 23, 2003 2:42 AM
Subject: RE: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]


> Ouch...I forgot to include the URL. I'm sorry.
>
> http://wiki.cocoondev.org/Wiki.jsp?page=XMLFormXindice
>
> Thanks :)
>
> -----Mensaje original-----
> De: Ivelin Ivanov [mailto:ivelin@apache.org]
> Enviado el: jueves, 23 de enero de 2003 4:24
> Para: cocoon-users@xml.apache.org
> Asunto: Re: XMLForm Xindice Howto added to Wiki [please, att. Ivelin]
>
>
>
> What is the URL?
>
> -=Ivelin=-
>
>
> ---------------------------------------------------------------------
> 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:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>


---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message