本文整理汇总了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");
}
});
}
}
示例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");
}
});
}
}
示例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);
}
}
示例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();
}
示例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.");
}
}
示例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());
}
};
}
示例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);
}
};
}
示例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));
}
};
}
示例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());
}
};
}
示例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");
}
});
}
}
示例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");
}
});
}
}
示例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");
}
});
}
}
示例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");
}
});
}
}
示例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");
}
});
}
}
示例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());
}
};
}