Topic:   How to bind check box selected row values from Async table to flow service input?
Jul 07, 2014 02:37 11 Replies 930 Views skentilt
Prev Next
Topic Replies (11)
  1. 1
    idnkx user

    skentilt

    Hi all,

    How to bind check box selected row values from Async table to flow service input?

    1
    idnkx user

    Raj Kumar

    How you are selecting values from table?

    1
    idnkx user

    skentilt

    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.

    1
    idnkx user

    Tomas

    Use Provider for mapping data to the Async Table.. from the Provider you can get the selected values as provider.getSelectedRows(); hope this helps...

    1
    idnkx user

    Ansari

    Perfect solution....just do it as Tomasidn says....

    1
    idnkx user

    Srinik

    getTaskSearchProvider().getRowSelectedIds(); using this api you can get the selected row ids in the java bean...i thnk it will work

    1
    idnkx user

    skentilt

    hi getTaskSearchProvider().getRowSelectedIds(); is a list but how to bind this to the flowservice

    1
    idnkx user

    Tomas

    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..

    1
    idnkx user

    Tomas

    also getTaskSearchProvider() works only with tasks dont rely on it if you are developing a view which is not related to Task...

    1
    idnkx user

    skentilt

    can pls give example for how to create custom java been buz i am new to CAF

    1
    idnkx user

    Tomas

    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...

Leave a Reply
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect