[
https://issues.apache.org/jira/browse/ISIS-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13768868#comment-13768868
]
ASF subversion and git services commented on ISIS-478:
------------------------------------------------------
Commit d82f3d3c7655f9a825a070f0f9cd3aa5e189b2c3 in branch refs/heads/master
from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=d82f3d3 ]
ISIS-478,ISIS-503: various fixes.
ISIS_478, for conditional choices, for EntitySelect:
* clear link now should work
* if no choices/autocomplete then doesn't NPE (BankMandates#newBankMandate)
* removed ID_ENTITY_TITLE_NULL label, since never visible
* sets up a placeholder text
for conditional choices, for ValueSelect:
* correctly initializes second dropdown based
ISIS-503, for contributee actions/associations, calculate identifier
* was causing stack trace when go back to list, caused by call to
getIdentifier() incorrectly returning the wrong value for a contributed
association.
> Provide conditional choices, defaults and validation between action parameters
> ------------------------------------------------------------------------------
>
> Key: ISIS-478
> URL: https://issues.apache.org/jira/browse/ISIS-478
> Project: Isis
> Issue Type: New Feature
> Components: Core, Viewer: Wicket
> Affects Versions: viewer-wicket-1.2.0, core-1.2.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Fix For: viewer-wicket-1.3.0, core-1.3.0
>
>
> For example, suppose there is an action to specify an address, where we
> specify the country, the state and the postcode. We want the state to have
> choices and a default dependent on the country, and we want the postcode to
> be validated according to the rules of that country.
> public Address enterAddress(Country c, State st, @Named("Postcode") String
> postcode) { ... }
> Any dependent parameter must supply a param-specific validate [this is a new
> method prefix]:
> public String validate1EnterAddress(Country c, State st, String postcode) {
> ... }
> public String validate2EnterAddress(Country c, State st, String postcode) {
> ... }
> The choices and defaults for State also accept all param types preceding:
> public List<State> choices1EnterAddress(Country c) { ... }
> public State default1EnterAddress(Country c) { ... }
> When the user enters a value for the country, this is passed to these
> methods. If the user tabs directly to the State param without entering the
> country, then these would return empty lists/value.
> If the user enters a value for the country, then corresponding entries for
> the state and postcode, and then tabs back to the country and enters a
> different value, then the validateNXxx methods are called (for all N > 0,
> country being param 0). If the validate methods indicate their current value
> is invalid, then the values are set to null or to the recomputed default (if
> a default method is available).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira