This content has been marked as final.
Show 8 replies
-
1. Re: Why rich:dataScroller doesn't call
vhmolinar Aug 12, 2009 2:02 PM (in response to vhmolinar)Correction:
I want that rich:dataScroller request invoke the set methods of my variables :
SAno and SMes that are used by "h:selectOneMenu"
from my managedBean. -
2. Re: Why rich:dataScroller doesn't call
vhmolinar Aug 12, 2009 4:56 PM (in response to vhmolinar)I've tried to use 'ajaxSingle' property of my rich:dataScroller and now it calls 'set' methods correctly, but it's setting the attributes only after action calling.
Please guys, what can I do for solve it? -
3. Re: Why rich:dataScroller doesn't call
yyq2009 Aug 12, 2009 8:34 PM (in response to vhmolinar)Hi, can you give more page code?
-
4. Re: Why rich:dataScroller doesn't call
vhmolinar Aug 13, 2009 8:05 AM (in response to vhmolinar)Ok, my page code:
<a4j:region> <a4j:form style="margin-top:10px;"> <h:selectOneMenu value="#{clogBean.SAno}" style="float:left;"> <f:selectItems value="#{clogBean.years}"/> </h:selectOneMenu> <h:selectOneMenu value="#{clogBean.SMes}" style="float:left;margin-left:5px;"> <f:selectItems value="#{clogBean.months}"/> </h:selectOneMenu> <a4j:commandButton action="#{clogBean.loadChangesLog}" value="Carregar Dados..." reRender="clogTable,clogScroller" style="clear:left;float:left; margin: 5px 0 10px 0;"/> <rich:dataTable var="c" value="#{listChangeLog}" rendered="#{not empty listChangeLog}" id="clogTable" style="clear:left;" rows="20"> <rich:column width="140"> <f:facet name="header"> User </f:facet> <div style="text-align:center;"> <h:outputText value="#{c.admin.username}" /> </div> </rich:column> <rich:column> <f:facet name="header"> Date </f:facet> <div style="padding: 4px"> <h:outputText value="#{c.horaModificacao.time}"> <f:convertDateTime type="date" pattern="dd/MM/yyyy" /> </h:outputText> </div> </rich:column> <rich:column> <f:facet name="header"> Description </f:facet> <div style="padding: 4px"> <h:outputText value="#{c.descricao}" /> </div> </rich:column> </rich:dataTable> <rich:datascroller for="clogTable" id="clogScroller" reRender="clogTable" ajaxSingle="false"/> </a4j:form> </a4j:region>
-
5. Re: Why rich:dataScroller doesn't call
ilya_shaikovsky Aug 13, 2009 10:46 AM (in response to vhmolinar)and now it calls 'set' methods correctly, but it's setting the attributes only after action calling.
describe in details pelase. -
6. Re: Why rich:dataScroller doesn't call
vhmolinar Aug 13, 2009 11:41 AM (in response to vhmolinar)
describe in details pelase.
The request made when I click on a button at rich:dataScroller invokes my action@Factory("listChangeLog") public void loadChangesLog(){
before calling getters and setters.
Therefore I need that the request sets my variable values before calling action.
The variables that I want to be updated before action calling are:
SAno and SMes
These are being used by h:selectOneMenu components:<h:selectOneMenu value="#{clogBean.SAno}" style="float:left;"> <f:selectItems value="#{clogBean.years}"/> </h:selectOneMenu>
-
7. Re: Why rich:dataScroller doesn't call
yyq2009 Aug 13, 2009 9:41 PM (in response to vhmolinar)Maybe another ajaxSigle="true" problem.
Just remove the attribute of <rich:datascroller/> -
8. Re: Why rich:dataScroller doesn't call
nbelaevski Aug 14, 2009 6:16 AM (in response to vhmolinar)Hi,
That's because this@Factory("listChangeLog") public void loadChangesLog(){
is not a JSF action, but Seam factory method that returns data for data table. When request is processed, data table iterates over its children to decode them and that's causing factory creation. Possible fixes: change bean scope so that factory is executed only once per request - e.g. page or use "process" attribute of rich:datascroller to target processing for inputs only and skip data table.