Hi, On Mon, May 24, 2021 at 3:51 AM Ilya Naryzhnyy <phan...@ydn.ru> wrote:
> Hello, > > I'm thinking about creating JavaScript library for more seamless embedding > Wicket components and pages into external HTML pages. Use case: there is > Wordpress site and it's needed to embed few components into corresponding > pages. Your advice is needed! > > There are few options to do that: > 1) IFRAME. It's the most easiest way, but there are some disadvantages: > problems with SEO, vertical stretching, usability and etc. > 2) Natural embedding through "document.write'. There are also some > disadvantages: styles and scripts namespaces, security and etc. > > But nevertheless second option looks for me pretty interesting. Please stop > me if you think otherwise. > > Logic of embedding: > > 1) User ebbedd special JavaScript library. For example by snippet: "<script > src="http://mywicketsite/wicket-exporter.js"></script>" > 2) User "binds" local element id to some Wicket Component. For example: > WicketExporter.bind("elementId", "com.mypackage.MyComponent', attrsAsJson); > 3) The library "renders" first all required Wicket scripts, libraries and > present required element first as "dummy element". > 4) Through Wicket Ajax Library invoke special "page" which returns > AjaxRequestTarget which replace "dummy element" with required one. > > Your thoughts? > After marrying VueJS and Wicket (https://github.com/OrienteerBAP/vuecket) > I'm sure that it's possible, but, probably, I don't see some obvious > obstacles. > I also don't see any problems doing it! > > Thanks, > > Ilia > --------------------------------------------- > Orienteer(http://orienteer.org) - open source Business Application > Platform >