Post

2 followers Follow
0
Avatar

Fields still editable although editable is set to false

Hi!

I am generating a Document Field by calling

DocumentField.createStringField("name", "description", "code", true, false)

where I don't want the Users to edit the field (or at least just after a warning). From the documentation, it seems that should be the case and I can verify that isEditable() returns false.

Yet, I can happily edit the value without any kind of warning in the GUI. What am I missing?

Cheers,

Anne

Anne Mund

Please sign in to leave a comment.

3 comments

0
Avatar

Thanks for letting us know. Unfortuantely you've discovered a bug where under some conditions it does not show a warning.

If you add the field using AnnotatedPluginDocument.setFieldValue then the bug happens. However, if you are able to add your field to the PluginDocument when it is being created before it is wrapped in an AnnotatedPluginDocument, then it works.

For example, if you are working with a DefaultSequenceDocument which extends AbstractPluginDocument, you can use AbstractPluginDocument.addDisplayableField followed by AbstractPluginDocument.setFieldValue and then it should work correctly.

We've fixed the bug for the next major release.

Best regards,
Matt

Geneious Team 0 votes
Comment actions Permalink
0
Avatar

Hi Matt,

thanks for letting me know. I'll see if I can use the workaround you described. I'm modifying an already existing AnnotatedPluginDocument at that point, so it might be complicated.

Do you know when the next major release is coming out?

Cheers,

Anne

Anne Mund 0 votes
Comment actions Permalink
0
Avatar

We don't have an exact date yet, but the plan is for an R12 beta around September and the full release about a month after that.

Geneious Team 0 votes
Comment actions Permalink