You're right, my examples are obviously not MVC-compliant. And I fear that
so might be my *real* example, the one I needed the writeMethod tag for, far
too complicated to explain here ;) .
Seeing there was no 'writeMethod' tag in the JSTL made me suspicious about
my architecture but I still hoped that was a flaw on your side (I mean the
jakarta project)... As to my taglib, it doesn't deserve to be hosted (and I
thought so even when it was still potentially MVC-compliant) : I just wrote
a simple "beta" version of it, hoping (once again) that you would have a
real version for me.
Thanks for your nice answer, anyway.

David

----- Original Message -----
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 22, 2002 3:17 PM
Subject: Re: 'Method call' taglib


> Struts is designed to encourage a MVC-type architecture, and a tag like
> this goes against the MVC grain :)
>
> Generally, the type of facts you are exposing here is something that
> many people would tend to determined in the Action, and then pass along
> to the presentation page, ready for output. The presentation page
> shouldn't really care if the users are the same age or a particular age,
> but be focussed on what it suppose to be output given the state behind
> these facts.
>
> So the bean might have a property like usersSameAge, where the Action
> had already compared user and user2. Or userMiddleAge, where the Action
> had already done the math.
>
> If you'd like to have tag like this hosted somewhere, you might consider
> taking a look at the Jakarta Taglibs subprojects. Most of our bean tags
> could actually be hosted there, especially now that bean-util is in the
> Commons.
>
> It's also important to keep an eye on the JSTL for future trends, which
> is also hosted at Taglibs.
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Java Web Development with Struts.
> -- Tel +1 585 737-3463.
> -- Web http://www.husted.com/struts/
>
>
> GRENET David wrote:
> >
> > Hi everybody,
> >
> > I just subscribed the list, so please excuse me if what I'm writing has
already been discussed.
> > Using struts, I felt the need for a "bean:write"-like tag that could
display not only properties but the result of any method call (with its
parameters and all). Where 'bean:write' would allow  :
> > <bean:write name="user" property="fullName"/> instead of
<%=myUserBean.getFullName()%>
> > ,the 'bean:write'-like tag would allow :
> > <bean:writeMethod name="user" method="isSameAge(user2)"/>  or
<bean:writeMethod name="user" method="isAge(42)"/> instead of
<%=myUserBean.isSameAge(myOtherUserBean)%> or <%=myUserBean.isAge(42)%>
> >
> > Thus, I made a very simple version of such a tag where you can give as
parameter  : struts-beans (=belonging to one of the 'scope' collections),
strings and numbers. My question is : do you plan to have such a tag in a
future release ? Do you already have it ? Or is the method call idea just
not what beans are for ?
> >
> > Thanks for your answer(s).
> >
> > David
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to