Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4523

Support a Bean creation from @BindingParams

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 9.5.0
    • 9.0.0
    • Databind 2
    • None
    • None

      Current Result

      <button onClick="@command('handle', format='USD', price=9.99, id=3)"/>
      
      @Command
      public void handle(@BindingParam("format") String format, @BindingParam("price") double price, @BindingParam("id") int id) {
      }
      

      A group of @BindingParam will grow easily and hard to maintain.

      Expected Result

      public class Product {
        private String format;
        private double price;
        private int id;
        // Getters and setters are omitted
      }
      
      @Command
      public void handle(@BindingParams Product product) {
        // product.getFormat(), product.getPrice(), product.getId() ...
      }
      

      Create a Bean object to collect all related properties.

            rudyhuang rudyhuang
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified