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:
- my component (which inherits
uicomponentbase
) created getclientid(context)
being calledid == null
,clientid == null
. makesgetclientid()
use viewroot naming container create id used clientid. in respect caseid == null
,clientid == null
makes sense me because it's can @ moment.- the id assign component in .xhtml set (which in turn resets clientid null).
getclientid
called again. component still has no parent makesgetclientid(context)
use new id clientid- after step, component tree creation sets parent of component
- finally component tree construction calls
getclientid
again. @ moment component has id andclientid
. because of that, defaultgetclientid
not updateclientid
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
Post a Comment