Hi Dan,

I followed the wicket viewer docs [1] and was able to call my custom
component after doing the following.

I implemented a copy of BooleanPanel, BooleanPanelFactory,
I created a subclass of ComponentFactoryRegistrar and IsisWicketApplication
I referenced my new IsisWicketApplication in the webapp module's web.xml.
Overriding the init() method per the docs, I can see it is being called,
but the newIsisWicketModule() method is not being called.

Turns out, newIsisWicketModule(isisConfiguration) was being called.  I am
overriding that method now, and just one more discrepancy:
The docs sample code has the extension of ComponentRegistrarDefault add the
default componentFactories before adding the custom one.  This used the
default BooleanPanelFactory instead of my custom one.  When I added the
custom one first then it used the custom one.

I put in a trivial html change to verify my component is being used.  I'll
be adding the useful parts next.  I'm using the ScalarModel's cssClass to
determine whether appliesTo() will select the custom component.  Is there a
better way to identify places to use it, like another annotation or
@PropertyLayout entry?

Thanks,
Brian

[1]
http://isis.apache.org/versions/1.16.2/guides/ugvw/ugvw.html#_ugvw_extending_replacing-page-elements

On Sun, Dec 1, 2019 at 8:45 AM Dan Haywood <d...@haywood-associates.co.uk>
wrote:

> Hi Brian,
>
> Apols for the delay.
>
> First port of call - did you look at the docs on replacing page elements?
> [1] .
>
>
> [1]
>
> http://isis.apache.org/versions/1.16.2/guides/ugvw/ugvw.html#_ugvw_extending_replacing-page-elements
> (nb: this is for v1.16.2, it seems the v1.17.0 doc formatting is slightly
> messed up, but the content didn't change between these two versions, I
> think).
> <
> http://isis.apache.org/versions/1.16.2/guides/ugvw/ugvw.html#_ugvw_extending_replacing-page-elements
> >
>
>
> On Sun, 17 Nov 2019 at 05:36, Brian K <harvestmoon...@gmail.com> wrote:
>
> > Yes that would be great!  I'm seeing how much I can do with the wicket
> > viewer to make a fluid user experience.  The Wicket project itself seems
> to
> > indicate a lot is possible.
> >
> > -Brian
> >
> > On Sat, Nov 16, 2019, 1:43 AM Dan Haywood <d...@haywood-associates.co.uk>
> > wrote:
> >
> > > Hi Brian,
> > > I agree, it is a bit clunky. I'm afraid it would require a new
> component
> > to
> > > be written. Contributions welcome, I can provide some guidance if
> you're
> > > willing.
> > > Cheers,
> > > Dan.
> > >
> > > On Fri, 15 Nov 2019, 19:52 Brian K, <harvestmoon...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > For 1.17 and 2.0, Boolean properties are displayed in the Wicket
> viewer
> > > > something like this:
> > > >
> > > > sample        [X] Yes
> > > >
> > > > Clicking on the checkbox itself is disabled, while clicking on the
> text
> > > > next to it brings up an inline edit prompt (without the text) that
> > allows
> > > > you to click on the checkbox.
> > > >
> > > > Question:  How can I have the property display with a simple
> checkbox,
> > > > similar to how it displays when editing inline?  Is there a setting
> > > > somewhere or would this require coding a new wicket component?
> > > >
> > > > Thank you!
> > > > Brian
> > > >
> > >
> >
>

Reply via email to