I've checked these changes into the branch. I'm very happy with them,
the HTML is getting simpler and simpler.
Here's an example form:
<form t:type="Form">
<t:comp type="Errors"/>
<label t:type="Label" for="email">This isn't used</label>: <input
t:type="TextField" t:id="email" value="incident.email"
size="50" t:validate="required"/>
<br/>
<label t:type="Label" for="message"/>: <textarea
t:type="TextArea" t:id="message" t:label="Incident Message"
value="incident.message" cols="50" rows="10"
t:validate="required"> You can put text here, but it isn't used.
</textarea>
<br/>
<input t:type="Checkbox" t:id="urgent" value="incident.urgent"/>
<label t:type="Label" for="urgent"/>
<br/>
<input type="submit"/>
</form>
I kind of used all the options here. All the Tapestry specific
parameters are bound using the t: namespace. Thus:
t:validate="required" not t:validate="validate:required"
t:label="Incident Message" not t:label="literal:Incident Message"
t:for="email" not t:for="component:email"
I like the succinctness.
Yes, for a new component, you'll find that you need to "feel out"
which parameters need a prefix and which don't .... but I think that
it'll be natural. All I've been doing is saying: "if 99.9% of the
time, you would use prefix xxx: on that parameter, make xxx: be the
default binding prefix for that parameter". Thus Label's for
parameter is almost always going to be another component, so
"component:" is the default binding prefix.
The question is ... how to proceed from here? Dump it into the trunk?
Let is simmer in the branch a bit longer? Abandon the idea and run
screaming? Feedback please!
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]