You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2014/02/03 14:38:09 UTC

[jira] [Created] (ISIS-674) Allow action parameters to be defaulted based on the (change of) value of other parameters.

Dan Haywood created ISIS-674:
--------------------------------

             Summary: Allow action parameters to be defaulted based on the (change of) value of other parameters.
                 Key: ISIS-674
                 URL: https://issues.apache.org/jira/browse/ISIS-674
             Project: Isis
          Issue Type: New Feature
          Components: Core, Viewer: Wicket
    Affects Versions: core-1.3.0, viewer-wicket-1.3.1
            Reporter: Dan Haywood
            Assignee: Dan Haywood
            Priority: Minor
             Fix For: viewer-wicket-1.4.0, core-1.4.0


For example:

public void foo(
   Charge charge,
   BigDecimal amount,
   String description) {
  
}
public String default2Foo(Charge charge, BigDecimal amount) {
    return charge != null && amount != null? amount + " " charge.getDescription() : null;
}

Here, the value of the 'description' parameter is defaulted from that of both the preceding 'charge' and 'amount' parameters.  Changing either should cause the default value for the 'description' to be recomputed.

This is analogous to the way that choices are recomputed for category/subcategory.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)