{
}
public void startExamplePanel()
{
ItsNatDocument itsNatDoc = getItsNatDocument();
Document doc = itsNatDoc.getDocument();
if (itsNatDoc.isLoading())
{
StringBuilder msg = new StringBuilder();
msg.append("alert(\"This example (Java to JavaScript Generation) do not work in load time, ");
msg.append("the value attribute do not change a textarea on load time, ");
msg.append("click on any tab and return here\");");
itsNatDoc.addCodeToSend(msg);
}
HTMLTextAreaElement textAreaElem = (HTMLTextAreaElement)doc.getElementById("textAreaId");
ScriptUtil scriptGen = itsNatDoc.getScriptUtil();
String code;
String msg = "A Java String 'transported' \n\t as a \"JavaScript\" string";
String textAreaElemJS = scriptGen.getNodeReference(textAreaElem);
String jsStrLiteral = scriptGen.getTransportableStringLiteral(msg);
code = textAreaElemJS + ".value = " + jsStrLiteral + ";";
itsNatDoc.addCodeToSend(code);
log(code);
code = scriptGen.getSetPropertyCode(textAreaElem,"value",msg,true);
itsNatDoc.addCodeToSend(code);
log(code);
code = scriptGen.getCallMethodCode(textAreaElem,"select",null,true);
itsNatDoc.addCodeToSend(code);
log(code);
}