Hi

I have a really strange MissingResourceException when running my
application.

I have implemented my own IFormValidator.
When I find an error I use this code:

*lFormComponent.error( lFormComponent.getString( "DuplicatePorts", new
Model( new DuplicatePortsMessage( lFormComponent.getRawInput() ) ) ) );

...
private static class DuplicatePortsMessage implements Serializable
    {
        private String port = "";

        private DuplicatePortsMessage( final String iPort )
        {
            port = iPort;
        }
    }

*
It is working fine on the first Submit. The correct message is displayed in
my Feedback panel.
But if I submit my form again with the same error or another one, I am
getting this exception:

*

WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component
[MarkupContainer [Component id = configForm]] threw an exception

Root cause:

java.util.MissingResourceException: Unable to find resource:
DuplicatePortOnNode for component: listenerPort
[class=org.apache.wicket.markup.html.form.TextField]
at org.apache.wicket.Localizer.getString(Localizer.java:266)
at org.apache.wicket.Localizer.getString(Localizer.java:116)
at org.apache.wicket.Component.getString(Component.java:1806)
at
com.voiceage.spotxde.admin.config.modules.lbx.PortsValidator.validate(PortsValidator.java:72)
*I really don't understand that one. Why is the resource is found the first
time, but not the second time???

Thierry
Sent from Montreal, Quebec, Canada

Reply via email to