Table view elements.allnames

Hi,

using servoy 7.4.8 smartclient,

I want to get all the elements that are present on table view form, all elements needed are named
[attachment=2]tableview1.png[/attachment]
[attachment=1]tableview.png[/attachment]

when I run this ```
$elem = elements.allnames

I see all the elements except the labelfor elements (lbl_ prefixed),
[attachment=0]result.png[/attachment]

Is this expected behaviour?

Regards,

Peter

Hi Peter,

as far as I know that has been the behaviour from the very start (when it was first implemented in v3.5)
The labels have always been a replacement for the default table headers (which you obviously can not control either)

You should be able to grab them through solutionModel though.

Can you explain in a bit more detail what you are trying to achieve here?

Hi Marc,

was just wondering why they don’t show when using

$elem = elements.allnames

because when I do

var $form	= solutionModel.getForm(event.getFormName());
var $elems  = $form.getComponents();

every element on the passed form is listed…

Regards,

Peter

Hi Peter,

The first approach gives you all the elements at runtime. As Marc already mentioned the table headers were never accessible as such so they don’t show up.
The second approach actually looks at the blueprint of the form (not the runtime instance of it) and sure enough it shows the labels you defined at design time.
So the difference is that one reflects the actually form instance and the other the form blueprint.

Hope this helps.

ROCLASI:
The first approach gives you all the elements at runtime. As Marc already mentioned the table headers were never accessible as such so they don’t show up.
The second approach actually looks at the blueprint of the form (not the runtime instance of it) and sure enough it shows the labels you defined at design time.
So the difference is that one reflects the actually form instance and the other the form blueprint.

Check :wink:

Thanks for the explanation

Regards,
Peter