You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Dan Haywood (JIRA)" <ji...@apache.org> on 2014/09/30 07:35:33 UTC

[jira] [Commented] (ISIS-910) Entering invalid data for Char type fails with an internal error

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

Dan Haywood commented on ISIS-910:
----------------------------------

The bug is really in the viewer attempting to set state on the domain object model that is invalid with respect to the domain's semantic.

Using Wicket StringValidator seems like the right way to implement.

> Entering invalid data for Char type fails with an internal error
> ----------------------------------------------------------------
>
>                 Key: ISIS-910
>                 URL: https://issues.apache.org/jira/browse/ISIS-910
>             Project: Isis
>          Issue Type: Bug
>          Components: Viewer: Wicket
>    Affects Versions: viewer-wicket-1.6.0
>            Reporter: Martin Grigorov
>            Assignee: Dan Haywood
>             Fix For: viewer-wicket-1.7.0
>
>
> Entering longer text in the input field for Char type fails with the following exception:
> Caused by: org.apache.isis.core.metamodel.facets.object.parseable.InvalidEntryException: Only a single character is required
> 	at org.apache.isis.core.metamodel.facets.value.chars.CharValueSemanticsProviderAbstract.doParse(CharValueSemanticsProviderAbstract.java:53)
> 	at org.apache.isis.core.metamodel.facets.value.chars.CharValueSemanticsProviderAbstract.doParse(CharValueSemanticsProviderAbstract.java:33)
> 	at org.apache.isis.core.metamodel.facets.object.value.vsp.ValueSemanticsProviderAndFacetAbstract.doParse(ValueSemanticsProviderAndFacetAbstract.java:188)
> 	at org.apache.isis.core.metamodel.facets.object.value.vsp.ValueSemanticsProviderAndFacetAbstract.parseTextEntry(ValueSemanticsProviderAndFacetAbstract.java:173)
> 	at org.apache.isis.core.metamodel.facets.object.parseable.parser.ParseableFacetUsingParser.parseTextEntry(ParseableFacetUsingParser.java:88)
> 	at org.apache.isis.viewer.wicket.model.models.ScalarModel.setObjectAsString(ScalarModel.java:573)
> 	at org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldParseableAbstract$1.setObject(ScalarPanelTextFieldParseableAbstract.java:64)
> 	at org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldParseableAbstract$1.setObject(ScalarPanelTextFieldParseableAbstract.java:51)
> ....
> The exception is both logged and shown in the collapsed panel in the content area.
> I'd expect that an error feedback error message is shown instead.
> Also Wicket StringValidator can be used to set the 'maxlength' HTML5 attribute to prevent entering such invalid data at the client side. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)