isis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ISIS-2001) Dynamically hide/disable/default action parameters (based on other parameter arguments)
Date Tue, 16 Apr 2019 10:33:00 GMT

    [ https://issues.apache.org/jira/browse/ISIS-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16818885#comment-16818885
] 

ASF subversion and git services commented on ISIS-2001:
-------------------------------------------------------

Commit 2cea0edd3320a8f7e29aab8f2d5a416716ca38f4 in isis's branch refs/heads/master from danhaywood
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=2cea0ed ]

ISIS-2001: generalizes the wicket viewer to support "dependent defaults"

Also, the Wicket viewer will automatically check that defaults are compatible with choices
available for the argument (if any) and reset if required.


> Dynamically hide/disable/default action parameters (based on other parameter arguments)
> ---------------------------------------------------------------------------------------
>
>                 Key: ISIS-2001
>                 URL: https://issues.apache.org/jira/browse/ISIS-2001
>             Project: Isis
>          Issue Type: New Feature
>    Affects Versions: 1.16.2
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Major
>             Fix For: 1.18.0
>
>
> some notes:
> ActionParametersForm.java
> ScalarPanelAbstract2#updateIfNecessary(..) as a new hook method to be implemented everywhere
> - if choices facet then update choices ... DONE ALREADY
> - if default facet then recompute ... TO DO EVERYWHERE, on the getModel() 
>   - and "sync" the value into the UI widget
> 1. for the existing logic that evaluates choicesX based on choices(Y<x), should also
evaluate any defaultX that we see.
> 2. also do this for an autoCompleteX
> 3. new logic looking for a change in any scalar, then search for other params with a
default that depend on that.
> Nice to have, but will need changes to metamodel so we'll leave for now:
> 4. support the idea of disableX for params
> 5. support the idea of hideX for params
> based on a change (autoComplete, choices or scalar)
> ... re-evaluate choices, default, disable, hide
> ~~~~~~~~~~
> Organisation -> BankAccount
> public void doSomething(
> 	Organisation org,
> 	BankAccount bankAccount,
> 	...
> 	) {
> 	
> }
> public List<Organisation> autoComplete0DoSomething(String str) { .... }
> public List<Organisation> choices0DoSomething() { .... }
> public List<BankAccount> choices1DoSomething(Organisation org) { ... }
> public BankAccount default1DoSomething(Organisation org) { /*return choices1DoSomething(organisation).get(0);
*/ }
> ~~~~~~~~~~
> public void calc(
> 	BigDecimal netAmount,
> 	BigDecimal vatAmount,
> 	BigDecimal grossAmount
> 	...
> 	) {
> 	
> }
> public BigDecimal default2Calc(BigDecimal netAmount, BigDecimal vatAmount) { return netAmount
+ vatAmount; }
> //public String disable2Calc() { return "disabled"; }
> //public boolean hide2Calc(BigDecimal netAmount, BigDecimal vatAmount) { return netAmount
== null; }



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message