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

Support a Bean creation from @BindingParams

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: 9.0.0
    • Fix Version/s: 9.5.0
    • Component/s: Databind 2
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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