B4J Question [BANano] [SOLVED] - How to build RAW Uncompiled HTML?

Mashiane

Expert
Licensed User
Longtime User
Hi

I'm not sure if this is possible or not.

My scenario is rather simple. This is an attempt to address the use of <template> for VueJS use.

1. I need to build up HTML, preferably via the abstract designer. Code will also do, but rather via the abstract designer
2. I will feed the html into a placeholder, preferably using loadlayout, then get the HTML, preferably with .GetHTML, then save the HTML into a variable and then clear the placeholder. This should still be RAW and uncompiled, for example <template><div><p>bla blah blah</p><div></template>
3. This will be saved in a string variable that I can use later, the placeholder will be cleared using .Empty.

If its impossible, then its fine.

Thanks.
 

alwaysbusy

Expert
Licensed User
Longtime User
As soon as you do this ( I will feed the html into a placeholder...), Vue will kick in and alter your html. This is just how JS frameworks in browsers work. What you want would be BANano generating html like a server, which it doesn't (and never will). LoadLayout does not make html strings, it uses nodes in the browser, building up the final component piece by piece in a parent - child way. And with each node addition, the browser does its thing with the loaded javascript libs, Vue in your case.

BANano is much, much more than just a html builder and uses the browser technology itself to generate the final Website/Webapp so the 'raw' html you are asking for never exists in the BANano workflow.

Maybe something like node.js can do what you want but this is out of scope of BANano. If it is a simple html builder you want using the abstract designer, you can always read the bjl files yourself (code from Erel is somewhere on the forum) to build such a html string.

Alwaysbusy
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Thanks for the clarity. Finally I have green lights.

With BananoVueMaterial, I first build the html string via code. The html for the components is also done in a similar fashion.

Then after building the html code i fire something like new Vue({template:html}). Only when that is done the app comes to life. So I thought.

I was under the impression that the nodes you explained before were only applicable to the invisible <template>, my bad.

This helps me a lot in deciding the future of BananoVueMaterial+AD. We can only build BananoVueMaterial apps via code and not with the abstract designer. *** crying

Thanks again.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…