Hi, I found another issue, but I think I am overdoing stuff, on my original

Hi, I found another issue, I have seen some examples of. how to do it on the forum and the documentation but I having problems, I have the next bean:

Questionary{
String id;
Timestamp questionDateTime,
Set<Question> questions = new Hashset<>()
..
..
}

and on my previous version of this app I had a Form with a CustomField
that reads the Set (on my original version was an Question) and fill a Grid to edit some data of this Set. I added the FieldType, and tryed with FieldProvider but I can retrieve the Set from my custom component, the methods ‘generateModelValue’ or ‘setPresentationValue’ are never called

public class QuestionFields extends CustomField<Set<Question>> {

 @Override
    protected Set<Question> generateModelValue() {
        HashSet<Question> set = new HashSet<>();
        set.addAll(questionList);
        return   set ;

    }

    @Override
    protected void setPresentationValue(Set<Question> questions) {
            questionList.clear();
            questionList.addAll(  questions   );
    }

}

and on my CRUD component:

 crud.getCrudFormFactory().setFieldType("questions", QuestionFields.class);
  crud.getCrudFormFactory().setFieldCreationListener("questions", (field) -> {
            ((QuestionFields) field).setSystemDao(this.gameDao); //
        });
		
		     /*   crud.getCrudFormFactory().setFieldProvider("questions", ()-> {

                    QuestionFields questionField = new QuestionFields();
                    questionField.setSystemDao(this.gameDao);             
                    return questionField;
                }

        ); */
 

What Im doing wrong?

More or less I fix this adding a ‘Set questions’ inside my custom component and setting it to the one I receive on ‘setPresentationValue’ but I have to be refreshing the Set every time I make change on the grid, the ‘generateModelValue()’ still don’t work.

public  class  QuestionFields extends CustomField<Set<Question>> implements
        HasSize, HasValidation, HasLogger {

    private final Binder<Question> binder = new Binder<>(Question.class);
    private final Grid<Question> grid = new Grid<>();
    private final List<Question> questionList = new ArrayList<>();
    private final ListDataProvider<Question> dataProvider = new ListDataProvider<>(questionList);
  
    private Set<Question> ts = null;
	...
	...
	...
	
	@Override
    protected void setPresentationValue(Set<Question> ts) {      
        this.ts = ts;
        questionList.addAll(this.ts);
    }
	
	//this isn't working....
	 @Override
    protected Set<Question> generateModelValue() {
        getLogger().debug("generate model value");
        ts.clear();
        ts.addAll(questionList);
        return ts;
    }
	
	
	//Im calling this method instead, 
	// every time I do a change on the grid
	 private void refreshSet(){
		 this.ts.clear()
        this.ts.addAll(this.questionList);
    }
	
	...
	...