I don't know if this has been discussed before, but when I do application.getMethodTriggerElementName() via the onAction event on a field inside a portal the correct element name is only returned once. The next time you click on that field, I'll get an error (Cannot convert null to an object.).
The problem can be solved when switching to designer. If you go back to "browse" mode, you can click on that field once with no trouble. The next time you get an error again.