Problems with latest downloaded version ...

I’ve had a view problems with my v. of the libs since the last update:

  1. layout.cells(“a”).view(“form”).setActive() No longer works as before … In some places I got round it by actually giving the “def” view a different name.

it use to work as follows:
form1 = layout.cells(“a”).attachForm(cfgForm1);
form2 = layout.cells(“a”).view(“form2”).attachForm(cfgForm2);

and you could switch between:
layout.cells(“a”).view(“def”).setActive()
layout.cells(“a”).view(“form2”).setActive()

  1. form.setReadonly(“inputbox”,true) … now fails

  2. previously documented changes in handling of buttons

etc…

Am I doing something wrong or was that a “broken” update ?

ps. my dhtmlx.js says:

size: 1,20 MB (1.264.652 bytes)
created: ‎martedì ‎4 ‎settembre ‎2012, ‏‎11:14:00

Following up on my comments above, please find attached example of “setActive” not working…

If you click on the plus sign, it should execute the code starting at line 112 (gRid = -1)
at line 116 it should bring up the
emailLayout.cells(“a”).view(“dstEdit”)
view which should show the “emailForm” form

The form exists; I’ve debugged and found values for fields in form like
emailForm.getItemValue(‘dTipo’)
But it just does NOT appear in the Layout!

  1. Can you reproduce it on the local sample dhtmlxLayout/samples/01_init/09_views.html ?
  2. What exactly behavior do you expect from the method setReadonly()?
  3. What exactly changes do you mean?

We need your completed demo to reproduce all the issues.
docs.dhtmlx.com/doku.php?id=othe … leted_demo

  1. I sent you a complete demo! Doesn’t it work?

  2. readOnly. I have a form that displays order details. If the order has been sent then the data must no longer be editable. So, according to this, I have to user form.setReadonly(“inputBox”)
    on each “inputbox” on the form

By (3) I mean
viewtopic.php?f=14&t=25642&start=0
The syntax for handling button events on forms changed and it drove me CRAZY for 3 days!

Darya, hi!

Here’s a bare-bones sample of the .setActive NOT working, and I can’t figure out why!!
testEmailSimp.rar (1.59 KB)

Darya

Here’s the complete demo as instructed by yourself, including the dhtmlx.js and dhtmlx.css
debugDemo.rar (536 KB)

  1. Place the next toolber event handler (replace with yours):

emailToolbar.attachEvent("onClick", function(id) { if(id == "tNew"){emailLayout.cells("a").view("dstEdit").setActive();} else if (id == "tDel"){emailLayout.cells("a").view("def").setActive();} });
2) Wait for an answer, pleace
3) Yes, attribute “command” doesn’t exist any more. Use:

myForm.attachEvent("onButtonClick", function(name,command){ if (name == "btn"){ ...code...} });

  1. still doesn’t work!

there’s not much difference between using “if” or “case” … it all comes down to the “setActive” command which, in this case, doesn’t do anything!

FOr the other two points, thank you

Francesco

About 1:
replace your dhtmlx.js file with attached in archive
About 2:
see attached sample with offered approach
debugDemo_.rar (957 KB)

Ok Darya,
I’ve solved the problem and IT IS a BUG!

You’re example doesn’t work either, even with the libraries downloaded today. I’ll explain:

When the window had finished loading, it is displaying the default view, right?

BUT, if, from you’re example, you try to select the alternate layout (the green button), it doen’t work. you have to FIRST select the red button, in practice setting active the default view, even though it is already active!!

So even to make your code work properly, you have to add
emailLayout.cells(“a”).view(“def”).setActive();
to the end of the code, before clicking any buttons !

Try your example, try ONLY clicking the green PLUS … you will see it will NOT work until you first click the RED button, setting active the view that is ALREADY active!!!

Francesco

Yes, this issue was reproduced and we fixed the dhtmlx.js file. Have you replace it?
dhtmlx.rar (228 KB)

hi all

problem was with form, when it attached to layout’s cell active view was automaticaly switched to form’s view, that’s why you need to click to show grid view before form. dhtmlx.js above fixed.

Thanks!

Glad I wasn’t wasting your time, then !

Will be purchasing pro version shortly (been waiting for approval from above…), the tools are great, just take about a year to learn them!