el-spec icon indicating copy to clipboard operation
el-spec copied to clipboard

Access public fields

Open glassfishrobot opened this issue 10 years ago • 3 comments

There is an increasingly recommended practice of disallowing entities in the presentation layer, and instead just passing DTOs. Since DTOs don't have any behavior, nor are they persistent, and because their very purpose is to simply hold and serve data, there is no reason to encapsulate their fields. So there is no reason what DTO fields shouldn't be public, since getters & setters don't add any value to them.

It would therefore be great if EL could access public fields, to save developers the bother of having to add needless getters & setters:

public class PersonDTO

{ public String name; }

$

{person.name}

Environment

Any

glassfishrobot avatar Jun 25 '15 04:06 glassfishrobot

Reported by calen

glassfishrobot avatar Jun 25 '15 04:06 glassfishrobot

Was assigned to kchung

glassfishrobot avatar Jun 25 '15 04:06 glassfishrobot

This issue was imported from java.net JIRA EL_SPEC-25

glassfishrobot avatar Apr 24 '17 07:04 glassfishrobot