HI Kevin, Here it is: https://github.com/martin-g/isis-wicket-summernote I have to polish it (and add docu, currently it mentions wickedcharts because I used it as a quickstart).
Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sun, Dec 6, 2015 at 9:52 PM, Kevin Meyer <[email protected]> wrote: > Hi Martin, > Actually I was unable to make any progress. Between struggling to get the > "content as download" (solved by Return as Clob instead of Object) and > being unable to get Isis to use my RichContent custom value type (and bind > it to epiceditor), I ran out time before having to leave for a workshop. > > I like the idea of being able to get Isis to hook the renderer/ editor > into such a value type, but an annotation would also work well. > > I'm sure you'll be able to get this working really quickly (however you > implement it!) > > Thanks, > Kevin > > On 6 December 2015 20:33:07 CET, Martin Grigorov <[email protected]> > wrote: > >Hi Kevin, > > > >How far did you go with the Summernote integration? > >I will have some time to work on > >https://issues.apache.org/jira/browse/ISIS-1265 in the next days. > >I can start from scratch or finish what you have so far. > > > >Martin Grigorov > >Wicket Training and Consulting > >https://twitter.com/mtgrigorov > > > >On Thu, Nov 26, 2015 at 6:51 AM, Dan Haywood > ><[email protected]> > >wrote: > > > >> On 24 November 2015 at 12:49, Kevin Meyer <[email protected]> wrote: > >> > >> > > >> > >> > >> > >> > >> > >> @Override > >> > >> protected ApplicationAdvice appliesTo(IModel<?> model) { if > >(model > >> > >> instanceof ScalarModel) { Object obj = model.getObject(); > >> > >> if (obj != null) { if (obj instanceof PojoAdapter) { PojoAdapter > >po = > >> > >> (PojoAdapter) obj; > >> > >> > >> > >> ... snip ... > >> > >> > >> > > Your PanelFactory is looking for the @Html annotation on a class > >> > > definition, not on a field definition. > >> > > > >> > > >> > > >> > Is that really the case? With the model being ScalarModel (and I > >think > >> in > >> > the factory I'm installing the component with > >SCALAR_NAME_AND_VALUE). > >> > > >> > When I debug, the obj that's coming in (above) is the String that > >holds > >> > the property in question. > >> > > >> > > >> The object is indeed a string. The ScalarModel basically is the pair > >of a > >> property and its value, or a parameter and its value. The "kind" of > >the > >> ScalarModel determines this. > >> > >> If you trace through ComponentScalarFactoryAbstract, have a look at > >how > >> scalarModel.hasChoices() works for example... basically we look at > >the > >> facet on either the property or the parameter, NOT on the facet of > >the > >> value of the class (ie the string). > >> > >> @Override > >> public ApplicationAdvice appliesTo(final IModel<?> model) { > >> if (!(model instanceof ScalarModel)) { > >> return ApplicationAdvice.DOES_NOT_APPLY; > >> } > >> final ScalarModel scalarModel = (ScalarModel) model; > >> if(!scalarModel.isScalarTypeAnyOf(scalarTypes)) { > >> return ApplicationAdvice.DOES_NOT_APPLY; > >> } > >> final boolean hasNoChoices = !scalarModel.hasChoices(); > >> return appliesIf(hasNoChoices); > >> } > >> > >> > >> In the domain object code if we have: > >> > >> @Html > >> String html; > >> > >> then the facet represents the @Html annotation on the property (or > >> parameter) "String html", not on "String" itself. > >> > >> Hope that makes some sort of sense... > >> > >> Cheers > >> Dan > >> > >> > >> > >> > > >> > > -- > Sent from my phone with K-9 Mail. > Please excuse my brevity.
