This content has been marked as final. 
    
Show                 3 replies
    
- 
        1. Re: Component j_id22 not instance of org.richfaces.componentdmitry.demyankov Nov 9, 2007 7:49 AM (in response to nevez)I think you should use HtmlDropDownMenu menu = new HtmlDropDownMenu(); and return type should be HtmlDropDownMenu as it is shown in Developer Guide (see 6.41.4. Creating the Component Dynamically Using Java)
- 
        2. Re: Component j_id22 not instance of org.richfaces.componentnevez Nov 9, 2007 9:16 AM (in response to nevez)I tried, but it doesn`t work, could there something be wrong with classloading ? 
 I find out that jboss-service.xml should have a UseJBossWebLoader property, but i cant find the property anywhere and where to put it.
- 
        3. Re: Component j_id22 not instance of org.richfaces.componentnevez Nov 12, 2007 7:29 AM (in response to nevez)I solved the problem, as i suspected there was a problem with classloading, in \jboss-4.2.0.GA\server\default\deploy\jboss-web.deployer\META-INF\jboss-serice.xml 
 i changed "UseJBossWebLoader" to true and used the following code to create component:private HtmlDropDownMenu menu; public HtmlDropDownMenu getMyMenu() { if (menu == null) { Application app = FacesContext.getCurrentInstance().getApplication(); menu = (HtmlDropDownMenu) app.createComponent(HtmlDropDownMenu.COMPONENT_TYPE); menu.setValue("File"); ..... } return menu }
 
    