• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not append ParentIDs to InputComponent  RSS feed

 
Dominik Müller
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi together,

in my JSF Project, i do some work with JavaScript. therefore i need a reference to some input fields.
I define a "name" attribute to those fields:



The Problem in this case is, that JSF append all Names of all parent NamedContainers to the name of the Inputfield
Because of the overlaying Structure (Form, DataTable, Columns) the Name looks like:

"projeect:0:j_idt26:1:timeInput"

The only way to deactive this behaviour is only for the form element (prependId="false") but all other Elements (datatablem, columns) still append there IDs
Is there any chance to define an absolut name of an input component?

Thanks a lot
D
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're confusing "name" with "id". And no, you can't override the internal JSF id generation mechanism. JSF needs it internally.

However, we do JavaScript against JSF objects all the time. It just takes the use of proper techniques to find the object in question.

I don't have a ready source for that information, but it's not too hard to find it if you do a web search on the subject of JavaScript and JSF Controls.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!