isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: properties -disable
Date Tue, 03 Nov 2015 15:57:04 GMT
Hmm, I can't reproduce this on the latest 1.10.0-SNAPSHOT, though
admittedly I haven't tried on 1.9.0 which I'm guessing is what you are
using.  See [1]

If you can upload an example to a github repo, then I'll check it out.

~~~
Also, just to note that the @Property(notPersisted=true) may not be doing
what you want.  In "days gone by" it used to be the responsibiilty of the
Apache Isis framework itself to manage persistence - in effect, it included
its own ORM and this annotation is basically a left-over from that.  These
days though we use JDO/DataNucleus, which requires its own annotations in
addition.

So you probably want to also add:

@javax.jdo.annotations.NotPersistent

to the getter.

The @Property(notPersisted=...) remains only for defining whether the
property is included in snapshots defined by the SnapshotService (used for
adhoc auditing and similar requirements).

HTH
Dan


[1] http://imgur.com/RvII0yQ




On 3 November 2015 at 10:38, Anjaneyulu Bikka <bikka123@gmail.com> wrote:

> Hi  Dan,
>
> Thanks for the response, I do have setters/getters , please check below.
>
>   private String firstName="Anju";
>     @MemberOrder(sequence = "2")
>     @Property(editing=Editing.ENABLED,maxLength=9,notPersisted=true)
>     @PropertyLayout(named="Enter First Name")
>     public String getFirstName() {
> return firstName;
> }
> public void setFirstName(String firstName) {
> this.firstName = firstName;
> }
>
> Thanks & Regards
> Anju
>
> On Tue, Nov 3, 2015 at 11:28 AM, Dan Haywood <dan@haywood-associates.co.uk
> >
> wrote:
>
> > I've raised ISIS-1238 for this; we ought to be able to detect this issue
> > using a metamodel validation rule.
> >
> >
> > https://issues.apache.org/jira/browse/ISIS-1238
> >
> > On 3 November 2015 at 08:20, Dan Haywood <dan@haywood-associates.co.uk>
> > wrote:
> >
> > > Hi Anju,
> > >
> > > Is there a setter as well?  If not, then the property is implicitly
> > > read-only.
> > >
> > > Cheers
> > > Dan
> > >
> > > PS: could you subscribe to the mailing list ... otherwise I have to
> > > manually approve your posts.  See [1]
> > >
> > > [1] http://isis.apache.org/support.html#how-to-subscribe
> > >
> > >
> > > On 3 November 2015 at 08:17, Anjaneyulu Bikka <bikka123@gmail.com>
> > wrote:
> > >
> > >> Hi
> > >>
> > >> Could you please help me .
> > >>
> > >> I am trying to display the  text box in UI.
> > >>
> > >>   private String firstName="Anju";
> > >>     @MemberOrder(sequence = "2")
> > >>     @Property(editing=Editing.ENABLED,maxLength=9,notPersisted=true)
> > >>     @PropertyLayout(named="Enter First Name")
> > >>     public String getFirstName() {
> > >> return firstName;
> > >> }
> > >>
> > >> While rendering it is ignoring the   ENABLED property,
> > >>
> > >> Regards
> > >> Anju
> > >>
> > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message