Rendered problem in all JSF versions ?

[nobr]Hi All !

I made a simple application, and I tried in JSF1.1, in JSF1.2.

The problem is same.

...

<h:commandButton value="egy" action="#{csakbean.egy}" />

<br>

<h:commandButton value="ketto" action="#{csakbean.ketto}" rendered="#{csakbean.rnd}" />

...

and my "csakbean":

...

public String egy(){

System.out.println("egy...");

returnnull;

}

public String ketto(){

System.out.println("ketto...");

returnnull;

}

publicvoid setRnd(boolean param){

this.rnd = param;

}

publicboolean isRnd(){

double r = Math.random();

System.out.println("random: " + r);

return (r > 0.15 ?true :false);

}

...

I tried to click "egy" button, so sometimes "ketto" button is showed/rendered.

But: when I click "ketto" button, sometimes "ketto()" action DIDN'T EXECUTE !

This problem is same when scope of bean is request or session.

xesj[/nobr]

[1941 byte] By [xesja] at [2007-11-27 11:47:44]
# 1

I am not surprised by this behavior. During the Restore View phase, the rendered attribute is re-resolved and may be false when before it was true. When this happens the event for the button is not registered.

I can't speak to whether or not this is a bug, but it appears to be the as designed behavior. If you think it is a bug, pursue it with the vendor of the JSF implementation you are using.

RaymondDeCampoa at 2007-7-29 18:14:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

This is working per the specification. I believe this will be one of the issues addressed in JSF 2.0.

rlubkea at 2007-7-29 18:14:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Thank You !

I thought this feature is in the restore-view phase, when jsf recall rendered method...

xesj

xesja at 2007-7-29 18:14:59 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...