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

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


                registerTagError(s, null);
                reportErrors();
                return;
            }

            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            if (!srs.isFeatureWritten(CoreScriptFeature.DYNAMIC_INIT)) {
                String s = Bundle.getString("Tags_TreeHtmlRunAtClient", null);
                registerTagError(s, null);
                reportErrors();
                return;
            }

            assert(treeRoot instanceof ITreeRootElement);
            ITreeRootElement tre = (ITreeRootElement) treeRoot;

            Object[] args = new Object[8];
            args[0] = _iState.getImageRoot() + "/";
            args[1] = tre.getObjectName();
            args[2] = _iState.getNodeCollapsedImage();
            args[3] = _iState.getNodeExpandedImage();
            args[4] = _iState.getLastNodeCollapsedImage();
            args[5] = _iState.getLastNodeExpandedImage();
            args[6] = Bundle.getString("Tags_TreeAltTextExpand", null);
            args[7] = Bundle.getString("Tags_TreeAltTextCollapse", null);
            srs.writeFeature(sr, writer, CoreScriptFeature.TREE_INIT, false, false, args);

            tre.setTreeRenderState(_trs);
            tre.setInheritableState(_iState);
        }
View Full Code Here


    {
        String idScript = null;

        // map the tagId to the real id
        if (TagConfig.isDefaultJavaScript()) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            idScript = srs.mapTagId(getScriptReporter(), _trs.tagId, realId, null);
        }
        return idScript;
    }
View Full Code Here

        // 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;
        if (TagConfig.isLegacyJavaScript()) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            if (!ctrlState) {
                idScript = srs.mapLegacyTagId(getScriptReporter(), id, state.id);
            }
            else {
                AbstractHtmlControlState cState = (AbstractHtmlControlState) state;
                if (cState.name != null)
                    idScript = srs.mapLegacyTagId(getScriptReporter(), id, cState.name);
                else
                    idScript = srs.mapLegacyTagId(getScriptReporter(), id, state.id);
            }
        }

        // map the tagId to the real id
        String name = null;
View Full Code Here

    {

        // map the tagId to the real id
        String script = null;
        if (TagConfig.isDefaultJavaScript()) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            script = srs.mapTagId(getScriptReporter(), id, state.id, name);
        }
        return script;
    }
View Full Code Here

        if ((_focus != null) && (_focusMap != null)) {
            String focusName = (String) _focusMap.get(_focus);

            if (focusName != null) {
                String formName = _realName;
                ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
                srs.writeFeature(getScriptReporter(), writer, CoreScriptFeature.SET_FOCUS, false, true,
                        new Object[]{formName, focusName});
            }
        }

        if (_formSubmit) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            srs.writeFeature(getScriptReporter(), writer, CoreScriptFeature.ANCHOR_SUBMIT, true, false, null);
        }

        // output any generated javascript
        if (idScript != null)
            write(idScript);
View Full Code Here

        // 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);
        }

        // map the tagId to the real id
        if (TagConfig.isDefaultJavaScript()) {
            String script = srs.mapTagId(scriptReporter, id, _state.id, _state.name);

            // if we wrote out script in legacy mode, we need to make sure we preserve it.
            if (idScript != null) {
                idScript = idScript + script;
            }
View Full Code Here

        // 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;
        if (TagConfig.isLegacyJavaScript()) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            if (!ctrlState) {
                idScript = srs.mapLegacyTagId(getScriptReporter(), id, state.id);
            }
            else {
                AbstractHtmlControlState cState = (AbstractHtmlControlState) state;
                if (cState.name != null)
                    idScript = srs.mapLegacyTagId(getScriptReporter(), id, cState.name);
                else
                    idScript = srs.mapLegacyTagId(getScriptReporter(), id, state.id);
            }
        }

        // map the tagId to the real id
        String name = null;
View Full Code Here

    protected String renderDefaultNameAndId(HttpServletRequest request, AbstractHtmlState state, String id, String name) {
        // map the tagId to the real id
        String script = null;
        if (TagConfig.isDefaultJavaScript()) {
            ScriptRequestState srs = ScriptRequestState.getScriptRequestState(request);
            script = srs.mapTagId(getScriptReporter(), id, state.id, name);
        }
        return script;
    }
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);
        }
        srs.writeFeature(sr, writer, CoreScriptFeature.DIVPANEL_INIT, true, false, null);

        // figure out if there is a page to render
        String page = _firstPage;
        if (state != null) {
            String fp = state.getFirstPage();
View Full Code Here

    private String mapLegacyTagId(String tagId, String value)
    {
        // @todo: this is sort of broken, it needs to be updated
        IScriptReporter scriptReporter = getScriptReporter();
        ScriptRequestState srs = ScriptRequestState.getScriptRequestState((HttpServletRequest) pageContext.getRequest());
        String scriptId = srs.mapLegacyTagId(scriptReporter,tagId, value);
        return scriptId;
    }
View Full Code Here

TOP

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

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.