Personal scope on top level entities

Description of the limitation and why it is relevant to address

As an app designer, I want to add an editor to a top level entity in a tree-type app in such a way that the editor is not locked when another user is also in the same folder. This will allow us to create an overview of all the children present in that folder.

This is relevant for the VIKTOR platform because it gives designers more freedom to guide users through the top-level list of entities.

Submitter proposed design (optional)

It is already possible to create an editor with a childEntityManager of the top-level folder. However, since the scope is ‘everyone’, it is not possible for two users to use the editor at the same time. The editor is locked for the second user, which makes it unusable. If we can switch the scope to a ‘personal’ level so that everyone has their own editor, things will work.

Current workarounds

The current workaround is to create another entity type where we can make the overview. However, this does not really help with the user experience.

Hi @wouterhouzr,

thanks for the requests. It’s been a while, but we are going to pick this up since we also got this request from other customers.

Our proposed solution is (a bit different than your proposal):

  • Annotate on the entity-type that this is a dashboard type entity
class Controller
  dashboard_type = True
  • This has the following effects
    • no params tracking / history
    • no storage
    • no locking of users

(This is the same as the behavior of current editor-type apps)

Would this solution work for you?

1 Like

Hi Stijn,

Yeah the proposed dashboard entity type solve indeed the same needs.

1 Like

@wouterhouzr

This feature has just been released!

You can enable this by defining allow_saving = False on the Controller:

class Controller(vkt.Controller):
    label = 'Dashboard'
    children = ['House']
    show_children_as = 'Table'
    parametrization = Parametrization
    allow_saving = False

This leads to:

  • Multiple users can enter the (top-level) entity without locking
  • Save button is not available

5 Likes

Hi Stijn,
This functionality is working.
However, there is still a pop-up that could be confusing for the user:


Hope this can be removed.
Best,
Fulei

Hi Fulei,

That shouldn’t be the case indeed, thanks for the feedback. We will pick this up.

Stijn