You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Robert Matthews (Created) (JIRA)" <ji...@apache.org> on 2012/02/17 22:38:57 UTC

[jira] [Created] (ISIS-207) Improve the message given when a field is too long (exceeds its @MaxLength value)

Improve the message given when a field is too long (exceeds its @MaxLength value)
---------------------------------------------------------------------------------

                 Key: ISIS-207
                 URL: https://issues.apache.org/jira/browse/ISIS-207
             Project: Isis
          Issue Type: Bug
            Reporter: Robert Matthews
            Assignee: Robert Matthews
            Priority: Minor


The value is repeated stating it is too long.  This is particularly bad for a long entry, and the value itself is probably not needed anyway.

Problem is in MaxLengthFacetAbstract.java in the return statement.


    @Override
    public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
        if (!(context instanceof ProposedHolder)) {
            return null;
        }
        final ProposedHolder proposedHolder = (ProposedHolder) context;
        final ObjectAdapter proposedArgument = proposedHolder.getProposed();
        if (!exceeds(proposedArgument)) {
            return null;
        }
        return "Proposed value '" + proposedArgument.titleString() + "' exceeds the maximum length of " + value();
    }


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (ISIS-207) Improve the message given when a field is too long (exceeds its @MaxLength value)

Posted by "Dan Haywood (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ISIS-207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Haywood reassigned ISIS-207:
--------------------------------

    Assignee:     (was: Robert Matthews)
    
> Improve the message given when a field is too long (exceeds its @MaxLength value)
> ---------------------------------------------------------------------------------
>
>                 Key: ISIS-207
>                 URL: https://issues.apache.org/jira/browse/ISIS-207
>             Project: Isis
>          Issue Type: Bug
>            Reporter: Robert Matthews
>            Priority: Minor
>
> The value is repeated stating it is too long.  This is particularly bad for a long entry, and the value itself is probably not needed anyway.
> Problem is in MaxLengthFacetAbstract.java in the return statement.
>     @Override
>     public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
>         if (!(context instanceof ProposedHolder)) {
>             return null;
>         }
>         final ProposedHolder proposedHolder = (ProposedHolder) context;
>         final ObjectAdapter proposedArgument = proposedHolder.getProposed();
>         if (!exceeds(proposedArgument)) {
>             return null;
>         }
>         return "Proposed value '" + proposedArgument.titleString() + "' exceeds the maximum length of " + value();
>     }

--
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