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: Default Tapestry page CSS
Date Tue, 02 Jan 2007 20:43:42 GMT
Have the first version of this in place, you get reasonably nicely formatted
errors (from the built-in Errors component).

I also just added some smarts to TextField, Checkbox and TextArea:

The value parameter is required but does not always have to be bound.  If
unbound, Tapestry will bind the value parameter of the component to a
property of the container (the page) that matches the component's id.  Thus:
  <t:comp type="TextField" id="userName"/>
and not:
  <t:comp type="TextField" id="userName" value="userName"/>

Thus we Do Not Repeat Ourselves.  Of course, id is optional, but you'll
likely want to specify it so that you can inject it into the page, or at
least, so that it has a reasonable client side name and id (i.e., "userName"
is preferrable on the client side to "textfield").

A similar process is in place for the label. If not bound, it sees if the
container defines a label key in its message catalog, i.e., "userName-label"
and uses that key.  If not, it converts the logical name to a user
presentable name ("User Name") and that becomes the label.  Or you can bind
it explicitly.

This is fun; I can reflect back on all the trainings I've done, and all the
overwhelmed, dazed students.  Newbies just want to know what to do, they
don't want to know the theory.  These approaches are "best practices" via
naming conventions (rather than configuration), with the configuration
approach on hand for any extra-ordindary cases.

Basically, we'll be providing more "bang for the buck" for people's first
forays into Tapestry.  That's worth a lot!

My game plan for the next week or so:
1) Select, Radio and PasswordField components
2) Invisible instrumentation in templates, and allow templates in the
context
3) More translators and validators, including many missing T4 features
4) Start creating some basic tutorials and more screencasts

The longer term stuff:
- Javascript/Dojo integration
- client-side field validation
- Loop state management inside Forms
- BeanForm type functionality
- Spring/Hibernate integration
- Portlet support (5.1 ?)

I'd be very interested in seeing some documentation about the PageTester
from Kent.


On 12/31/06, Howard Lewis Ship <hlship@gmail.com> wrote:
>
> I'm stumbling through creating a default Tapestry 5 CSS style sheet.
>
> I'd like all Tapestry pages to have a "decent" simple L&F out of the box.
>
> My goals are to have some simple styles inlcuded automatically as the
> first style <link>.
>
> The styles will either have a "tapestry-" prefix on the CSS class, or have
> no class linkage.
>
> Users will be able to provide overriding stylesheets, or inline <style>
> elements, to avoid the Tapestry default styles.
>
> Any help or suggestions on this are welcome!
>
> --
> 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




-- 
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