当前位置: 首页>>代码示例>>Java>>正文


Java JavaScriptSupport类代码示例

本文整理汇总了Java中org.apache.tapestry5.services.javascript.JavaScriptSupport的典型用法代码示例。如果您正苦于以下问题:Java JavaScriptSupport类的具体用法?Java JavaScriptSupport怎么用?Java JavaScriptSupport使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JavaScriptSupport类属于org.apache.tapestry5.services.javascript包,在下文中一共展示了JavaScriptSupport类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onSaveMapping

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onSaveMapping() {
    // save
    channelMapService.saveMapping(mapData);

    // reload mapping
    mapData = channelMapService.readMapping(currentVdrView.getChannelVdr().get());
    channelNameMapping = channelMapService.getNameMapping();

    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(mappingZone).addCallback(new JavaScriptCallback() {

            @Override
            public void run(JavaScriptSupport javascriptSupport) {
                Link link = componentResources.createEventLink("draggedChannel");
                String baseURI = link.toAbsoluteURI();
                javascriptSupport.require("dragdrop").with(baseURI, ".dragme", ".dropme");
            }
        });
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:21,代码来源:ChannelMap.java

示例2: onUpdateSelectedChannels

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onUpdateSelectedChannels() {
    channelSelectPalette2.processSelectedChannels(request);

    channelMapService
            .replaceIncludeChannel(selectedChannels.stream().map(s -> s.getName()).collect(Collectors.toList()));
    channelMapService.doAutoMapping(currentVdrView.getChannelVdr().get());

    mapData = channelMapService.readMapping(currentVdrView.getChannelVdr().get());

    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(mappingConfigZone).addRender(mappingZone)
                .addCallback(new JavaScriptCallback() {

                    @Override
                    public void run(JavaScriptSupport javascriptSupport) {
                        Link link = componentResources.createEventLink("draggedChannel");
                        String baseURI = link.toAbsoluteURI();
                        javascriptSupport.require("dragdrop").with(baseURI, ".dragme", ".dropme");
                    }
                });
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:23,代码来源:ChannelMap.java

示例3: onRenameGroup

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onRenameGroup(String selectedGroup) {
    if (selectedGroup.startsWith("--")) {
        // internal group, do nothing
        return;
    }

    if (request.isXHR()) {
        group = selectedGroup;
        ajaxResponseRenderer.addCallback(new JavaScriptCallback() {

            public void run(JavaScriptSupport javascriptSupport) {
                javaScriptSupport.require("dialogmodal").invoke("activate").with("groupRename");
            }
        });
        ajaxResponseRenderer.addRender(groupRenameZone);
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:18,代码来源:ChannelConfig.java

示例4: onSuccessFromRenameGroupForm

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onSuccessFromRenameGroupForm() {
    int idx = channelGroups.indexOf(group);
    channelGroups.set(idx, newGroupName);

    List<ExtendedChannel> ch = channelsInGroup.get(group);
    channelsInGroup.remove(group);
    channelsInGroup.put(newGroupName, ch);

    if (request.isXHR()) {
        ajaxResponseRenderer.addCallback(new JavaScriptCallback() {

            public void run(JavaScriptSupport javascriptSupport) {
                javaScriptSupport.require("dialogmodal").invoke("hide").with("groupRename");
            }
        });
    }

    updateZone();
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:20,代码来源:ChannelConfig.java

示例5: update

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
@Override
public void update(final String pageName, final String title, final Block body, final boolean large) {
    if (!updated.get(Boolean.FALSE) && request.isXHR()) {
        updated.set(Boolean.TRUE);

        ajaxResponseRenderer.addRender(TITLE_ID, title);
        ajaxResponseRenderer.addRender(BODY_ID, body);

        callCallback(new JavaScriptCallback() {
            @Override
            public void run(final JavaScriptSupport javascriptSupport) {
                javascriptSupport.require("talentroc/modal-support").invoke("large")
                        .with(new JSONObject("id", MODAL_ID, "large", large));
            }
        });
    } else {
        throw new UnsupportedOperationException("ModalSupport update can only once be used as part as an ajax " +
                "request.");
    }
}
 
开发者ID:talentroc,项目名称:t5-bs-modal,代码行数:21,代码来源:ModalSupportImpl.java

示例6: makeScriptToShowModal

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public JavaScriptCallback makeScriptToShowModal(String name) {
    return new JavaScriptCallback() {
        public void run(JavaScriptSupport javascriptSupport) {
            javaScriptSupport.require("dialogmodal").invoke("activate").with(name, new JSONObject());
        }
    };
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:8,代码来源:UserAdmin.java

示例7: makeScriptToHideModal

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public JavaScriptCallback makeScriptToHideModal(String name) {
    return new JavaScriptCallback() {
        public void run(JavaScriptSupport javascriptSupport) {
            javaScriptSupport.require("dialogmodal").invoke("hide").with(name);
        }
    };
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:8,代码来源:UserAdmin.java

示例8: appendToLog

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public JavaScriptCallback appendToLog(List<String> text) {
    return new JavaScriptCallback() {

        public void run(JavaScriptSupport javascriptSupport) {
            javaScriptSupport.require("appendconsole").with(escape(svdrpCommand), "svdrpconsole", "svdrpinput",
                    JSONArray.from(text));
        }
    };
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:10,代码来源:SvdrpConsole.java

示例9: makeScriptToShowInfoModal

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
private JavaScriptCallback makeScriptToShowInfoModal() {
    return new JavaScriptCallback() {

        public void run(JavaScriptSupport javascriptSupport) {
            javaScriptSupport.require("dialogmodal").invoke("activate").with(recordingInfoModalId,
                    new JSONObject());
        }
    };
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:10,代码来源:Recordings.java

示例10: onAutoMapping

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onAutoMapping() {
    mapData = channelMapService.doAutoMapping(currentVdrView.getChannelVdr().get());

    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(mappingZone).addCallback(new JavaScriptCallback() {

            @Override
            public void run(JavaScriptSupport javascriptSupport) {
                Link link = componentResources.createEventLink("draggedChannel");
                String baseURI = link.toAbsoluteURI();
                javascriptSupport.require("dragdrop").with(baseURI, ".dragme", ".dropme");
            }
        });
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:16,代码来源:ChannelMap.java

示例11: onResetMapping

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onResetMapping() {
    mapData = channelMapService.readMapping(currentVdrView.getChannelVdr().get());

    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(mappingZone).addCallback(new JavaScriptCallback() {

            @Override
            public void run(JavaScriptSupport javascriptSupport) {
                Link link = componentResources.createEventLink("draggedChannel");
                String baseURI = link.toAbsoluteURI();
                javascriptSupport.require("dragdrop").with(baseURI, ".dragme", ".dropme");
            }
        });
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:16,代码来源:ChannelMap.java

示例12: onShowTvmIds

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onShowTvmIds() {
    showTvmIds = true;

    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(mappingZone).addCallback(new JavaScriptCallback() {

            @Override
            public void run(JavaScriptSupport javascriptSupport) {
                Link link = componentResources.createEventLink("draggedId");
                String baseURI = link.toAbsoluteURI();
                javascriptSupport.require("dragdropid").with(baseURI, 1, ".dragme1", ".dropme1");
            }
        });
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:16,代码来源:ChannelMap.java

示例13: onShowTvspIds

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onShowTvspIds() {
    showTvspIds = true;

    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(mappingZone).addCallback(new JavaScriptCallback() {

            @Override
            public void run(JavaScriptSupport javascriptSupport) {
                Link link = componentResources.createEventLink("draggedId");
                String baseURI = link.toAbsoluteURI();
                javascriptSupport.require("dragdropid").with(baseURI, 2, ".dragme2", ".dropme2");
            }
        });
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:16,代码来源:ChannelMap.java

示例14: onShowEpgdataIds

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
public void onShowEpgdataIds() {
    showEpgDataIds = true;

    if (request.isXHR()) {
        ajaxResponseRenderer.addRender(mappingZone).addCallback(new JavaScriptCallback() {

            @Override
            public void run(JavaScriptSupport javascriptSupport) {
                Link link = componentResources.createEventLink("draggedId");
                String baseURI = link.toAbsoluteURI();
                javascriptSupport.require("dragdropid").with(baseURI, 3, ".dragme3", ".dropme3");
            }
        });
    }
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:16,代码来源:ChannelMap.java

示例15: makeScriptToShowEditModal

import org.apache.tapestry5.services.javascript.JavaScriptSupport; //导入依赖的package包/类
private JavaScriptCallback makeScriptToShowEditModal() {
    return new JavaScriptCallback() {

        public void run(JavaScriptSupport javascriptSupport) {
            javaScriptSupport.require("dialogmodal").invoke("activate").with("timerEdit", new JSONObject());
        }
    };
}
 
开发者ID:Zabrimus,项目名称:vdr-jonglisto,代码行数:9,代码来源:TimerView.java


注:本文中的org.apache.tapestry5.services.javascript.JavaScriptSupport类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。