Helllo,

In order 'choose' an unique prefix, why not re-use a common way to
create unique names in Java: Use a package-structure.
There for until it can be configured in the web.xml how about using
"org_apache_myfaces_" as the clientID-prefix.

I know it's not as short as "_id", but I seriously doubt anybody using
that ID for a component in their application. ( Except possibly the
myfaces-examples-application )

Just my thought.

With kind regards,
  Marco Beelen


 

-----Original Message-----
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: vrijdag 20 april 2007 17:11
To: MyFaces Development
Subject: Re: MyFaces and HTML 4.01

I did a quick search, and this issue has come up at least twice
before, but the responses to keeping the current behavior were
unconvincing.

5/20/2005  Serious problems with MyFaces ID allocation which is not
conform to XHTML!
7/12/2006  w3c Markup validator does not like generated ID's after
MyFaces version 1.1.1

There's nothing in the spec that says we must use underscore (_) for a
clientID prefix.   In fact, the spec (and javadocs) are pretty clear
that we can provide any prefix we like so long as it is "unique".
It's also recommended that it be short :-)

Now a server-side id limited to [A-Z_-].  What are the limitations of
a client-side id for xhtml and html?   Maybe there's another character
we can use that's not allowed in a server-side id.  I know that colon
is also allowed client-side.  Either that or we pick something and
hope users won't use the same prefix, like mc_, mf_, mm_, zz, or qq_.

Finally, I proposed on the other thread that we allow the web.xml file
to define the unique prefix.  Unfortunately, I noticed now that the
value has been declared final.  It might still be possible to allow
the user to configure it at startup, but that will probably make it
more difficult.


On 4/20/07, Simon Lessard <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> This thread is a follow-up for [EMAIL PROTECTED] thread about
HTML 4.01
> compliance. As mentioned in that thread, JSF spec requires implementor
to
> provide a HTML 4.01 compliant renderkit (Section 8.5). However, both
JSF RI
> and MyFaces cannot currently ensure that. One of the reason is the
prefix
> used for generated ids. Currently UIViewRoot.UNIQUE_PREFIX_ID = "_id".
> However, W3C does not allow ids starting with an underscore (see
> http://www.w3.org/TR/html401/struct/global.html#h-7.5.2 and
> http://www.w3.org/TR/html401/types.html#type-name ).
>
> Therefore, I think the value of UNIQUE_PREFIX_ID should be changed to
> something like "mf_id" in order to comply with the spec, even if RI
does
> not.
>
>
> Regards,
>
> ~Simon
>
>
> Original thread can be found at
>
http://mail-archives.apache.org/mod_mbox/myfaces-users/200704.mbox/brows
er,
> thread named XHTML Strict
>




------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is 
available at http://www.merck.com/contact/contacts.html) that may be 
confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this 
message. If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then 
delete it from your system.

------------------------------------------------------------------------------

Reply via email to