-
15. Re: a4j:commandButton not working in facelet
ilya_shaikovsky Jan 5, 2010 9:50 AM (in response to waq)Secondly my last question, is keepAlive = session?
keepAlive works like conversation scope from Seam or viewScope from JSF 2.
and why it throws exception when i use keepAlive?
neither session scoped objects nor kept alive ones should be used to store component binding.
-
16. Re: a4j:commandButton not working in facelet
waq Jan 5, 2010 10:01 AM (in response to ilya_shaikovsky)then how to resolve this issue?
-
17. Re: a4j:commandButton not working in facelet
waq Jan 5, 2010 12:13 PM (in response to waq)The link provided by Nick tells that it can not be done using keepAlive. But i need to find some work around or some alternative for this bug.
-
18. Re: a4j:commandButton not working in facelet
waq Jan 6, 2010 5:38 AM (in response to yyq2009)yyq2009 wrote:
Hi, Waqas Arshad, I think your search button shuld be a non-ajax button, then after clicked the search button, the whole page will be refreshed, and in server side the <t:saveState/> knows what to be saved.
even this doesn't solved the problem......
-
19. Re: a4j:commandButton not working in facelet
yyq2009 Jan 6, 2010 6:57 AM (in response to waq)What problem, exception? -
20. Re: a4j:commandButton not working in facelet
waq Jan 6, 2010 7:16 AM (in response to yyq2009)yyq2009 wrote:
No exception.I changed search button frm ajax to jsf and place the t:saveState and put my dictionary list bean in the saveState but still action is not called.
-
21. Re: a4j:commandButton not working in facelet
yyq2009 Jan 6, 2010 10:24 AM (in response to waq)Show me some brief page code. -
22. Re: a4j:commandButton not working in facelet
waq Jan 6, 2010 10:32 AM (in response to yyq2009)<h:form id="search_form">
<a4j:region selfRendered="true" id="word_region">
<h:inputText id="search_fld" value="#{dictionary.word}" size="50" />
<h:commandButton value="Search"
action="#{dictionary.searchWord}"
reRender="detail_table, table_div" id="searchBtn" />
<h:selectOneRadio id="myRadio" value="#{dictionary.search_filter}"
styleClass="text" style="font-style: oblique;">
<f:selectItem itemValue="exact" itemLabel="Exactly" />
<f:selectItem itemValue="start_with" itemLabel="Start with" />
<f:selectItem itemValue="contain" itemLabel="Contain" />
</h:selectOneRadio>
</a4j:region>
<a4j:outputPanel id="table_div" layout="none">
<h:dataTable id="detail_table" var="dic" border="0"
rowClasses="even_rows, odd_rows" cellpadding="2" cellspacing="1"
rows="5" value="#{dictionary.dictionayList}"
binding="#{dictionary.dataTable}">
......
<h:column headerClass="datatable_width_detail">
<f:facet name="header">
<h:outputText value="" />
</f:facet>
<a4j:commandLink action="#{dictionary.showDetails}"
value="Detail" oncomplete="Richfaces.showModalPanel('panel')"
reRender="panel" />
</h:column>
</h:dataTable>
<br />
<rich:datascroller align="center" for="detail_table" maxPages="20"
renderIfSinglePage="false">
</rich:datascroller>
</a4j:outputPanel>
<t:saveState value="#{dictionary.dictionayList}" />
<rich:modalPanel id="panel" width="600" height="300"
autosized="true">
.....
</rich:modalPanel>
-
23. Re: a4j:commandButton not working in facelet
waq Jan 6, 2010 10:36 AM (in response to waq)sorry button does not contain re-render attribute. its
<h:commandButton value="Search"
action="#{dictionary.searchWord}"
id="searchBtn" />
-
24. Re: a4j:commandButton not working in facelet
yyq2009 Jan 6, 2010 8:01 PM (in response to waq)Remove the region tag or be sure that the <t:saveState/> is in region zone. -
25. Re: a4j:commandButton not working in facelet
waq Jan 7, 2010 6:07 AM (in response to yyq2009)its still not working, code is:
<h:form id="search_form">
<h:inputText id="search_fld" value="#{dictionary.word}" size="50" />
<h:commandButton value="Search" action="#{dictionary.searchWord}" id="searchBtn" />
<h:selectOneRadio id="myRadio" value="#{dictionary.search_filter}" styleClass="text" style="font-style: oblique;">
<f:selectItem itemValue="exact" itemLabel="Exactly" />
<f:selectItem itemValue="start_with" itemLabel="Start with" />
<f:selectItem itemValue="contain" itemLabel="Contain" />
</h:selectOneRadio>
<a4j:outputPanel id="table_div" layout="none">
<h:dataTable id="detail_table" var="dic" border="0"rowClasses="even_rows, odd_rows" cellpadding="2" cellspacing="1"
rows="5" value="#{dictionary.dictionayList}"
binding="#{dictionary.dataTable}">
......
<h:column headerClass="datatable_width_detail">
<f:facet name="header"><h:outputText value="" />
</f:facet>
<a4j:commandLink action="#{dictionary.showDetails}"
value="Detail" oncomplete="Richfaces.showModalPanel('panel')"
reRender="panel" />
</h:column>
</h:dataTable><br />
<rich:datascroller align="center" for="detail_table" maxPages="20"renderIfSinglePage="false">
</rich:datascroller>
</a4j:outputPanel>
<t:saveState value="#{dictionary.dictionayList}" />
<rich:modalPanel id="panel" width="600" height="300"autosized="true">
.....
</rich:modalPanel>
This problem is really sqeezing.
Isn't any way to do it the way i was doing previuosly? I mean instead of rendering entire page, i just need to do partial submitting using ajax.
-
26. Re: a4j:commandButton not working in facelet
nbelaevski Jan 8, 2010 2:58 PM (in response to waq)You can split your bean into two beans - the first holds properties and is kept alive, the second contains reference to the bound component.
Another options is to redesign your code, so that binding isn't necessary anymore.
-
27. Re: a4j:commandButton not working in facelet
yyq2009 Jan 13, 2010 1:36 AM (in response to waq)Hi, Waqas Arshad, I'm sorry that I didn't noticed you binding the datatable to backing bean. Excep binding the datatable, everything works for me. -
28. Re: a4j:commandButton not working in facelet
waq Jan 13, 2010 7:04 AM (in response to yyq2009)but without binding datatable how would you pick the selected row data?
-
29. Re: a4j:commandButton not working in facelet
ilya_shaikovsky Jan 13, 2010 7:29 AM (in response to waq)by using parameters like there
http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=editDataTable