You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/09/29 20:03:34 UTC

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

Martin Grigorov created ISIS-910:
------------------------------------

             Summary: 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: core-1.6.0
            Reporter: Martin Grigorov
            Assignee: Dan Haywood


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)