Package org.apache.beehive.netui.tags.javascript

Examples of org.apache.beehive.netui.tags.javascript.IScriptReporter


                _state.href = response.encodeURL(uri);
            }
        }

        // We need to combine the onclick features
        IScriptReporter sr = getScriptReporter();
        if (_clientAction != null && srs.isFeatureWritten(CoreScriptFeature.DYNAMIC_INIT)) {
            //@todo: we need to support onclick chaining here also...
            String action = HtmlUtils.escapeEscapes(_clientAction);
            String entry = ScriptRequestState.getString("netuiAction",
                    new Object[]{action});
View Full Code Here


        // @TODO: Is there any way to make this work.  Currently if
        // there is now script container, we will eat the <script> blocks
        // because we cannot write them out in the middle of the tag being
        // written
        IScriptReporter scriptReporter = getScriptReporter();
        ScriptRequestState srs = ScriptRequestState.getScriptRequestState((HttpServletRequest) pageContext.getRequest());
        if (TagConfig.isLegacyJavaScript()) {
            srs.mapLegacyTagId(scriptReporter, _name, realName);
        }
        write(realName);
View Full Code Here

                _state.href = response.encodeURL(uri);
            }
        }

        // We need to combine the onclick features
        IScriptReporter sr = getScriptReporter();
        if (_clientAction != null && srs.isFeatureWritten(CoreScriptFeature.DYNAMIC_INIT)) {
            //@todo: we need to support onclick chaining here also...
            String action = HtmlUtils.escapeEscapes(_clientAction);
            String entry = ScriptRequestState.getString("netuiAction",
                    new Object[]{action});
View Full Code Here

            return null;

        // Legacy Java Script support -- This writes out a single table with both the id and names
        // mixed.  This is legacy support to match the pre beehive behavior.
        String idScript = null;
        IScriptReporter scriptReporter = getScriptReporter();
        ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
        if (TagConfig.isLegacyJavaScript()) {
            idScript = srs.mapLegacyTagId(scriptReporter, id, _state.id);
        }
View Full Code Here

        //Emit javascript if this button needs to sumbit the form or open a popup window
        if (idScript != null || _popupSupport != null || buttonDisable || buttonDisableAndSubmit) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            InternalStringBuilder script = new InternalStringBuilder(32);
            StringBuilderRenderAppender scriptWriter = new StringBuilderRenderAppender(script);
            IScriptReporter sr = getScriptReporter();

            if (buttonDisableAndSubmit)
                srs.writeFeature(sr, scriptWriter, CoreScriptFeature.BUTTON_DISABLE_AND_SUBMIT, true, false, null);
            if (buttonDisable)
                srs.writeFeature(sr, scriptWriter, CoreScriptFeature.BUTTON_DISABLE, true, false, null);
View Full Code Here

     * at this node an moves upward through the parental chain.
     * @return a <code>ScriptReporter</code> or null if there is not one found.
     */
    protected IScriptReporter getScriptReporter()
    {
        IScriptReporter sr = (IScriptReporter) SimpleTagSupport.findAncestorWithClass(this, IScriptReporter.class);
        return sr;
    }
View Full Code Here

     * at this node an moves upward through the parental chain.
     * @return a <code>ScriptReporter</code> or null if there is not one found.
     */
    protected IScriptReporter getScriptReporter()
    {
        IScriptReporter sr = (IScriptReporter) SimpleTagSupport.findAncestorWithClass(this, IScriptReporter.class);
        return sr;
    }
View Full Code Here

        }

        WriteRenderAppender writer = new WriteRenderAppender(pageContext);

        // verify hat we are in a container with run at client on...
        IScriptReporter sr = getScriptReporter();
        ScriptRequestState srs = ScriptRequestState.getScriptRequestState(req);
        if (!srs.isFeatureWritten(CoreScriptFeature.DYNAMIC_INIT)) {
            String s = Bundle.getString("Tags_DivPanelHtmlRunAtClient", null);
            registerTagError(s, null);
            reportAndExit(SKIP_BODY);
View Full Code Here

        }

        // check for the nodes that are expanded...
        // Add the script support for the tree.
        if (_trs.runAtClient) {
            IScriptReporter sr = getScriptReporter();
            if (sr == null) {
                String s = Bundle.getString("Tags_TreeRunAtClientSC", null);
                registerTagError(s, null);
                reportErrors();
                return;
View Full Code Here

        if (hasErrors()) {
            reportErrors();
        }

        // Get the script reporter
        IScriptReporter sr = getScriptReporter();
        if (sr != null) {
            //if (!sr.isInitScriptWritten()) {
            //    String s = Bundle.getString("Tags_ClientReqScriptHeader", null);
            //    registerTagError(s, null);
            //}

            // write out any errors
            ErrorHandling.reportCollectedErrors(pageContext, this);

            // write out the script before the end tag.
            sr.writeScript(_writer);

            if (sr instanceof Html) {
                Html htmlSr = (Html) sr;
                if (htmlSr.getIdScope() != null) {
                    htmlSr.endScope(_writer);
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.tags.javascript.IScriptReporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.