cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject MVC, Struts and Cocoon (was: We need a forms taglib)
Date Sat, 21 Oct 2000 02:38:59 GMT
On Fri, 20 Oct 2000, Ulrich Mayring wrote:

> Hello,
> some time ago various people professed to be working on a forms taglib.
> Are any of these projects finished? If not, perhaps you can send me your
> code and I'll try to incorporate into my bits'n'pieces.
> I think we need a forms taglib now, anyway I need it and have decided to
> spend a little time on this. I do know about the fp:if-post and
> fp:if-get in the fp taglib and will try to incorporate them, but I think
> there was more.

What sort of functionality are you looking for?

My question is really: are you interested in forms as a navigational
device, or as a data collection device?

By navigational, I mean using forms to control where the user visits
next. By data collection, I mean simple "enter your name, age, ..." type

If you're using forms for navigational purposes, then the Jakarta Struts
project may interest you. Struts implements an Model-View-Controller
framework ( Now before
everyone disregards Struts on the basis of it's association with JSP
("eeww!"), and starts preaching the SoC purity of Cocoon, let me say:

The core of Struts that implements the MVC pattern is *independent* of JSP.

The JSP form taglib that Struts provides is just one way to talk to the
Struts core MVC engine. To quote Craig McClanahan, the designer:

>> In general, the MVC framework part of Struts 
>> can clearly be used by itself, even if you do
>> not use the form based tags (or even if you 
>> use something besides JSP to render the user 
>> interface.
 -- (

So we could probably create a Cocoon navigational-form taglib that does
exactly what the JSP taglib does, ie talk to the Struts MVC core.

For "data collection"-type forms, there is possibility for creating a
taglib to automatically populate a bean with form data, ala <jsp:useBean>
tags. Struts has this too, I think. A Cocoon version would be very nice..

	<form:populateBean name="foo">
		<form:setProperty name="attr1" property="propertyattr"/>

	<form:populateBean name="foo">
		<form:setProperty name="*"/> <!-- populates any bean
attributes which have corresponding set request parameters -->

IMHO, Cocoon is great for single complex pipelines, but provides nothing
for website structure and navigation. For that, current opinion seems to
favour the Model-View-Controller pattern, which Struts provides.

Has anyone out there been using Struts and Cocoon together?


(DISCLAIMER: I have used Struts only minimally. I hope I haven't
misrepresented anything)

> Ulrich
> -- 
> Ulrich Mayring
> DENIC eG, Systementwicklung
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message