Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Adding the voterClass to the constraint's FieldDefiniton would simplify the dynamic ChooseDialog (We have to read from JCR-level and have to know which field to choose and display in the dialog. The only thing stored in JCR is the voter class).

Code Block
languagejava
iterfacepublic interface P13nFieldDefintion {
    ClassClass<?> getVoterClass();
}
Code Block
languagejava
ConfiguredP13nFieldDefintion extends FieldDefinition implementimplements P13nFieldDefintion {
	private Class<?> voterClass;
	public ClassClass<?> getVoterClass() {
		return voterClass;
	}
    public void setVoterClass(Class<?> voterClass) {
        this.voterClass = voterClass;
    }
}

Result:

info.magnolia.p13n.trait.BaseTraitTransformer#getVoterType() could go and we read voter class from P13nFieldDefinition