[jira] [Updated] (ISIS-2001) Dynamically hide/disable/default action parameters (based on other parameter arguments) (also fixed in "v1 maintenance")

2020-03-19 Thread Daniel Keir Haywood (Jira)


 [ 
https://issues.apache.org/jira/browse/ISIS-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Keir Haywood updated ISIS-2001:
--
Summary: Dynamically hide/disable/default action parameters (based on other 
parameter arguments) (also fixed in "v1 maintenance")  (was: Dynamically 
hide/disable/default action parameters (based on other parameter arguments))

> Dynamically hide/disable/default action parameters (based on other parameter 
> arguments) (also fixed in "v1 maintenance")
> 
>
> Key: ISIS-2001
> URL: https://issues.apache.org/jira/browse/ISIS-2001
> Project: Isis
>  Issue Type: New Feature
>Affects Versions: 1.16.2
>Reporter: Daniel Keir Haywood
>Assignee: Daniel Keir Haywood
>Priority: Major
> Fix For: v1 maintenance, 2.0.0-M3
>
>
> 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 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 autoComplete0DoSomething(String str) {  }
> public List choices0DoSomething() {  }
> public List 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
(v8.3.4#803005)


[jira] [Updated] (ISIS-2001) Dynamically hide/disable/default action parameters (based on other parameter arguments)

2020-03-19 Thread Daniel Keir Haywood (Jira)


 [ 
https://issues.apache.org/jira/browse/ISIS-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniel Keir Haywood updated ISIS-2001:
--
Fix Version/s: 2.0.0-M3

> 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: Daniel Keir Haywood
>Assignee: Daniel Keir Haywood
>Priority: Major
> Fix For: v1 maintenance, 2.0.0-M3
>
>
> 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 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 autoComplete0DoSomething(String str) {  }
> public List choices0DoSomething() {  }
> public List 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
(v8.3.4#803005)


[jira] [Updated] (ISIS-2001) Dynamically hide/disable/default action parameters (based on other parameter arguments)

2019-05-09 Thread Dan Haywood (JIRA)


 [ 
https://issues.apache.org/jira/browse/ISIS-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-2001:
--

Still some issues, though:
- we don't render any of the params as disabled by default. the initial logic 
to hide params is in ActionParametersForm, so could add 'disable' logic in 
there.
- however, also, really that logic should probably move to ScalarModel 
(currently whetherHidden/Disabled for params always returns false/null, which 
is now a lie - should push this logic further back).

Also
- couldn't get disablement working for blob panels, so that is not yet 
supported (multipart exceptions)
- ? get (ignored) exception if hit Esc (rather than Cancel button)

~~

THE CURRENT PARTIAL SOLUTION has the UNFORTUNATE side effect that the 
IsisBlobPanel is invisible when rendered as a disable property...

 

> 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 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 autoComplete0DoSomething(String str) {  }
> public List choices0DoSomething() {  }
> public List 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)


[jira] [Updated] (ISIS-2001) Dynamically hide/disable/default action parameters (based on other parameter arguments)

2019-04-01 Thread Dan Haywood (JIRA)


 [ 
https://issues.apache.org/jira/browse/ISIS-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-2001:
--
Description: 
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 BankAccount

public void doSomething(
Organisation org,
BankAccount bankAccount,
...
) {

}

public List autoComplete0DoSomething(String str) {  }

public List choices0DoSomething() {  }
public List 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; }



> 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 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 autoComplete0DoSomething(String str) {  }
> public List choices0DoSomething() {  }
> public List 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)


[jira] [Updated] (ISIS-2001) Dynamically hide/disable/default action parameters (based on other parameter arguments)

2018-12-28 Thread Dan Haywood (JIRA)


 [ 
https://issues.apache.org/jira/browse/ISIS-2001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dan Haywood updated ISIS-2001:
--
Fix Version/s: (was: 1.17.0)
   1.18.0

> 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
>Priority: Major
> Fix For: 1.18.0
>
>




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