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

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

Commit 7d81325f491a30bcc28f18155e81de226c70ec5f in branch refs/heads/master 
from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=7d81325 ]

ISIS-486, ISIS-624, ISIS-625, ISIS-626: modal dialogs, @Digits, MMV error 
handling

ISIS-486: improvements to modal dialog
- now correctly displays feedback error on conversion exception when tab out
- to reduce flicker, waits 250ms before performing veil transition

ISIS-624: removed @Decimal, replaced with @Digits (bringing in JSR-349 beanval 
1.1 dependency)

ISIS-625: New MmvErrorPage to display any detected metamodel validation errors

ISIS-626: Built-in ExceptionRecognizer implementation for PagedExpiredException.


> New @Decimal annotation to specify length and scale for BigDecimal action 
> parameters (to avoid JDO exceptions later).
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: ISIS-624
>                 URL: https://issues.apache.org/jira/browse/ISIS-624
>             Project: Isis
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: core-1.3.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: core-1.4.0
>
>
> Using the JDO @Column annotation the length/scale of properties can be 
> specified.  However, there is no capability to capture these semantics for 
> action parameters (and the @Column annotation cannot be specified for 
> parameters, even if we thought that were a good idea).
> With no semantics, Isis currently infers the scale of a BigDecimal from the 
> entered input.  For example, entering "123.45" will parse to a BD with scale 
> of 2, entering "123.4567" will parse to a BD with scale of 4.
> The problem, then, is that if a BD with too large a scale is assigned to a 
> property with a lower scale, then JDO will throw an exception.
> So this ticket is to introduce a new annotation, @Decimal, allowing the 
> appropriate semantic to be enforced:
> public class ToDoItem
>     @javax.jdo.annotations.Column(length=10, scale=2)
>     private Cost cost;
>     public void updateCost(@Decimal(10,2) BigDecimal newCost) {
>        setCost(cost);
>     }
> }
> ~~~~
> In addition, it should be possible to add this annotation to properties too.  
> If there is a mismatch between JDO and the Isis annotaitons, then a metamodel 
> validation exception should be thrown.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to