Skip to content

Highlight handler but for the whole form being edited #68

@MatthewVaadin

Description

@MatthewVaadin

Is your feature request related to a use case? Please describe.
I want to be able to respond to a user editing a form. This could be to make the fields read-only when another user is editing the form and to make them writable once the other user is finished.

Describe the solution you'd like
A clear and concise description of what you want to happen. If you have an idea for new API to the product, describe the API and how you think it should work.
Currently the FormManager API allows me to programmatically highlight a field being edited and to respond to another user doing the same. This feature could work in a very similar way. Here is a possible API:

public class FormManager extends AbstractCollaborationManager
    implements HasExpirationTimeout {
    ...
    public void edit(boolean edit) {
        ...
    }

    public void setEditHandler(EditHandler handler) {
        ...
    }
    ...
}

public interface EditHandler {
    interface EditContext extends Serializable {
        UserInfo getUser();
    }

    Registration handleEdit(EditContext context);
}

Describe alternatives you've considered
Using the highlight handler to check whenever any field is being edited and respond to that. However, you can't track when a user has no fields highlighted, but is still editing the form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions