0

I have a handle to the data source, that I know belongs to a document.

The document can be a new document.

I need to know the state: Is it new, open or edit?

Basically I wish to hide/show a button in a custom control, based on the state of the document this custom control is in. The custom control it self has other data sources, so I can't use currentDocument - because this will reflect the data source in the custom control.

If there's a simpler way to solve this problem I'm all ears!

Running on a Domino 8.5.3 FP3 server.

Hope this is clear.

Thanks!

/J

4

1 回答 1

1

you can realize this with property definition for the custom control

  1. add 2 property definitions to the custom control

    • Name = newmode
    • Type = boolean
    • Name = editmode
    • Type = boolean
  2. change the rendered property of the buttons

    if (compositeData.editmode==true) { false } else {true}

or

if (compositeData.newmode==true) { false } else {true}

  1. go to the XPages which has the custom control as member an map the status of the datasoucre to the customcontrol property definitions

enter image description here

I think the status open is always valid, just when the Xpages is open...

于 2013-09-13T11:51:16.357 回答