ADH2COB
I'm new here

EntityFormData getEntity()

Hello,
We are migrating from fs-4.2.488 version to fs-5.1.106 version.We have used getEntity() method in EntityFormData class which is already deprecated.Once i build the module on the fs-access 5.1.106 jar i am getting the below error.Could you kindly provide me the work around.Attaching the log file in the attachment.

Error:
getEntity() is not public in de.espirit.firstspirit.access.store.contentstore.gom.list.EntityFormData; cannot be accessed from outside package

0 Kudos
8 Replies
Peter_Jodeleit
Crownpeak employee

As far as I remember this was never part of the API, correct me if I'm wrong.

A "work around" depends on your use case, where you provide no information at all.

Peter
0 Kudos

It is the part of API.Is is present within the EntityFormData.java the issue is previously in fs 4.2.488 the access specifier for getEntity() methos is public but now in 5.1.106 the access specifier is made default.So I couldn access outseide the package.

0 Kudos

Ajay Kumar schrieb:

It is the part of API.Is is present within the EntityFormData.java the issue is previously in fs 4.2.488 the access specifier for getEntity() methos is public but now in 5.1.106 the access specifier is made default.So I couldn access outseide the package.

A method declared as "public" does not imply that the method is part of the API.

Please refer to the documentation of any version and you'll see that the class EntityFormData is not included there.

Back to the problem: Please describe your use case. Without doing so nobody could come up with a solution or suggestion.

Peter
0 Kudos

The below listed is the scnario where we are using the getEntity method()

     1.There is a FS_LIST in one of our template

     2.The values for this list compoenent will be fetched from data base

     3.We use the getEntity method to iterate through the list and get the value of each item.

0 Kudos

you could/should use the FormField<?> FormData#get(@Nullable Language language, String fieldName) API.

0 Kudos

Using this is will be ablae to fetch the FormField from the particular form.Say am able to fetch my FS_LIST field within the form .How to get the entity of that Form Field

0 Kudos

Hi Ajay,

entries of the FS_LIST are again of type FormData based on the TableTemplate assigned to the FS_LIST. The same way you access the form field of the FS_LIST, you can access each item as form field within the entry itself. There is no need to get hold of the entity.

Cheers,

Stefan

0 Kudos

Hello Ajay,

do you need further help or did the given answers already help you? If so, it would be great if you mark the "correct answer".

If you found a solution by yourself, it would be very kind of you, if you posted it here.

Best regards

Michaela

0 Kudos