Make a ManyToOne not editable by program

  • Laurent Wibaux

    Laurent Wibaux - 2013-03-22


    I am trying to make a @ManyToOne field read only in certain cases. It should be displayed so the user knows about it and the Save keeps it but editable. In most case it will be editable.

    I have tried

    getView().setEditable("lot", false);

    and various possibilities

    getView().setEditable("", false);

    with no luck so far: it works perfectly for primitives but not for references.

    Can anybody help?



    Last edit: Laurent Wibaux 2013-04-01
  • Juan Mendoza

    Juan Mendoza - 2013-03-23

    Hi Laurent,

    Try getView().setKeyEditable(false) if you are in the view, if are outside then getView().getSubView(viewNama).setKeyEditable(false)

    Hope this help.

  • Laurent Wibaux

    Laurent Wibaux - 2013-03-28

    Hi Juan,

    Yes it did help a lot: everything works now.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks