JSF custom component missing auto generated JavaScript when used with Oracle ADF - javascript

am working on project, where custom JSF component is built and it is working fine in test *.jsp page.
But when this custom tag is used within ADF tag, it's not working. (in weblogic server)
<af:showDetailItem ......>
<af:panelGroupLayout ......>
<custom:customComp .... />
</af:panelGroupLayout.>
</af:showDetailItem>
Error Details: Custom tag is rendered properly. When ever I click on any button inside a custom component it won't work. I analyzed rendered output of jsp/adf page using firebug. I found auto generated JavaScript for custom components are missing.
Could anybody please point me out why the JavaScript for (only) custom tag is not loaded.

Check this reference this reference, I believe it should fix your problem

Related

How to embed a Razor component inside an element added on the JavaScript side

Overview
In the Blazor WebAssembly App, I would like to embed a Razor component in a div element newly added on the JavaScript side. Please let me know if there is a better way.
What I want to do
Prepare components such as Sample.razor in advance
Call JavaScript functions in response to button clicks on the initial page
Add div element by createElement in the called JavaScript function
Embed the Sample.razor component within the div element added above
What I tried
Use innerHTML for the div element added in 3. above, and include a call tag for the Razor component.(<Sample></Sample>)
-> Nothing is shown.
Add elements such as iframe/object/embed in innerHTML and include the path to the razor component. (src='/sample')
-> Not Found. (Because this is a WebAssembly app, component pages are not rendered if we request to a server.)
Environment
Visual Studio 2019
.NET 5
Project creation from Visual Studio using Blazor WebAssembly template
If you have prepared the Simple.Razor component in advance, one way you can achieve this is assign this component under if condition as follows,
#If(visible==true){<div><simple></simple></div>}
and on press of a button change visible variable in a function followed by,
StateHasChanged()
and it will do what you want this way you dont have to do JSInjection.

Embed JavaScript and let it use local CSS

I've created a simple html web page using bootstrap.
I've also created a "nice looking" form with Svelte that also uses bootstrap.
The svelte form is hosted on another server/domain. I embed it on my html page by placing a -Tag and than placing my custom html tag where I want to see it.
Embedding the form is no problem, technically everything works but: I would like to remove the bootstrap library from the component because otherwise I load bootstrap twice.
When I remove bootstrap from the form, it loses its style. Using the "refer" option in is no solution.
Do you have any idea how I can make the embeded form use the bootstrap css from the page that it is embeded on?
I just found out that the problem is the so called "Shadow DOM", which is used by Svelte. It protects the svelte component from being modified by global css.
At the moment there is no official way to disable the Shadow DOM :(

How to add react component inside .Net aspx page

I have one react app which provides multiple components like <Button> <Label>. I want to render those component inside apsx page.
For example.
<div>
<ReactComponent/>
</div>
I know we can use iframe in aspx page to render react app or #script.render in cshmtl file. But am looking for some another way to render inside aspx page.
am new to dot net. I have created one ASP.Net web Application using MS visual studio.Any help would be really helpful..
Got this github link for this. enter link description here
Now I want to understand how I can add multiple react components, webpack, babel, package.json etc.
You could create a with a class (e.g. "react-component") and then in your JS code do the following:
ReactDOM.render(, document.querySelector('react-component'));

Use Angular4 functions like (click) [src] inside [innerHTML] of Angular4

I'm using markdown-it compiler to convert markdown text in html which I'm displaying using innerHTML.but problem is that I want to add function to some particular div and use [src] to display sanitized url of youtube in iframe.
it showing me error that sanitizer has stripped some part of code and no javascript functionality is working inside [innerHTML].
I heard that $compiler was the solution in angularJS. is it still available for ANgular4 and yes than can anyone help me to implement it?
Can any one help me to solve this problem?

Adding JavaScript Code to A Single Page in Joomla (Google Remarketing Code)

I would like to add the Google Remarketing JavaScript code to my site. According to Google's documentation, I need to add the code right before the tag in my HTML document. I can easily do this in the template which would add the code to all of my pages. But what if I only want to add the JavaScript code to a single page? What is the best method to go about doing this?
I tried assigning a new module position right before the tag and inserting the code using a custom HTML module. Only problem is, it wrapped the code in a meaning the remarketing code wasn't truly inserted right above the tag.
You could use a module which allows to run custom code in it. There are several solutions to this in the JED: http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/custom-code-in-modules
You could go about this by using JFactory::addScriptDeclaration();. More info can be found about this via the following link:
http://docs.joomla.org/JDocument/addScriptDeclaration
Or, you could try using Google Tag Manager which is a Plugin for Joomla 2.5 and 3.x

Categories

Resources