Hello,
I would like for my rendered <input> tag to have the "name" attribute explicitly set to some value for example: "email" without any colon of course.
I understand the clientID is rendered as the "name" attribute. My question is then: how do I set the clientID of my inputText (preferably from the facelets code)?
Thanks in advance for your help,
Julien.
The name of the component is composed for the form_name:component_name, if for some reason this does not work for you, you can remove the form name and the colon setting the prependId attribute of the form to false like this:
Regards
Cesar
When a dream is ending because to come true - OCPJP 6,7. OCE JPA EE6. MCTS
The internal name (seen by JavaScript) of a JSF component ID is always going to contain those colons and higher-level qualifiers.
That's because certain JSF components act as naming containers which simply means that IDs within the naming container - for example, the form - must be unique, but the ID itself does not need to be unique globally in the view. JSF knows how to find the appropriate component using a simple ID, but JavaScript (client-side code) doesn't, which is why JavaScript must reference the fully-qualified ID, which includes the IDs of its surrounding naming container(s).
Customer surveys are for companies who didn't pay proper attention to begin with.
Julien Martin
Ranch Hand
Joined: Apr 24, 2004
Posts: 383
posted
0
Thank you all for your replies.
Julien.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.