I want to dynamically create object of HtmlDivElement in my jsf managed bean and add it to panel but it seems that HtmlDivElement is interface. So, how can i do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a pretty major confusion. The
org.w3c.dom.html.HTMLDivElementis not a JSF component. This represents a W3 DOM element which has an entirely different purpose (JAXP, DOM parsing).You need a subclass of
javax.faces.component.UIComponent(just click your way through the “Direct Known Subclasses” in the aforelinked Javadoc to find them all). To render a HTML<div>element, just useHtmlPanelGroupwhoselayoutattribute is set toblock.which does effectively the same as the following in “static” JSF: