Mar 15th, 2012, 06:26 AM
How hide some (not null) fields in a view or how can I set them as read only?
in the domain I have a custom logic that automatically set some not null fields (clearly I have in the view many other fields, that are not intresting here, that are instead set by the user), defined as follow:
private Integer numero;
private Integer anno;
@DateTimeFormat(style = "M-")
private Date dataCreazione;
I need only that these fields will be not shown on the view level, because I'll rewrite them at domain level, as I wrote above, when the user save the view data. Unlikely I have noticed that isn't so easy obtain this feature I really do not understand why... Anyway I had tried various approach and nothing seems to work...
I really hope that this can be with a really simple definition, I don't know at which level (domain, controller or view). Remember that these fields are define as not null (anyway if the not null definition this is the problem I may change the fields definition, hoping that this helps...).
Anyone has some suggestion?
ROO version: spring-roo-1.2.0.RELEASE
Paolo Del Signore
Last edited by padesig; Mar 15th, 2012 at 06:31 AM.
Mar 15th, 2012, 08:33 AM
I can offer you to make this fields hidden. So they will exists on the form, but dosen't show.
I do so, I extended input.tagx to hide fields and populate their values myself.
Or you can just add render="false" to the field and handle errors in controller yourself.
Just small suggestions.
Mar 15th, 2012, 10:01 AM
Mar 15th, 2012, 10:10 AM
thank you for your suggestion too. Great to know more ways
Tags for this Thread