You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (Created) (JIRA)" <ji...@apache.org> on 2012/03/14 17:32:40 UTC

[jira] [Created] (WICKET-4449) Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session

Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session
-----------------------------------------------------------------------------------------------------------------------------------

                 Key: WICKET-4449
                 URL: https://issues.apache.org/jira/browse/WICKET-4449
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 6.0.0
            Reporter: Martin Grigorov
            Assignee: Martin Grigorov
             Fix For: 6.0.0
         Attachments: WICKET-4449.patch

Since a while o.a.w.Component's and o.a.w.Session #info(), #error(), #success(), etc. methods accept java.io.Serializable.
With this ticket I suggest a change that will make o.a.w.validation.IValidationError in sync with this.

--
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] [Updated] (WICKET-4449) Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session

Posted by "Martin Grigorov (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-4449:
------------------------------------

    Attachment: WICKET-4449.patch
    
> Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4449
>                 URL: https://issues.apache.org/jira/browse/WICKET-4449
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>         Attachments: WICKET-4449.patch
>
>
> Since a while o.a.w.Component's and o.a.w.Session #info(), #error(), #success(), etc. methods accept java.io.Serializable.
> With this ticket I suggest a change that will make o.a.w.validation.IValidationError in sync with this.

--
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] [Commented] (WICKET-4449) Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session

Posted by "Igor Vaynberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229376#comment-13229376 ] 

Igor Vaynberg commented on WICKET-4449:
---------------------------------------

looks good. one more thing i missed is that IErrorMessageSource should still return a String. other then that looks good.

we can add a RawValidationError to -core. i dont think a lot of people will use it, but it wont hurt either. i bet 99% of users dont care about this part of the api.
                
> Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4449
>                 URL: https://issues.apache.org/jira/browse/WICKET-4449
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>         Attachments: WICKET-4449.patch, WICKET-4449.patch
>
>
> Since a while o.a.w.Component's and o.a.w.Session #info(), #error(), #success(), etc. methods accept java.io.Serializable.
> With this ticket I suggest a change that will make o.a.w.validation.IValidationError in sync with this.

--
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] [Commented] (WICKET-4449) Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session

Posted by "Martin Grigorov (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229330#comment-13229330 ] 

Martin Grigorov commented on WICKET-4449:
-----------------------------------------

With this patch the user can do:

MyValidator#validate(IValidatable validatable) {

  validatable.error(new MyValidationError(new MySerializableMessage()));
}

class MyValidationError implements IValidationError {

  private Serializable ser;
  
  public MyValidationError(Serializable ser) {
    this.ser = ser;
  }

  public Serializable getErrorMessage() { return ser;}

}
                
> Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4449
>                 URL: https://issues.apache.org/jira/browse/WICKET-4449
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>         Attachments: WICKET-4449.patch
>
>
> Since a while o.a.w.Component's and o.a.w.Session #info(), #error(), #success(), etc. methods accept java.io.Serializable.
> With this ticket I suggest a change that will make o.a.w.validation.IValidationError in sync with this.

--
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] [Commented] (WICKET-4449) Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session

Posted by "Igor Vaynberg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229335#comment-13229335 ] 

Igor Vaynberg commented on WICKET-4449:
---------------------------------------

why this change in ValidationError#getErrorMessage() ?

-		String errorMessage = null;
+		Serializable errorMessage = null;
                
> Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4449
>                 URL: https://issues.apache.org/jira/browse/WICKET-4449
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>         Attachments: WICKET-4449.patch
>
>
> Since a while o.a.w.Component's and o.a.w.Session #info(), #error(), #success(), etc. methods accept java.io.Serializable.
> With this ticket I suggest a change that will make o.a.w.validation.IValidationError in sync with this.

--
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] [Resolved] (WICKET-4449) Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session

Posted by "Martin Grigorov (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4449.
-------------------------------------

    Resolution: Fixed

The pacth + the last suggestions by Igor are committed to master branch.
                
> Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4449
>                 URL: https://issues.apache.org/jira/browse/WICKET-4449
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>         Attachments: WICKET-4449.patch, WICKET-4449.patch
>
>
> Since a while o.a.w.Component's and o.a.w.Session #info(), #error(), #success(), etc. methods accept java.io.Serializable.
> With this ticket I suggest a change that will make o.a.w.validation.IValidationError in sync with this.

--
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] [Updated] (WICKET-4449) Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session

Posted by "Martin Grigorov (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-4449:
------------------------------------

    Attachment: WICKET-4449.patch

Here an updated version that calls .toString() on the returned Serializable from IErrorMessageSource.
The default behavior is just as it is in 1.5.

I also think we should add MyValidationError (the one in my earlier comment) in -core. With a better name of course. Because it may be used by any application that wants to use Serializable instead of message bundle.
                
> Change IValidationError API to work with java.io.Serializable as other methods (info, error, success, ...) in Component and Session
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4449
>                 URL: https://issues.apache.org/jira/browse/WICKET-4449
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.0.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0
>
>         Attachments: WICKET-4449.patch, WICKET-4449.patch
>
>
> Since a while o.a.w.Component's and o.a.w.Session #info(), #error(), #success(), etc. methods accept java.io.Serializable.
> With this ticket I suggest a change that will make o.a.w.validation.IValidationError in sync with this.

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