HI Brian,

I think we exchanged a few thoughts on our Slack channel [1], but let me
reply more thoroughly here.  Within...

[1] https://cwiki.apache.org/confluence/display/ISIS/Signing+up+to+Slack

On Sun, 29 Dec 2019 at 19:04, Brian K <harvestmoon...@gmail.com> wrote:

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

The wiring together of this stuff changes in v2 (though the classes and
their responsibilities does not), so if it's ok with you I'm not going to
spend any time now improving/fixing the way that this stuff is setup in v1.



> 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?
>
>
The purpose of this new version of the BooleanPanel is for a smoother UI,
that is for the user to just click the checkbox rather than having to enter
edit mode.
Do we think that any given Isis application that there might be some object
properties which use the original UI, and other object properties which use
the smooth UI?  I think the answer to that is "no" - it would be rather
confusing for the interaction mechanism to vary between pages... users
would want consistency.

Therefore, I think that there should probably be some sort of global flag
under "isis.viewer.wicket.xxx" which determines which style of BooleanPanel
to render.

Does that make sense?

Cheers
Dan




> 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