Hello,
I looked for a simple solution with version 3.1.3. My first idea was to commit the complete BusinessDocumentPage (represents the of currently displayed documents of a browse tag). This could be solved by a plugin, so committing was not the problem.
When I tried out this solution I recognized that the edit tags for an element within the browse tag create the same path because the document context does not change. I could change the values of the input fields, but the result was stored within the last displayed document.
The question was,
(1) how to give the currently iterated document an individual name.
(2) how to address these documents with individual within the browse tag.
Giving a name was easy, via setvar tag and plugin:
<BR><xapp:browse document="multiEditDocs" pagesize="5"><BR> <xapp:setvar name="docName">multiEditDocs<xapp:display select="$POS"/></xapp:setvar><BR> <xapp:directcommand type="mapDocument" arg="${docName$}"/><BR> ...<BR></xapp:browse><BR></pre><BR>The currently iterated document with name ?multiEditDocs? is mapped to ?multiEditDocs? + number. Instead of one document per iteration. The number of documents increases until the pagesize (5) is reached. At the end of the evaluation of the browse tag, we have documents with the names<BR><BR>?multiEditDocs1? , ?multiEditDocs2?, ... , ?multiEditDocs5?<BR><BR>But now I didn?t find out a solution how to address documents with a xapp:form tag. The only way I found was to change the source code of the xapp:form tag. Instead of a ?fix? value of the attribute ?document?, the value is evaluated by a variable handler. In this way, the following code is possible <BR><BR><pre class="ip-ubbcode-code-pre"><BR><xapp:browse document="multiEditDocs" pagesize="5"><BR> <xapp:setvar name="docName">multiEditDocs<xapp:display select="$POS"/></xapp:setvar><BR> <xapp:directcommand type="mapDocument" arg="${docName$}"/><BR> <xapp:form document="${docName$}"><BR> <tr bgcolor="#DDDDDD"><BR> <td width="30%"><xapp:display select="$ID" /></td><BR> <td width="30%"><xapp:display select="/Property/Address/State" /></td><BR> <td width="30%"><xapp:edit select="/Property/Price" /></td><BR> </tr><BR> </xapp:form><BR></xapp:browse><BR>
Before posting the solution, I will have a talk with my colleagues, if there is a simpler solution. And, if not, what are the risks of changing the form tag.
Bye,
Christian.
#webMethods#Tamino#API-Management