フォーム要素を作成するかどうかを示します。
createForm="true|false"
ここで、true を指定するとフォームが強制的に作成され、false を指定するとフォームは作成されません。ソースエディタでカスタムの form 要素を作成できます。 デフォルトのフォームの指定については、例を参照してください。
デフォルトでは (このプロパティが指定されていない場合)、フォームが存在しない場合にフォームが作成され、存在する場合は作成されません。
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" createForm="false">
<xp:this.data>
<xp:dominoDocument var="document1" formName="form1"></xp:dominoDocument>
</xp:this.data>
<xp:inputText id="inputText1" value="#{document1.subject}"
style="font-weight:bold">
</xp:inputText>
<xp:button value="submit" id="button1" style="font-weight:bold">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
</xp:eventHandler>
</xp:button>
</xp:view>
これによって、次の XML が生成されます。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title></title>
<script type="text/javascript" src="/domjs/dojo-1.3.2/dojo/dojo.js" djConfig="locale: 'en-us'"></script>
<script type="text/javascript" src="/domjs/dojo-1.3.2/ibm/xsp/widget/layout/xspClientDojo.js"></script>
<link rel="stylesheet" type="text/css" href="/domjava/xsp/theme/webstandard/xsp.css">
<link rel="stylesheet" type="text/css" href="/domjava/xsp/theme/webstandard/xspLTR.css">
<link rel="stylesheet" type="text/css" href="/domjava/xsp/theme/webstandard/xspFF.css">
</head>
<body class="xspView tundra">
<input type="text" id="view:inputText1" name="view:inputText1" style="font-weight:bold" class="xspInputFieldEditBox"><button style="font-weight:bold" class="xspButtonSubmit" type="button" name="view:button1" id="view:button1">submit</button><script type="text/javascript">
XSP.addOnLoad(function() {
XSP.attachEvent("view:_id2", "view:button1", "onclick", null, true, false);
});
</script>
</body>
</html>
フォームが作成される場合 (抑制されていない場合)、XML は以下のとおりです。<html lang="en">
<head>
<title></title>
<script type="text/javascript" src="/domjs/dojo-1.3.2/dojo/dojo.js" djConfig="locale: 'en-us'"></script>
<script type="text/javascript" src="/domjs/dojo-1.3.2/ibm/xsp/widget/layout/xspClientDojo.js"></script>
<link rel="stylesheet" type="text/css" href="/domjava/xsp/theme/webstandard/xsp.css">
<link rel="stylesheet" type="text/css" href="/domjava/xsp/theme/webstandard/xspLTR.css">
<link rel="stylesheet" type="text/css" href="/domjava/xsp/theme/webstandard/xspFF.css">
</head>
<body class="xspView tundra">
<form id="view:_id1" method="post" action="/foo.nsf/xpage2.xsp" class="xspForm" enctype="multipart/form-data">
<input type="text" id="view:_id1:inputText1" name="view:_id1:inputText1" style="font-weight:bold" class="xspInputFieldEditBox"><button style="font-weight:bold" class="xspButtonSubmit" type="button" name="view:_id1:button1" id="view:_id1:button1">submit</button>
<input type="hidden" name="$$viewid" id="view:_id1__VUID" value="!cidukjk9dq!">
<input type="hidden" name="$$xspsubmitid">
<input type="hidden" name="$$xspexecid">
<input type="hidden" name="$$xspsubmitvalue">
<input type="hidden" name="$$xspsubmitscroll">
<input type="hidden" name="view:_id1" value="view:_id1"></form>
<script type="text/javascript">
XSP.addOnLoad(function() {
XSP.attachEvent("view:_id1:_id2", "view:_id1:button1", "onclick", null, true, false);
});
</script>
</body>
</html>