Portal Strange behavior

I was working with portals this weekend. I noted that sometime the portal would not add new records through the relationship when I used:

portal_relationship.newRecord();

Sometimes I would get an error that said Jave null point exception. This caused other bizarre behavior on the form like the rolodex in the upper left hand corner saying that record ‘0’ was being displayed. I changed everything many times with no relief. I finally just deleted the portal element and contructed a new one and the problem when away. I had a similiar problem on another portal as well.

John McCann
Windows 2.0 beta 4 Firebird 1.0

please send us a solution when you have that behaviour agian.

jcompagner:
please send us a solution when you have that behaviour agian.

I have included a solution that demonstrates the problem discussed above. It also demonstrates the problem I mentioned validating radio button fields and unexpected (maybe normal but unexpected) behavior when using related database values to display value list in portals. My first attempt at exporting a solution so hopefully you get it.

Thanks

John McCann

Ok 2 problems as you describe:

1> radio’s don’t work like combo, you can change them.

i have fixed this, content changed came before focus gained. made a check for this.

2>

portal element.contentchanged method.
Yes this is logical. you have to do controller.saveData()
Contentchanged doesn’t mean that the database is updated. That only happens when a saveData is triggerd (or by a script or by the gui like going to next record) We don’t save everytime one field changes..

That duplicate foundset is overkill just call saveData.

I don’t see that null pointer yet. Can this also be seen in that solution?

The problem with the null pointer cannot be seen in that solution. I was getting some other strange behavior that other could not be reproduce, so I deleted my database and rebuilt it. After rebuilding it, this problem has gone away. I am sorry if I led you down a blind alley.

Thanks

John McCan