I have a situation where i would like to provide an add button at the top row of an html table and have a loop iterate and print the sequence of nodes that have been added in consecutive rows of the table.
The problem i run into is that I have an xapp:elementaction with a base set to a loop context that has not yet been defined sequentialy in the jsp file. When loading the page I receive an
Error message: No such node select = “null”, extselect = “null” with base = “budget_loop”
budget_loop is the context into which i would like to insert a “budget” element with the add button.
The “budget” element (/Capability/descriptors/budgets/budget) is located in my “Capability” schema which i have attached to the following optional attributes post
the following html snippet will illustrate the situation in detail.
Q1 : Is there a way to get something like this to work?
Q2 : Does loop context haveto be defined in the jsp file before an xapp:elementaction with base=loop targetbase can be valid ?
Hello,
you could try out the following approach with a ‘dummy’ loop just before using the insertAfter.
Repeat the loop, but use an empty body.
<xapp:loop document="CapabilityDocument" select="/Capability/descriptors/budgets" iterate="budget" targetbase="budget_loop">
</xapp:loop>
Bye,
Christian.
Thanks Christian,
Your suggestion did the trick…
this would be something that might be added to the “tips & tricks” part of the XApplication documentation
thanks again…
–joeycz
X-Application Version: 4.1.1
Tamino Version : 4.1.1
Platform : Win2k
WebContainer : Tomcat 4.1.18
JDK Version : 1.4.1