BackingBean to another Backing Bean help
I am trying to do this:
I have a table in p1 and a table in p2. I have add and edit buttons on first page (P1). To select a single row using a radiobutton. I used BaluC's artticle on his website to solve that problem (thanks to him for posting that solution). To separate the page logics (like add /delete/edit) in each page, I used two backing beans to make it look cleaner. I am able to get the add functionality work fine. Now the problem is doing the edit on the p1. It does take to the second page.
<code>
public AddBean getAddBean() {
if(addBean == null)
addBean = new AddBean(selectedGroup);
return addBean;
}
</code>
The selectedGroup is not null when the user clicks the edit button. I am able to print the variables for selectedGroup. but in the bean constructor I see the oject that is being passed is null;
in the p2, I am accessing like
<code>
<h:inputText value="#{GroupListBean.addBean.name}" />
</code>
<code>
public AddBean(MyObject g) {
System.out.println("const called");
group = g;
if(g!= null) {
System.out.println("group not null");
name = g.getName();
}
}
</code>
What am I doing wrong?

