What if some entities should'n be deletable or insertable? Is there an easy way to get rid of the "new" button and trash can icon?
            Asked
            
        
        
            Active
            
        
            Viewed 77 times
        
    1 Answers
0
            If you're using XavaPro just remove the access to the new and delete actions for the role. Otherwise, you should create a controller with just the save action and define a module using it.
That is, in controllers.xml add:
<controller name="OnlySave">
    <action name="save" mode="detail"
        by-default="if-possible"
        class="org.openxava.actions.SaveAction"
        image="save.gif"
        icon="content-save"
        keystroke="Control S"/> 
                        
</controller>
And in application.xml define a module for your entity in this way:
<module name="Customer">
    <model name="Customer"/>
    <controller name="OnlySave"/>
    <controller name="Print"/>                                        
</module>
        javierpaniza
        
- 677
 - 4
 - 10