Skip to Content

Create a New BO Instance Based On Entry Selected in A Data List

Hi Experts,

I have an Advanced List Pane in a QAF which shows a list of consultants. I can select 1 entry and create a new consultant which is reporting to him/her. The Consultant ID of the selected entry should be taken and populated in the "ParentID" field in a modal dialog.

I have a BO action which is saving the Consultant ID of the highlighted entry in the list to a transient element but the challenge is how I can use it to populate the value in the modal dialog to create a new Consultant.

Any suggestion will be welcomed. Please shed some light. Thanks!

Cheers,

Jeremy

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 04 at 10:02 AM

    Hi Tobias,

    Thanks for your prompt reply. Let me describe it in a better way.

    I have defined a BO called Consultant and here is the definition:

    Consultant

    -ID

    -First Name

    -Last Name

    -Parent ID

    I have defined a QAF which has a data list. This list is filled by the DefaultSet Query which returns a list of all the Consultant BO instances.

    In the same QAF I have also defined a modal dialog (not a reusable MD but embedded within the QAF). When I select one of the entries and click the "Add" button, it should keep the ID of the selected consultant and populate it in the Parent ID field in the modal dialog.

    To achieve this I have defined a BO action "PrepareNewConsultant" and it's binded to /Root/DataList to store the current consultant ID to a transient element but the challenge now is how to pass this value to the new Consultant BO instance to be created (should be visible on the screen..)

    Thanks!

    Jeremy

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Jeremy,

      When the modal dialog is opened you have access to the whole GAF data model and can access the temporary field so that you can fire an event handler which triggers the new consultant create and after that you can move the value of the temporary field to the "Reports To" field.

      • Select List item
      • Press the create button
      • Event Handler fired -> Move ID to transient field & open modal dialog
      • create new BO instance
      • move transient field value to parent id field

      Best regards

      Tobias Kuhn

  • Jan 04 at 07:33 AM

    Hi Jeremy,

    If I understand you correctly you have an BO A with an node which stores a list of consultants and in BO A is an transient field in which you store the Consultant ID for which you want to create an new BO Instance of the BO Consultant.

    On UI side you want to open an modal dialog for the creation of the consultant, after your selection of the Consultant from the list and hitting the create button.

    To get this working I would use node reference binding on the modal dialog so that i can access the BO data and get the employee id, when the inport event is fired.

    Best regards

    Tobias Kuhn

    Add comment
    10|10000 characters needed characters exceeded