Hi Johannes,
I agree that a new extension point is needed to achieve what you want.
However I cannot evaluate your proposal,
in terms of "where it would happen" in the AbstractStylePage code.

The component you're trying to add is basically an additional style editor,
so it would have to go on the lower part of the page,
right on top of the CodeMirror editor, and be available as people switch
between tabs, e.g., I'm guessing it should still be visible
when the map preview is on. And behave correctly when the "full screen"
editor mode is enabled.

If that's what you're looking for, then we agree :-D

Cheers
Andrea

On Wed, Feb 10, 2021 at 5:24 PM Johannes Weskamm <[email protected]>
wrote:

> Hi,
>
>
> I am currently investigating the possibility to introduce the geostyler
> community extension into the different styling tabs.
>
> At the moment, the extension hooks into the styling UI by creating a new
> separate tab through the usage of the class
> `org.geoserver.wms.web.data.StyleEditTabPanelInfo`.
>
> This solution is not ideal, as the extension (and maybe other extensions
> as well) is not really integrated / directly next to the sld editor.
>
> Please have a look at this screenshot to get an idea what i intend to
> do:
>
> https://github.com/geostyler/geostyler/discussions/1324#discussioncomment-357127
>
> I am still trying to figure out what other options there are, but it
> seems at least for the styling there is no way of having a custom class
> injected into the AbstractStylePage, which seems to be the right entry
> point as it is the parent of all styling tabs.
>
> My current solution makes minor changes to that class
>
> (src/web/wms/src/main/java/org/geoserver/wms/web/data/AbstractStylePage.java):
>
> WebMarkupContainer styleComponents = new
> WebMarkupContainer("styleComponents");
> styleComponents.setOutputMarkupId(true);
> List<StyleComponentInfo> compInfo =
> getGeoServerApplication().getBeansOfType(StyleComponentInfo.class);
> for (StyleComponentInfo comp: compInfo) {
>     try {
>         Component c = (Component)
> comp.getComponentClass().getConstructor(String.class,
> AbstractStylePage.class)
>             .newInstance(comp.getId(), this);
>         styleComponents.add(c);
>     } catch (Exception e) {
>         throw new WicketRuntimeException(e);
>     }
> }
> styleForm.add(styleComponents);
>
>
> That way i am able to inject my own extension class in the right spot.
> But as this changes code in the core, i fear this may not be the way to go.
>
> Are there any other ways to reach my goal and if not, do you see chances
> that this change may get into the core when the usual requirements for
> such a PR are met?
>
>
> Thanks in advance!
>
>
> Johannes Weskamm
>
>
>
>
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>


-- 

Regards, Andrea Aime

== GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa
(LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
http://www.geo-solutions.it http://twitter.com/geosolutions_it
------------------------------------------------------- *Con riferimento
alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto, gli eventuali
allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
sarei comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European Regulation 2016/679
“GDPR” - copying, dissemination or use of this e-mail or the information
herein by anyone other than the intended recipient is prohibited. If you
have received this email by mistake, please notify us immediately by
telephone or e-mail.*
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to