hi ADF Mobile gurus,
i have a requirement where in there is a button at the top of the view and a list item. the view displays some data in list item.
i want the list item to get refreshed when clicking the button in other words something similar to refresh functionality in the browser.
how to achieve that?
you don't mention where the data is populated from that you display in the list. If the button refreshes this data source then the list will refresh (e.g. re-execute the iterator or method in the binding layer). ADF mobile has a different lifecycle than the web based ADF versions
sorry about that.
data in the list is coming from a DC.
and i am refreshing the data source through this button. my only challenge is to refresh the data in the list.
i was reading the following (go to end)..
see: To use a button to reexecute the iterator:
i didn't find the "execute" method for the iterator.
how to execute the iterator?
Is the data from your DC coming directly from a webservice call?
If so, just use the button to execute it again.
If not, use DataChangeEvent as described here:
i did as per "Example 9-28 ProviderChangeSupport Code" Example in that link and called RefreshNotes in the actionListener of my button, but the list is not getting refreshed.
actually here is what i am doing,
1. when the mobile app opens the list item has no data; so no data is displayed.
2. button is clicked > it populates the data source
3. then i call the Refresh... method in the actionlistner of the same button
i am expecting the data now to be shown in the list item.
is the call to Refresh...would show the data in the list item?
Can you clarify what your data source is?
Is it a local Java class? Is that Java class exposed as a data control?
Is it a data control based on a Web service?
Is it a data control based on REST service?
please find the details-
Can you clarify what your data source is? This is coming through a Data control
Is it a local Java class? Yes. it's a local java class.
Is that Java class exposed as a data control? Yes.
Is it a data control based on a Web service? No. the DC (call it DC1) is based on a POJO > POJO returns the array of complex type (list of employees; call it EMPLOYEES; this is populated by another method;)
Is it a data control based on REST service? Not sure about this.
my ADF Mobile UI has a button at top (name:Refresh) and a list view source of which is DC1.
so when i first open the APP, the list view will be empty.
clicking the Refresh button should refresh the data in the list view and show the data.
here is what i have done-
Refresh button has an action listener (AL) > AL calls a managed bean method > this method invokes a Web service based DC (call it DC2) > reads the data from DC2 and populates the EMPLOYEES list above
i am expecting the list view to get refreshed when Refresh button is clicked. but it's not happening. the list view does not show data after clicking the refresh button.
please let me know if i am missing anything here.
Edited by: user12111278 on Feb 19, 2013 12:17 AM