@Nullable public IHCNode build () { return new HCScript (getAsJSObject ()); }
@Nullable public IHCNode build () { return new HCScript (getAsJSObject ()); }
/** * Depending on {@link #isGenerateOnDocumentReady()} wrap the passed JSCode in * the matching HTML element (either {@link HCScriptOnDocumentReady} or in * {@link HCScript}. * * @param aJSCode * The JS code to be wrapped. May not be <code>null</code>. * @return The non-<code>null</code> HCNode */ @Nonnull public IHCNode getWrapped (@Nonnull final IJSCodeProvider aJSCode) { return m_bGenerateOnDocumentReady ? new HCScriptOnDocumentReady (aJSCode) : new HCScript (aJSCode); }
ret.add (nFirstIndex, new HCScript (aMergedJS)); return ret;
@Nullable public HCNodeList build () { registerExternalResources (); final HCNodeList ret = new HCNodeList (); // Placeholder ret.addChild (new HCDiv ().setID (m_sTreeID)); // JS Code final JSAssocArray aJSOptions = getJSOptions (); ret.addChild (new HCScript (invoke ().arg (aJSOptions))); return ret; }
/** * Create a readonly edit that contains the value of the selected file. It can * be placed anywhere in the DOM. * * @param sPlaceholder * The placeholder text to be used if no file is selected. * @return A nodelist with the edit and a JavaScript */ @Nonnull public HCNodeList createSelectedFileEdit (@Nullable final String sPlaceholder) { final HCEdit aEdit = new HCEdit ().setPlaceholder (sPlaceholder).setReadonly (true); final HCScript aScript = new HCScript (JQuery.idRef (m_aEdit) .on ("change", new JSAnonymousFunction (JQuery.idRef (aEdit) .val (JSExpr.THIS.ref ("value"))))); return HCNodeList.create (aEdit, aScript); } }
aInvocation.arg (jsFlashvars).arg (jsParams).arg (jsAttributes); ((IHCNodeWithChildren <?>) aParent).addChild (new HCScript (aInvocation));
ret.addChild (new HCScript (aCode));