我有一个代理设置为每天8:00运行
我想编写一个java代码(在共享库中)并从代理调用该参数库.
例如:
代理代码:
// ....
checkAndSendMail(email_1);
checkAndSendMail(email_2);
// ....
Run Code Online (Sandbox Code Playgroud)
java库代码:
public class Check{
public void checkAndSendMail(String email_param){
// ...
mail.send(email_param);
// ...
}
}
Run Code Online (Sandbox Code Playgroud)
我创建了一个包含3个字段的表单和一个包含3个字段的xpage.每个xpage字段使用数据源绑定到表单字段(数据源名称:ds1)
我成功创建并保存了文档.当我单击保存按钮时,我执行
ds1.save()
Run Code Online (Sandbox Code Playgroud)
3个字段数据类型之一是日期/时间,我从xpage传递一个字符串,如:dd/MM/YYYY(15/02/2014)当我在Notes客户端中打开文档并转到文档属性时,我看到该字段作为文本列表数据类型.如果我双击文档并再次保存,那么在文档属性中数据类型将更改为日期/时间,这就是我想要的.某种翻译会在重新保存时运行,也许就像computeWithForm ...
问题是,如何在我的代码中重新保存?
我试过了:
ds1.save();
ds1.getDocument().computeWithForm(false, false);
ds1.getDocument().save();
Run Code Online (Sandbox Code Playgroud)
但它不起作用.有任何想法吗?
我发现将日期存储在注释形式的Datetime字段中的唯一方法是:
theDoc2.replaceItemValue("lastAccess",session.createDateTime("Today"));
Run Code Online (Sandbox Code Playgroud)
但这只会创建一个Date,而不是DateTime。另外,我不想创建像“今天12”这样的静态时间,但我希望动态地使用当前日期时间。
使用这个我得到一个错误(调用方法NotesDocument.replaceItemValue(string,Date)null发生异常):
theDoc2.replaceItemValue("lastAccess",@Now());
Run Code Online (Sandbox Code Playgroud)
并使用此,窗体字段从日期/时间更改为文本数据类型,我想保留日期/时间类型:
theDoc2.replaceItemValue("lastAccess",@Now().toLocaleString);
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我有一个包含列表的网页.在每个li中都有一个标签.a标签包含文本和图像.这是html:
<li class="li-one" style="">
<a href="#" onclick="return false"><img class="theimg" src="...." width="18" height="12" alt="" title="">myText</a>
</li>
Run Code Online (Sandbox Code Playgroud)
我尝试使用这个jquery但是图像也被删除了:
jQuery(document).ready(function($){jQuery(".li-one").text("");});
Run Code Online (Sandbox Code Playgroud)
如何用jquery删除文本(myText)?
我用这种方法创建了一个适配器:
function getLocation(gpsLat, gpsLong) {
path = "/maps/api/geocode/json?latlng=" + gpsLat + "," + gpsLong + "&sensor=false";
var input = {
method : 'get',
returnedContentType : 'json',
path : path
};
return WL.Server.invokeHttp(input);
}
Run Code Online (Sandbox Code Playgroud)
适配器配置是这样的:
<displayName>GPSLocator</displayName>
<description>GPSLocator</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>maps.googleapis.com</domain>
<port>80</port>
<!-- Following properties used by adapter's key manager for choosing specific certificate from key store
<sslCertificateAlias></sslCertificateAlias>
<sslCertificatePassword></sslCertificatePassword>
-->
<proxy>
<protocol>http</protocol>
<domain>15.1.0.111</domain>
<port>8080</port>
</proxy>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="getLocation" />
Run Code Online (Sandbox Code Playgroud)
当我右键单击并运行Invoke WL Adapter时,我收到此错误:
{
"errors": [
"Runtime: …Run Code Online (Sandbox Code Playgroud) 什么是Class[] null和Object[] null下面的代码是什么意思?
public Object selfFactory() {
Class cl = this.getClass();
Constructor cons;
cons = cl.getConstructor((Class[]) null);
return cons.newInstance((Object[]) null);
}
Run Code Online (Sandbox Code Playgroud) lotus-domino ×3
xpages ×3
java ×2
lotus-notes ×2
class ×1
constructor ×1
datasource ×1
datetime ×1
html ×1
javascript ×1
jquery ×1
reflection ×1
xpages-ssjs ×1