tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Lewis Ship" <hls...@gmail.com>
Subject Re: svn commit: r492313 - in /tapestry/tapestry5/tapestry-core/trunk/src: main/java/org/apache/tapestry/internal/parser/ main/java/org/apache/tapestry/internal/services/ main/java/org/apache/tapestry/internal/test/ main/java/org/apache/tapestry/servi
Date Fri, 05 Jan 2007 00:06:43 GMT
Massimo ---

I'm not following you; you can stil have your "contract" with the UI
developers.  It's just "t:id" instead of "jwcid".  If you want to keep your
HTML minimal, it's just a matter of using @Component elements in the Java
code to flesh out the template placeholders with type and additional
parameters. Not much different from T4, except you manipulate Java
annotations instead of XML.

Martin --

This was the "battle I lost" for Tapestry 4.  It's a kind of trade off, a
bit of ambiguity on what hand (as in, "just what exactly will that parameter
do with a plain string?") vs. a bit of redundancy
(validate="validate:required" seems a bit redundant).

On 1/4/07, Martin Strand <do.not.eat.yellow.snow@gmail.com> wrote:
>
> Perhaps the @Parameter annotation could simply have a defaultPrefix
> parameter:
>
> @Parameter(defaultPrefix="validate")
> IValidator validate;
>
> @Parameter(defaultPrefix="prop")
> Object value;
>
> <input type="text" validate="required" value="someProperty"/>
>
>
> But you'd still be able to use any prefix explicitly:
> <input type="text" validate="prop:customValidator" value="someProperty"/>
>
> Martin
>
> On Thu, 04 Jan 2007 23:41:37 +0100, Massimo Lusetti <mlusetti@gmail.com>
> wrote:
>
> > On 1/3/07, hlship@apache.org <hlship@apache.org> wrote:
> >
> >> Author: hlship
> >> Date: Wed Jan  3 13:41:45 2007
> >> New Revision: 492313
> >>
> >> URL: http://svn.apache.org/viewvc?view=rev&rev=492313
> >> Log:
> >> Remove ClasspathAssetSource, moving its functionality to AssetSource.
> >> Allow for "invisibile instrumentation" inside component templates.
> >> Allow page ("root component") templates to be stored in the web
> >> application root.
> >
> > One thing.
> >
> > With the old template mechanism from T4 i can sign a contract with my
> > web designers to have them name a 'component' on a page 'username' and
> > to keep it a <input type="text"> HTML element, then i can manipulate
> > it with java and xml .page bindings, so i end up with HTML templates
> > with just jwcid added and no more bloat for the web designers but i
> > can still control the whole behavior of the page.
> >
> > With T5 this seems no more possible, i mean this syntax is by far more
> > preferable then the first one but not like the one from T4. I need to
> > instruments the designers to learn this parameters or have me or
> > another developer do some glue-code every time a designer changes
> > something, at the end they're not so independent with respect of GUI
> > appearance and I'm a 'slave' of their changes.
> >
> > I understand that there is to be a merge point between the two
> > factions but from my experience designers are less in tilts to type
> > then developers.
> >
> > I take this with respect to:
> >
> http://tapestryjava.blogspot.com/2007/01/latest-t5-snapshots-invisible.html
> > which this post would have been a comment.
> >
> > Anyway, i would like to suggest a different way to go. One could be to
> > add more knowledge to the annotation side of the 'bindings' while keep
> > the (X)HTML side as clean as possible.
> > Add the "validate", "type", "value" knowledge to the Parameter
> > annotation instead of the template markup, after all doesn't these all
> > are of interest and care of the developer?
> >
> > I hope to have been been clear enough with my thoughts :)
> >
> > With best regards.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message