Shawn:

Could you be more specific about the exceptions?

We check to make sure that the getChildByName method does -not- return one of
the spidersession tags.  You may be able to get away with doing this by checking
to see if:

child.getName().startsWith("SPIDER") or something like that (we use only
subclasses of CSpVisual which implement a common interface, so we check for that
interface).  Note that we loop through ALL of the children in the superpage and
check to see whether they are on the HTML template for the child page.  If so,
they are added.

That might be what is crossing you up:  If your hidden field is called
"MyHidden" on the superpage, you'll still need **MyHidden** in the HTML template
for child pages, or it won't show up.  (Some folks suggested descending into the
Intrp hierarchy and this may be possible, but it's beyond what we've done.)

For parsing, we check for "^", "~" and " " as the delimiters between the name
and the int, though I don't remember why (even though I wrote it at most a
couple of months ago!).

The only thing I notice that may be wrong is that you need to get a reference to
the parent page:

CSpPage parent = CSpider.getPage("ParentPage");
/* even though this code is written into the ParentPage class, the "this"
keyword does not necessarily refer to an instance of that page ... */
CSpVisual visual  = parent.getChildByName(...);
this.addChild(visual);

Perhaps this will help, or if you provide more info about the error, we can move
forward.

Best of luck on this; we've been happy with the results.

-- David.


                                                                  
 (Embedded                                                        
 image moved   [EMAIL PROTECTED]                       
 to file:      05/04/99 12:46 PM                                  
 pic11298.pcx)                                                    
                                                                  



To:   David P Caldwell/GL/KSC/KeyCorp@KeyCorp
cc:
Subject:  NetDynamics - Inherit display fields with custom page class







David,

After reading your technote regarding superclassing display fields within
superclassed pages, I was
inspired to make this work, as it would be very beneficial to what I am
working on.

In my attempt to use the pseudo-code that you provided in your response,
the code for the parent page
throws some major errors in the CP.  I have narrowed it down to the
following lines.

CSpVisual visual = getChildByName(parsedName,CSpVisual.DISPLAY_FIELD_TYPE);
this.addChild(visual); // inherited from CSpVisualclass

Perhaps there are some pieces that I am missing within the pseudo-code.
Could you provide
another piece of code for my understanding?

Thanks for your assistance,

Shawn Keller




pic11298.pcx

Reply via email to