Howard Lewis Ship wrote:
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".

It looks  great ! mostly...

I have a doubt about any parameter which yealds output to the user, and would like to suggest all such parameters should NOT have default binding.

Here you use label with default prefix literal.

because on 99% of the time you use literal: to prefix label.

In my case, I use 100% of the time the message binding: prefix, never the literal, maybe for prototyping...

the same would be with shell's title ( if still exists ) and so on...

So I would plead on:
either decide on a convention: all string parameters are literal.
or leave them as prop.

I think also literal: prefix for label is not a "best practice"...

all other seem to me very straightforward in the example - it look really very clean !

cheers,
Ron


  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!



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

Reply via email to