certainly, though it boils down to extremely simple scenario:

bean1 (scope="request"):
public String testAction() {
        System.out.print("Test Action");
        return null;
}

bean2 (scope="request"):
private boolean show = false;
public setShow() {
        this.showMe = true;
}
public boolean showMe() {
        return this.showMe;
}

jsf page:
....
some code that calls bean2.setShow
....
<h:commandButton value="Test Me" action="#{bean1.testAction}" 
rendered="#{bean2.showMe}" />


the above is enough to reporoduce the behaviour (nothing will 
be written in the log/stdout



On Saturday 23 December 2006 21:44, Behrang Saeedzadeh wrote:
> Marek,
>
> Could you please post the source code for your page and backing beans?
> It is very difficult to guess what is probably wrong in your case.
>
> Also consider adding a <h:messages showDetail="true" /> to your page.
> That might help as well.
>
> - Behi
>
> On 12/23/06, Marek Zachara <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I have a scenario which seems to be trival, so i guess i must have missed
> > something obvious, but still i cant seem to find a solution
> >
> > on a page i have a sample form with a command button connected to the
> > backing beans:
> > <h:commandButton value="Test Me" action="#{bean1.testAction}"
> > rendered="#{bean2.showMe}" />
> >
> > both bean1 and bean2 have scope=request
> >
> > now, bean2 is created during the generation of the page,
> > and method isShowMe() returns true;
> >
> > the button is displayed. i can click it, though to my surprise
> > the action is not called (i have put a log message in testAction to
> > verify that). Even the bean1 itself is not created.
> >
> > as i have found out, this is due to the rendered attribute - when
> > i set it to true or bind it to a some method in session bean, everything
> > works fine. The bean2 is destroyed after generation of the page with the
> > button, so it seems as it is trying to access it nevertheless after
> > the button is clicked, fails and as a result the whole action fails.
> > I have tried it also with attribute immediate="true" , but with no
> > success either.
> >
> > i will really be glad if anyone can help me out :)
> >
> > Marek

Reply via email to