Web client .""element" name problems

I’ve come to a new issue while working with the web client. Working with a validation of named fields. I’m using the standard loop through a from to get element names.

Like:
var checkName = forms.GD_entryDB.elementsgetName();

  • var check = checkName.slice(0,3);*
  • if (check == ’ fld’)*
  • —etc*
    On the web client I have major problems getting the first line to generate checkName. So I modified it as follows
    var checkElement = forms.GD_entryDB.elements*;
    _
    var checkName = checkElement.getName();_
    _
    var check = checkName.slice(0,3);_
    _
    if (check.equalsIgnoreCase(‘fld’))_
    Even with this I am still getting Javascript erros in the webclient Usually:
    TypeError: undefined is not a function. (validateWebFormDB; line 10)
    And since I can’t use popups, I am mailing myself the var info. In Developer I get what I expect.
    like: “fld_entry_marital_status”
    In web client I get a different return
    like “fld_entry_marital_status_element_3660”
    _
    … of and in many case an empty string if I attempt to mail myself every named element, which cause problems of course.*_
    So I guess the question is. Is this expected operation? And how much code modification will be expected to get something like this working in the web client?
    I guess I will have to rap for null in the element nam at this point.

i tried to reproduce this with our current beta

just have a script that does this:

for(var i=0;i<elements.length;i++)
{
application.output(elements*.getName());*
}
The webclient output:
WebClient: course
WebClient: label
WebClient: button
WebClient: portal_course_pages_to_course_pages_70
WebClient: sadf
The smartclient:
sadf
portal_course_pages_to_course_pages_70
bean_1010
button
label
course
This output is by the way a feature that hasn’t made it into beta1. After beta1 you can just do application.output and it the output of the webclient will be in the console of the developer method editor.
I hope we can improve that even further that you also can debug through code via the webclient.

Not sure if I understand correctly. Though for some reason I have completely missed the whole application.output thing. So thanks for that!

What I get is 2 list. In developer every named item is listed. In WebClient only data entry fields are listed, all other named items are listed as null. The matching lists then break down as I said before:

Servoy( like this):
fld_entry_news
fld_entry_address_line3
fld_entry_address_line2
fld_entry_address_line1
fld_country_id

web Client (like this):
fld_country_id_element_3642
fld_entry_address_line1_element_3644
fld_entry_address_line2_element_3646
fld_entry_address_line3_element_3647

They are in reverse order also. Also the field “fld_entry_news” is a checkbox which errors as undefined in web client and runs fine in Servoy.

I’'ve simply parsed out the whole “element####” thing for now. And that seems to solve the problem pretty well. Now for the checkbox.

is this 3.0beta1?
Can you make a case and send in a sample solution?
http://crm.servoy.com/servoy-webclient/ … oy_support