Getting data from a Dialog into a fragment

I am using fragments to manage some forms, But I need to call some data stored on the database, and to do this properly I have a button that calls an EntityBrowse screen.

How can I get the selection in the entityBrowse screen [entityTable.getSingleSelected()] and make a callback on close to the fragment I am currently working on, [entityFragment]?

I am thinking of onAfterClose, but I am not sure how to move the data around

Hi, in your fragment, you can define public setters for the data. Then in your parent screen, use setter to set data in the fragment. Check the document here. The fragment will be like:

public class MyFragment extends ScreenFragment{
    private String data;
    public void setData(String dataIn){ = dataIn;

    private void doYourBusinessWithData(){}

Thanks, but reading your answer I think my question was not very clear, in your example you are setting the data on my current fragment opening a new screen where the screen would receive the data.

What I am looking to do is the opposite: get data from the new dialog screen and pass it back to the fragment that was originally open. I am thinking there is an onClose event that can help me with this operation.

Yes, you can use onClose to get data from the closing screen, then use already created fragment’s setter to pass the data into fragment.