jsf - Default getClientId behavior of UIComponentBase -


i have general question default behavior of getclientid(context) in uicomponentbase. got "duplicate id" error , figured out happening during component tree creation:

  1. my component (which inherits uicomponentbase) created
  2. getclientid(context) being called id == null , clientid == null. makes getclientid() use viewroot naming container create id used clientid. in respect case id == null , clientid == null makes sense me because it's can @ moment.
  3. the id assign component in .xhtml set (which in turn resets clientid null).
  4. getclientid called again. component still has no parent makes getclientid(context) use new id clientid
  5. after step, component tree creation sets parent of component
  6. finally component tree construction calls getclientid again. @ moment component has id and clientid. because of that, default getclientid not update clientid wrong point of view.

actually default getclientid can never adapt clientid (new) parent if clientid has been set before parent. confused right now, because unexpected me , took me 2 days debug. question is: wrong? can't use default getclientid in way trying? or there problem order of component tree creation must not happen reason?

my used version of getclientid(): getclientid source

thanks :)


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -