I would like to know if it is possible to create a Struts2 tag (e.g. ) inside a JavaScript function or using jQuery.
For instance, I tried:
function createStrutsTag(){
var newElement;
newElement= document.createElement("div");
newElement.className = 'newer';
newElement.innerHTML = '<s\:textfield label="HELLO" \/>';
newElement.css('visibility','visible'); }
However, it just created the div containing the label < s:textfield label="HELLO" /> without being parsed to its real meaning.
I also tried with struts2-jquery-plugin tags (sj) which also crashed...so I would like to know if it can be done or I should create those elements in the HTML part of the body, being hidden by CSS style and then show or hide them using JavaScript /jquery functions as they are needed by the application.