Register or Login to Your Account
How to bind check box selected row values from Async table to flow service input?
How you are selecting values from table?
created selectable content provider for that table then using checkbox i am selecting the value. but how to get selected value to the flow service.
Use Provider for mapping data to the Async Table.. from the Provider you can get the selected values as provider.getSelectedRows(); hope this helps...
Perfect solution....just do it as Tomasidn says....
getTaskSearchProvider().getRowSelectedIds(); using this api you can get the selected row ids in the java bean...i thnk it will work
hi getTaskSearchProvider().getRowSelectedIds(); is a list but how to bind this to the flowservice
yes.. it will an Object list by default, but you need to cast this your custom java been... and then map the same to flow service..
also getTaskSearchProvider() works only with tasks dont rely on it if you are developing a view which is not related to Task...
can pls give example for how to create custom java been buz i am new to CAF
Let me Explain in detail with a Scenario.....
- Lets say you have an IS Service(say service1) which returns a result set(Say DocumentList name myResultSet).
- You wanted to show this in UI from a CAF View.
- first you will create a connector for this IS service in your CAF View(which will generate the java bean to the connector; i.e., creates a class myResultSet).
- then you have to create a provider (type is Updatable table with selection) for the output of this connector and map the same to the Async Table(Say the Provider name as myProvider ).
- if you have "Select row Checkbox" component in the Async Table, you can select values from the Async Table(remember to provide the unique value for row id expression in the Provider).
- So if you want to retrive the selected row details you can use the below code snippet.
getMyProvider().getSelectedRows();[using getter method for the Provider "myProvider"]
- this will return an Object list. If you want to convert this to "myResultSet" use the below code.
myResultSet ResultSet = new myResultSet[getMyProvider().getSelectedRows().toArray().length];
System.arraycopy(getMyProvider().getSelectedRows().toArray(), 0, ResultSet, 0, getMyProvider().getSelectedRows().toArray().length);
- now you have the selected rows in the array ResultSet which is of "myResultSet" type
- i.e., now you have to create an IS service which has the input same as the output of service1.
Hope this helps...