我需要在某些行中禁用行编辑器(因为它们的特定数据)我搜索太多但我找不到这样做的方法.
我有两种类型的行,状态为A的行和状态为B的行.
我想为行A启用铅笔并禁用行B.
我需要知道如何
使用push ... 在index2.xhtml中更改数据时如何在index1.xhtml中更新DataTable ...我在index1.xhtml中定义socket,如下所示:
<p:socket channel="/table" onMessage="handle"/>
Run Code Online (Sandbox Code Playgroud)
在豆子里:
public void contract(){
....
PushContext pcont=PushContextFactory.getDefault().getPushContext();
pcont.push("/table",something);
}
Run Code Online (Sandbox Code Playgroud)
我不知道的是我如何在javaScript中更新dataTable:
<script type="text/javascript">
function handle() {
???
}
</script>
Run Code Online (Sandbox Code Playgroud) 我尝试使用 JCaptcha 组件制作验证码,并且需要在相关 servlet 中对图像进行编码。所以根据 JCaptcha 教程,我应该使用 JPEGImageEncoder,它与 JDK7 不兼容。我还可以做些什么?
这是代码的相关部分:
ByteArrayOutputStream jpegOutputStream = new ByteArrayOutputStream();
BufferedImage challenge =
CaptchaServiceSingleton.getInstance().getImageChallengeForID(captchaId,
httpServletRequest.getLocale());
JPEGImageEncoder jpegEncoder =
JPEGCodec.createJPEGEncoder(jpegOutputStream);
jpegEncoder.encode(challenge);
} catch (IllegalArgumentException e) {
httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
} catch (CaptchaServiceException e) {
httpServletResponse.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return;
}
Run Code Online (Sandbox Code Playgroud) 我定义了这个Bean:
<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg name="mongoDbFactory" ref="mongoDbFactory" />
<constructor-arg name="mongoConverter" ref="mongoConverter" />
</bean>
Run Code Online (Sandbox Code Playgroud)
并且我实例化了一个mongoOprations使用此Bean的对象,现在我想知道Spring mongoTemplate线程安全吗?
在我的情况下,我有四种方法来解决我的问题:
index.html并禁用缓存(对我不起作用)index.html为index.jsp并禁用缓存,如下所示(对我有用,但我的客户组需要index.html)web.xml区分所需的请求并禁用缓存我的问题是如何使用 Spring Security 禁用缓存index.html
(也许使用intercept-urlinhttp标签)