This content has been marked as final. Show 4 replies
I think you will need to iterate up the hierarchy like you are attempting to do until you find a page object. There are two ways to check to see if an object is of a given class. You can narrow it as you were doing. Although for this you will probably want to use unchecked_narrow. It doesn't throw and exception, it simply either returns the narrowed object or null.
The other way is to use the _is_a method. It takes an object model id. You can get that from the Helper object. So for example:
Thanks a lot for your reply.
I really prefer the "safer method" which is what I was looking for (be sure the kind of object is the good one).
I'll post a message if this works for me.
This method works fine for me. Thanks for your help.