onShow method in tab-panel form

Servoy Developer 2.1.2 in data mode with java 1.5.0 on Linux…

I have a form (let’s call it forma) with a tab-panel, and in the tab-panel is several instances of another form (formb, each one reached by a different a_to_b relation).

I want to run an onShow method on formb, but… this method can’t access a dataprovider (fieldb) from the table on which formb is based (tableb): (``“fieldb” is not defined’').

FWIW, qualifying this as forms.forma.tablea_to_tableb.fieldb makes the eror go away, is not an option, as there are several tablea_to_tableb relations and it’s not obvious which one to use (I need to see the data to figure that out!).

Ahhh, using forms.formb.fieldb the error goes away - that’s a useful workaround, but should it really need to be like this?

Any other ideas?

Thanks,
Neale.

if you get fieldb is not defined then it means that the foundset doesn’t have any records.
So somehow when onShow is called there is no data in the current foundset.
Test this with:

application.output(foundset.getSize());

in youre on show script

No, I don’t think that’s the issue. My point is that the method run as onShow of formb cannot see fieldb (on formb) but can quite happily see forms.formb.fieldb

I’m not sure what to make of this, other than that it was a complete surprise.

Thanks,
Neale.

then i need to see this.
So if you have a solution that demonstrates this that you could send to me?