onAction in a portal

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.

hmm that shouldn’t even work in the first place ;)
(because portal components aren’t acessible yet through javascript, but with elementName they almost are)

i fixed this that it will return always the right name.

But because of this i will also try to fix that portal component fields are accesible in the method editor (added under the element node of the form)

works like a charm on RC5! Great job, guys!

Thanks
Patrick

I was playing around with elements on portal lines, but I have some questions:

If I do: elements.fieldname.bgcolor = ‘ffffff’
all the lines are colored!
Is it possible to color only the current row?

This is also happening when you do that with an element in list or table-view!!

and

elements.fieldname.requestFocus() is not working!
what I want to do is, creating a portalline by a method, and up with the cursor blinking in a specific field in that portalline!
is this possible?

If I do: elements.fieldname.bgcolor = ‘ffffff’
all the lines are colored!
Is it possible to color only the current row?

no.. Because what do you want if for example you then go to the next row? Then that selected row’s fieldname is colored or the previous one?

It is not possible in a table/portal/listview to color an indivual cell.. It will always be the complete row. If you want colors or something then you have to do it with calculations that set html data on a label.

elements.fieldname.requestFocus()

know limitation. In a table/portal this is not possible
Will look after 2.0 if that can be changed.

elements.fieldname.requestFocus()

Fixed in 2.0RC10.
it will nog work in Record/List/Tableview and also in a portal.

GREAT! :D