Ejemplo n.º 1
0
 /** This method registers a command with the Roo shell. It has no command attribute. */
 @CliCommand(
     value = "web mvc datatables all",
     help = "Use datatable component for all list view in this application")
 public void all(
     @CliOption(
             key = "ajax",
             mandatory = false,
             unspecifiedDefaultValue = "true",
             help = "Datatables will use AJAX request to get data data or not")
         boolean ajax) {
   operations.annotateAll(ajax);
 }
Ejemplo n.º 2
0
 /**
  * Use datatables component for a controller list view
  *
  * @param type target controller
  */
 @CliCommand(
     value = "web mvc datatables add",
     help = "Use datatable component for a controller list view")
 public void add(
     @CliOption(key = "type", mandatory = true, help = "The controller to apply this component to")
         JavaType target,
     @CliOption(
             key = "ajax",
             mandatory = false,
             unspecifiedDefaultValue = "true",
             help = "Datatables will use AJAX request to get data data or not")
         boolean ajax,
     @CliOption(
             key = "mode",
             mandatory = false,
             unspecifiedDefaultValue = GvNIXDatatables.TABLE,
             help =
                 "visualization mode: if empty (default) shows a table, otherwise create one-row-per-page, one-cell-per-row datatable which cell content is the render of requiered page. (example: \"show\" renders the show view for every item ")
         String mode) {
   operations.annotateController(target, ajax, mode);
 }
Ejemplo n.º 3
0
 /**
  * Informs if commands are available
  *
  * @return true if commands are available
  */
 @CliAvailabilityIndicator({"web mvc datatables add", "web mvc datatables all"})
 public boolean isAddAvailable() {
   return operations.isAddAvailable();
 }
Ejemplo n.º 4
0
 /**
  * Informs if update tags command is available
  *
  * @return true if commands is available
  */
 @CliAvailabilityIndicator("web mvc datatables update tags")
 public boolean isUpdateTagsAvailable() {
   return operations.isUpdateTagsAvailable();
 }
Ejemplo n.º 5
0
 /**
  * Informs if setup commands is available
  *
  * @return true if setup is available
  */
 @CliAvailabilityIndicator("web mvc datatables setup")
 public boolean isSetupAvailable() {
   return operations.isSetupAvailable();
 }
Ejemplo n.º 6
0
 /** Update related datatables artifacts (tags, js, images...) */
 @CliCommand(
     value = "web mvc datatables update tags",
     help = "Update datatables artificats (tags, images, js)")
 public void updateTags() {
   operations.updateTags();
 }
Ejemplo n.º 7
0
 /** Setup datatables artifacts */
 @CliCommand(value = "web mvc datatables setup", help = "Setup datatables support")
 public void setup() {
   operations.setup();
 }