Override Collection behaviour?

  • Nobody/Anonymous


    I have a question about the list/tables, i kown that roma renders Collection fields as Lists or Tables provided by View, Add, Remove and Update buttons to work with elements contained inside of it.

    i want now, before the delete of an InnerElement , a queryconfirm popup window to show, but the methode on<Field>Remove  ist called after the delete. What can i do for this case?

    thanks a lot for any feedback.

  • Luca Garulli

    Luca Garulli - 2010-06-17

    you can act in different ways:
    - first of all the on<Field>Remove() should be called in place of the original. Please double check it because if don't it's a bug
    - or you can create a hook "beforeEvent" to inject your code before the execution of it (see the Hook chapter in the manual)
    - or again you can use the Flow Aspect with @FlowAction(confirmRequired=AnnotationConstants.TRUE, confirmMessage="Are you sure?") but I'm not sure at 100% it's called event for events.
    - or again you could create a new implementation of the collection and override only the remove() method to request the confirmation and handle the flow



Log in to post a comment.