[JBoss Seam] - Component j_id22 not instance of org.richfaces.component.UID
by nevez
Hello, i`m trying to create richfaces components dynamically:
| import org.jboss.seam.annotations.Name;
| import org.richfaces.component.UIDropDownMenu;
| import org.richfaces.component.html.HtmlDropDownMenu;
| import org.richfaces.component.html.HtmlMenuItem;
|
| @Name("confTypeMenu")
| public class ConfTypeMenu {
|
| public UIDropDownMenu getMyMenu() {
| UIDropDownMenu menu = new HtmlDropDownMenu();
| HtmlMenuItem menuItem = new HtmlMenuItem();
| String subOption = "Sec. Change Passsword";
| menuItem.setValue(subOption);
|
| menu.getChildren().add(menuItem);
| return menu;
|
| }
|
and using it in my .xhtml:
| <rich:dropDownMenu binding="#{confTypeMenu.myMenu}"/>
and i get the following error when trying to acces page:
Component j_id22 not instance of org.richfaces.component.UIDropDownMenu
i`m using JBoss AS 4.2.1, and JBoss Seam 2.0.0
any ideas ?
TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102910#4102910
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102910
18 years, 7 months
[JBoss Seam] - Re: Problems retrieving nested conversation id
by jacob.orshalick
You have to understand the semantics of @Begin here. The @Begin annotation does not start a long-running conversation until the method execution completes. In your case the nested conversation will always begin as your return type is void, but if you were to have a String return type (for navigation) only a non-null return value would start the conversation.
The first case works because Seam always begins a temporary conversation if a long-running conversation is not in progress. Then if @Begin is encountered on a method and the method is void or returns a non-null value the conversation is *promoted* to long-running after method execution.
So to answer your second question, in order to retrieve the nested conversation id, of course the conversation must be in progress...
If your method needs access to the id you could either programmatically begin the nested conversation and then get the id, begin the conversation through s:conversationPropagation in the view, or begin the nested conversation through pages.xml navigation rules (my preferred approach).
Each of these approaches are described in the documentation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102908#4102908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102908
18 years, 7 months