Problem with netsed tables

"Werner Koch" <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Hi all,

I got a serious problem when trying to use nested tables, which are
controlled by different models.

Excerpt from the template:

<table cellpadding="0" cellspacing="0" border="0" width="444">

<tr class="Dir::Iterate_Start.GeoCodeView Dir::Iterate_Next.GeoCodeView">

<td><table>
  <tbody id="carrierElement">
		<tr id="lineMainSpacer0"
class="Dir::Set_Attr.GeoCodeView.lineMainSpacer.id"><td><img
src="../../images/main/pixel_trans.gif" alt="" width="1" height="15"
border="0"></td></tr>
		<tr id="lineMainElement0"
class="Dir::Set_Attr.GeoCodeView.lineMainElement.id">
			<td>
				<table cellpadding="0" cellspacing="0" border="0" width="444">
					<tbody id="carrierMainElement0"
class="Dir::Set_Attr.GeoCodeView.carrierMainElement.id">
            <tr class="Dir::Iterate_Start.GeoCodeCoordinate
Dir::Iterate_Next.GeoCodeCoordinate">

As long as only the outer iteration is in effect, I get the desired result,
meaning that if there are two elements to be produced by GeoCodeView, they
both appear.

When the inner Iteration is in effect, the first row (the one existing in
the template) is produced, and I see that hasNext is called on the inner
Iteration and returns true, but nevertheless, no further rows are produced.
This holds true also for the outer Iteration, which in this case also
produces only one row, but I can also see, that it's hasNext doesn't get
called...

I then have to say, that, there are 4 models in effect on this page.

A 'normal' Model A, which encloses an IterativeModel B, which in turn
encloses two more IterativeModels C and D. The inner
AbstractTemplateModel/IterativeModels C and D are not in effect at the same
time. This means, at any given time, the models {A, B, C} or {A, B, D} are
in effect. The intention is, that Model B starts it's iteration, Model C is
encountered and exhausted, then Model C is encountered and exhausted. Any
more iterations of Model B are done as dictated by the model itself. The
number of times the models can be executed get's determined based on the
data to be displayed and can vary.

Model B 2 Times with
  Model C 3 Times
  Model D once
and
  Model C once
  Model D 2 times

Is there anything wrong with this approach.

Model A
public class EditMetaData
  extends AbstractTemplateModel

Model B, C, D
public class GeoCodeView
  extends AbstractTemplateModel
  implements IterativeModel

Any help is appreciated because I really have no clue what is going wrong,
and the shipping date is imminent!

I have seen the recent thread [Barracuda] Dynamically Processing Nodes,
which means as far as I understand, that parent child Iterative Models
should be possible.

Thank you in advance!

Best regards,	Werner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.