/** * @return The Bloodhound built-in "nonword" tokenizer. */ @Nonnull public static JSFieldRef bloodhoundTokenizersNonword () { return bloodhoundTokenizers ().ref ("nonword"); }
/** * window.onbeforeunload * * @param aCallback * Callback function with one parameter (the event) and return type * string to display a message or null to display none. * @return The JS assignment */ @Nonnull public static JSAssignment windowOnbeforeunload (@Nonnull final JSAnonymousFunction aCallback) { return windowOnbeforeunload ().assign (aCallback); }
/** * @return <code>window.location.replace</code> */ @Nonnull public static JSInvocation windowLocationReplace () { return windowLocation ().invoke ("replace"); }
/** * Static field reference. * * @param aField * Field to reference * @return The created {@link JSFieldRef} */ @Nonnull public final JSFieldRef staticRef (@Nonnull final JSVar aField) { return new JSFieldRef (this, aField); }
@Nonnull public JSInvocation invoke () { if (m_aObject instanceof AbstractJSClass) return new JSInvocation ((AbstractJSClass) m_aObject, name ()); if (m_aObject instanceof IJSExpression) return new JSInvocation ((IJSExpression) m_aObject, name ()); throw new IllegalStateException ("The present object " + m_aObject + " cannot be invoked (at the moment)"); }
/** * @param aExpr * Source expression * @return <code>aExpr.options[aExpr.selectedIndex].value</code> */ @Nonnull public static JSFieldRef getSelectSelectedValue (@Nonnull final IJSExpression aExpr) { return aExpr.ref ("options").component (aExpr.ref ("selectedIndex")).ref ("value"); }
@Override protected void onFinalizeNodeState (@Nonnull final IHCConversionSettingsToNode aConversionSettings, @Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aTargetNode) { super.onFinalizeNodeState (aConversionSettings, aTargetNode); addClass (CBootstrapCSS.CUSTOM_FILE); final HCEditFile aEditFile = new HCEditFile (m_sName); aEditFile.addClass (CBootstrapCSS.CUSTOM_FILE_INPUT); addChild (aEditFile); final HCLabel aLabel = new HCLabel (); aLabel.setFor (aEditFile); aLabel.addClass (CBootstrapCSS.CUSTOM_FILE_LABEL); aLabel.addChild ("Choose file"); addChild (aLabel); aEditFile.addEventHandler (EJSEvent.CHANGE, false ? JSHtml.consoleLog (JSExpr.THIS.ref ("files").component0 ().ref ("name")) : JQuery.idRef (aLabel) .empty () .append (JSExpr.THIS.ref ("files").component0 ().ref ("name"))); } }
/** * @return <code>window.location.reload</code> */ @Nonnull public static JSInvocation windowLocationReload () { return windowLocation ().invoke ("reload"); }
/** * Static field reference. * * @param aField * Field to reference * @return The created {@link JSFieldRef} */ @Nonnull public final JSFieldRef staticRef (@Nonnull final JSVar aField) { return new JSFieldRef (this, aField); }
@Nonnull public JSInvocation invoke () { if (m_aObject instanceof AbstractJSClass) return new JSInvocation ((AbstractJSClass) m_aObject, name ()); if (m_aObject instanceof IJSExpression) return new JSInvocation ((IJSExpression) m_aObject, name ()); throw new IllegalStateException ("The present object " + m_aObject + " cannot be invoked (at the moment)"); }
/** * @param aExpr * Source expression * @return <code>aExpr.options[aExpr.selectedIndex].value</code> */ @Nonnull public static JSFieldRef getSelectSelectedValue (@Nonnull final IJSExpression aExpr) { return aExpr.ref ("options").component (aExpr.ref ("selectedIndex")).ref ("value"); }
false ? JSHtml.consoleLog (JSExpr.THIS.ref ("files").component0 ().ref ("name")) : JQuery.idRef (aLabel) .empty () .append (JSExpr.THIS.ref ("files").component0 ().ref ("name")));
/** * @return <code>window.location.host</code> */ @Nonnull public static JSFieldRef windowLocationHost () { return windowLocation ().ref ("host"); }
/** * @return <code>window.location.replace</code> */ @Nonnull public static JSInvocation windowLocationReplace () { return windowLocation ().invoke ("replace"); }
/** * window.onbeforeunload * * @param aCallback * Callback function with one parameter (the event) and return type * string to display a message or null to display none. * @return The JS assignment */ @Nonnull public static JSAssignment windowOnbeforeunload (@Nonnull final JSAnonymousFunction aCallback) { return windowOnbeforeunload ().assign (aCallback); }
@Nonnull public static JSFieldRef ref (@Nonnull final IJSExpression aLhs, @Nonnull final String sField) { return new JSFieldRef (aLhs, sField); }
@Override public void generate (@Nonnull final JSFormatter aFormatter) { aFormatter.generatable (m_aObject).plain ('.').plain (name ()); }
/** * @return <code>window.location.pathname</code> */ @Nonnull public static JSFieldRef windowLocationPathname () { return windowLocation ().ref ("pathname"); }
/** * @return <code>window.location.reload</code> */ @Nonnull public static JSInvocation windowLocationReload () { return windowLocation ().invoke ("reload"); }