I am implementing custom JSF component renderer (namely org.primefaces.component.messages.MessageRenderer
) and would like to add output new dialog to be opened when user clicks on messages.
I understand that I can just add all needed HTML / CSS / JS right within encodeEnd
method by hand but that it will be a waste as we already have a Dialog component for that.
My question is: how to programmatically construct and add to output new JSF component (dialog in my case)? I assuming we can made it interact with existing elements by specifying proper attributes.