Hello Parth,
currently, we have not planned the support for checkboxes within the Tag Library of X-Application. Perhaps, it will be a solution when we support data types. Then, for Boolean types the edit tag could create a checkbox by default.
However, for your use case, this solution would not be sufficient. What you need is the evaluation of the checkbox values combined with a application-specific modification on your document(s). For the current version 3.1.2 of X-Application, the only solution I can propose is to use Scriptlets: embedded Java Code within the page which is invoked when the user sends the form with the check boxes.
Within the Scriptlets
- access the standard request object of JSP pages to extract the checkbox parameter,
- access the sessionContext object (see changelog.txt of your X-Application directory for an example)
- access your document:
BusinessDocument doc = sessionContext.getWorkspace().lookup(?the name of the document?);
- set the values depending on checkbox parameters
…
doc.getDescendant(?path to an acessory?).setValue(?accessory price?);
…
Use also Scriptlet code
- to calculate the sum.
- when you have to fill the checkbox
For the next version 3.1.3 of X-Application, we support a plugin mechanisms. Then, the calculation of the sum can be invoked by an element action and the code is part of a java classes you implement for your business logic.
For the checkbox evaluation, I don?t know if it?s possible to deliver a plugin which could support you. It would be interesting for us, when you could sent us your schema and the JSP page containing the checkboxes. Then, we could try out the implementation of checkbox evaluation via plugin and give some hints about this topic.
Many thanks,
Christian.
#webMethods#API-Management#Tamino