I am afraid if you create a iformcomponent that then those 2 methods are not enough an people start to expect that the can just randomly create a component implement the interface and they are done..
So for such an interface to exist then it also really have to be used every where and not just in our testing part. What i would do is just check in the tester with instanceof and cast to what it finds On 12/20/07, Gerolf Seitz <[EMAIL PROTECTED]> wrote: > Hi folks, > > FormTester#submit(String) takes a buttonComponentId for submitting the Form > with an alternate button. > in #setValue, the corresponding Component is cast to a FormComponent. this > makes it impossible to pass the id of > a SubmitLink to #submit(String). > #setValue only calls getInputName on the formComponent. the same method > happens to be declared in > IFormSubmittingComponent (IFSC) (which is implemented by AbstractSubmitLink) > > the idea is the following: > + create a new interface IFormComponent > + move the methods IFSC#getInputName and IFSC#getForm to IFormComponent > + let IFSC extend IFormComponent > + let FormComponent implement IFormComponent > + let FormTester#setValue cast to IFormComponent instead of FormComponent > > this way, there's no API break, but FormTester can use > IFormSubmittingComponents too. > > wdyt? > > Gerolf > > > P.S.: suggestions for a better name than IFormComponent are much > appreciated. >
