On Tue, 4 Jan 2005, Sean Schofield wrote:

I wanted to kick off a new thread dedicated to my proposed solution
that would allow the JSP developer to indicate whether they wanted to
"force" the use of the id attribute supplied (instead of using the one
generated by the component.)

The first thing is to square away the name of the attribute.  It has
been suggested that we could use an attribute named "directId" or
"styleId".  StyleId would be in keeping with Struts but I personally
allways found that to be confusing.

After thinking about it, I concluded that we probably don't want
either of those choices because they would necessitate writing the id
twice.

ex. <h:input id='foo' ... directId='foo' />

... Or sometimes using id and sometimes using directId.

I think a better alternative is to have an attribute that is
true/false.  I would suggest either one of the following
"override","overrideId", "force", "forceId".

ex. <h:input id='foo'  ... force='true'/>

My personal vote is for 'force'.  Do people agree with the true/false
approach?  If so, which attribute name do you think we should use?

The approach is fine, but I don't like 'force' because it says nothing about what it applies to. I'd prefer 'forceId' or maybe even 'useIdAsIs'.


--
Martin Cooper


TIA,
sean

Reply via email to