we can look to add those to the interface but maybe it is better to cast to
a Component (that has those methods)
they should be components anyway.. (but we don't have an IComponent ;))

On 9/4/07, David Leangen <[EMAIL PROTECTED]> wrote:
>
>
> Jira issue filed: https://issues.apache.org/jira/browse/WICKET-922
>
> Well, I'm just looking at the Form class. I can't say for sure if there
> are any other problem areas or not, at this point I'm just mentioning
> what's causing a compile error for me.
>
> If we change Button to IFormSubmittingComponent, then in
> onComponentTagBody, there is a problem with the following:
>
>   defaultButton.isVisibleInHierarchy()
>   defaultButton.isEnabled()
>
> Since defaultButton is no longer a button, but isVisibleInHierarchy()
> and isEnabled() are not defined in IFormSubmittingComponent, this won't
> compile.
>
> Also in appendDefaultButtonField, we have:
>   defaultButton.getMarkupId()
>
> Same problem.
>
>
> If those get sorted out in the Form class, then maybe we can think about
> looking at using the interface elsewhere.
>
> >From a low-level perspective, just to get this to compile, I would say
> we need to add those methods to IFormSubmittingComponent. But, from a
> design point of view, I'm not so sure.
>
>
> Cheers,
> Dave
>
>
>
>
> On Mon, 2007-09-03 at 15:37 +0200, Johan Compagner wrote:
> > The intent was that not all kind of components could be a button because
> of
> > the single inheritance that java gives us
> > But like Matej said, everywhere we do an instance check of button we
> should
> > change that to do it on IFormSubmittingComponent
> >
> > johan
> >
> >
> > On 9/3/07, David Leangen <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Been trying to update to 1.3 and encountered some problems with
> > > SubmitLink.
> > >
> > > Before, SubmitLink extended Button, so there were no problems with
> > > forms. SubmitLinks could be used interchangeably with Buttons, and
> life
> > > was good.
> > >
> > > Now, SubmitLink implements IFormSubmittingComponent, so it's breaking
> > > some code. Implementing the interface seems reasonable to me, but the
> > > code hasn't kept up with this change of mentality and there are some
> > > inconsistencies.
> > >
> > >
> > > In the wicket code, I tried changing
> > >
> > >   Form.setDefaultButton(Button button)
> > >
> > > to
> > >
> > >   Form.setDefaultButton(IFormSubmittingComponent button)
> > >
> > >
> > > But this doesn't work, since some methods like onComponentTagBody are
> > > programmed to the Button implementation rather than the
> > > IFormSubmittingComponent interface.
> > >
> > >
> > > It seems like a few things still need to be sorted out, or maybe the
> > > SubmitLink should go back to extending button.
> > >
> > >
> > > What's the story with this? What's the intent with the
> > > ISubmittingComponent interface vs. Button vs. SubmitLink?
> > >
> > > I don't mind trying out some stuff, but please tell me the direction
> > > that you're going with this.
> > >
> > >
> > > Thanks!
> > > David
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to