Hide actions depending on data content

  • Dirk Coetsee

    Dirk Coetsee - 2013-09-19

    I need to set actions depending on the value of a data column.
    For instance if the status of the row is approved, the delete action should not be shown for that row. (In detail and list view)
    If the status is something else the delete action should be visible and active.

    your help will be welcomed.


  • Javier Paniza

    Javier Paniza - 2013-09-23

    Hi Dirk,

    one way is to define an @OnChange action for that property and to use add/removeActions from that actions. You'll need to define your module in this way:

    <module name="YourModule">
        <env-var name="XAVA_SEARCH_ACTION"              value="CRUD.searchExecutingOnChange"/>
        <model name="YourEntity"/>
        <controller name="Typical"/>

    Help others in this forum as I help you.
    Need more help? Get OpenXava professional support.

    Last edit: Javier Paniza 2013-09-23

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks