-
1. Why does my a4j:commandButton not work when not rendered on pageload?
ilya_shaikovsky Mar 11, 2011 1:52 AM (in response to hurzeler)1 of 1 people found this helpfulbecause #{showpnl} should be preserved between requests. And in your case it's probably request scoped variable. see FAQ for more details.
-
2. Why does my a4j:commandButton not work when not rendered on pageload?
hurzeler Mar 11, 2011 7:06 AM (in response to ilya_shaikovsky)Thanks for you response but I don't think that is what the problem is. The showing and hidding of the outputPanel actually works perfectly. The inputText box and the commandButton show up quite nicely except that the button is not functional unless it gets rendered first up. Perhaps I am missing something. What FAQ are your refering to?
-
3. Re: Why does my a4j:commandButton not work when not rendered on pageload?
hurzeler Mar 11, 2011 6:02 PM (in response to hurzeler)Hey look at that! IIya was right after all. I added a little bean (SEAM) to hold showpnl and set the scope to Page and voila the commandButton works!
@Name("testBean")
@Scope(ScopeType.PAGE)
public class TestBean
{
private boolean showpnl = false;
/**
* @param showpnl the showpnl to set
*/
public void setShowpnl(boolean showpnl)
{
this.showpnl = showpnl;
}
/**
* @return the showpnl
*/
public boolean isShowpnl()
{
return showpnl;
}
}
All references to showpnl in the JSF page become #{testBean.showpnl}
It is still not clear to me why the scope of the parameter that is used to determine is a section is renders makes any difference to the commandButton.
BTW My condolences to all the affected people in Japan. Our thoughts are with you!
-
4. Re: Why does my a4j:commandButton not work when not rendered on pageload?
ilya_shaikovsky Mar 12, 2011 9:15 AM (in response to hurzeler)It is still not clear to me why the scope of the parameter that is used to determine is a section is renders makes any difference to the commandButton.
Because the container of the command button getting not rendered so child components not decoded and events not fired.
Please follow the http://community.jboss.org/wiki/CommonAjaxRequestsProblems#conditionalRendering section. And the livedemo page linked there also contains detailed description.
-
5. Re: Why does my a4j:commandButton not work when not rendered on pageload?
logan.mauzaize.infotel.com Feb 13, 2012 6:20 AM (in response to ilya_shaikovsky)Hi,
The container WAS rendered, so JSF/RF should remember it has been rendered from the restore view phase and until the start of render response one.
Another question is why RF doesn't consider the forced "execute" on a ajax event (such as com.sun.faces.context.PartialViewContextImpl.getExecuteIds() implementation) ?