I have a private property "dataTransferType" with public getter and setter in the DataFile class. The initial value of the "dataTransferType" is defined in the faces-config.xml file. I want to get the "initial value" of the "dataTransferType" in another class and the compiler does not like the way I access this property.
Here is the snippet of the DataFile class, which shows the declaration and the getter and setter for the property:
Here is the way that the initial value of the "dataTransferPropery" is set in the faces-config.xml file:
Now, in another class FileManagementBean, I first instantiate the DataFile class
and then in the constructor of the FileManagementBean I tried to access the initial value of the property "dataTransferType":
The compiler did not like it at all.
But, if I arbitrary introduced a
String in the FileManagementBean:
My code worked as I had expected without any problem.