is going to and what model is taken from the parent?
johan
On 3/15/06,
karthik Guru <[EMAIL PROTECTED]> wrote:
Ok its pretty basic but I havent been able to figure out why i am not able to get CompoundPropertyModel work for me.
Class BasePage{
Account getAccount( ){
}
}
Class MyPage extends BasePage{
MyPage(){
Form form = new Form();
form.setModel(new CompoundPropertyModel(this));
form.add(new Label("account.username"));
form.add(new PasswordTextField("account.password "));
form.add(new AccountFieldsPanel("accountFields"));
}
}
public class AccountFieldsPanel extends Panel {
public AccountFieldsPanel(String id) {
super(id);
add(new Label("account.firstName"));
add(new Label("account.lastName"));
add(new Label("account.email"));
add(new Label("account.phone"));
}
}
Fields in the AccountFieldsPanel are showing up blank. The fields in MyPage (account.username & account.password) show up just fine.
The AccountFieldsPanel is not calling getAccount( ).getFirstName( ) for example - i checked this thro debugger. Account object has all the attributes and it is being picked from the Session. For some reason am not able to get the AccountFieldsPanel to use the MyPage as its Compound model.
Any idea where i might be going wrong?
-- karthik --