-
1. Re: using a4j:jsfunction
ilya_shaikovsky Sep 4, 2007 7:53 AM (in response to kewldude)could you please explain the use case? why can't you perform the actions you need together with scrolling action?
-
2. Re: using a4j:jsfunction
kewldude Sep 4, 2007 8:19 AM (in response to kewldude)<rich:dataTable width="100%" id="dataModelTable" rows="10" columnClasses="tableColumnCatItems" rowClasses="rowIp1,rowIp2"
value="#{dataModel.tableModel}" var="item" binding="#{dataModel.table}" >
<f:facet name="header">
<rich:columnGroup>
<h:column>
<h:outputText value="Description" />
</h:column>
<h:column>
<h:outputText value="Image" />
</h:column>
</rich:columnGroup>
</f:facet>
<rich:column>
<h:outputText value="#{item.description}" />
</rich:column>
<rich:column >
<h:graphicImage url="http://img301.imageshack.us/img211/21/intelcore2duonew.gif" width="50" height="50" />
</rich:column>
</rich:dataTable>
<rich:datascroller for="dataModelTable" maxPages="5" reRender="catGroup" renderIfSinglePage="false" />
<a4j:jsFunction oncomplete="changeColor('test');"> </a4j:jsFunction>
That is my code, basically what I want to do is everytime the scroller is clicked and the data is displayed by the dataTable, the changeColor javascript function should be called. The changeColor function just changes the color of the text in the screen that matches up with the method param and in this case it is the word 'test'.
Using the jsfunction above, nothing is happening, maybe im missing something. -
3. Re: using a4j:jsfunction
ilya_shaikovsky Sep 4, 2007 8:38 AM (in response to kewldude)So are you really need to make request everytime you need just change color on the client?
just use oncomplete on the datascroller and place your function call there