PDA

View Full Version : Fix for (Hide When Formulas Not Working in Action Bar) in beta 1



mth96a
21 Jul 2008, 9:18 AM
Change the code in extnd-all.js

under Ext.nd.Form =

you will find this

new Ext.Toolbar({id:'xnd-form-toolbar',plugins:new Ext.nd.Actionbar({noteType:'form',noteName:this.formName,uiDocument:this.uidoc,useDxl:true,

change to this

new Ext.Toolbar({id:'xnd-form-toolbar',plugins:new Ext.nd.Actionbar({noteType:'form',noteName:this.formName,uiDocument:this.uidoc,useDxl:false

Something in the usedxl: true screws up the hide when capabilities.

:D

jratcliff
22 Jul 2008, 11:35 AM
Ahh, good catch. I forgot we had that code still in there. In the prior versions of Ext.nd the actionbar code would go and "find" the action bar that was created by domino on the actual page. Domino would place the actionbar in a table at the top of the page. However, we soon discovered issues with that approach:

1) this didn't work for views where we grabbed the data via ?readviewentries and the design via ?readdesign

2) if the developer placed any pass-thru html at the top of the form then this html was inserted before the domino generated table and thus made it hard for us to know which table the actions were in (in the cases where the pass-thru html was a table)

3) if a form didn't have an action bar or any actions, then we had know way of knowing this and could then mistake the first table on the page as the action bar

So we then decided to go with the DXL solution. The only downside so far is with complex hidewhen formulas. We are, however, working on this and I'm confident we will have a solution soon.

In the meantime, this change you are making should be fine for your forms (just keep an eye on your pass-thru html at the very top of a form). However, this will not work for view action bars.

DBaker
18 Sep 2008, 7:00 AM
Ahh, good catch. I forgot we had that code still in there. In the prior versions of Ext.nd the actionbar code would go and "find" the action bar that was created by domino on the actual page. Domino would place the actionbar in a table at the top of the page. However, we soon discovered issues with that approach:

1) this didn't work for views where we grabbed the data via ?readviewentries and the design via ?readdesign

2) if the developer placed any pass-thru html at the top of the form then this html was inserted before the domino generated table and thus made it hard for us to know which table the actions were in (in the cases where the pass-thru html was a table)

3) if a form didn't have an action bar or any actions, then we had know way of knowing this and could then mistake the first table on the page as the action bar

So we then decided to go with the DXL solution. The only downside so far is with complex hidewhen formulas. We are, however, working on this and I'm confident we will have a solution soon.

In the meantime, this change you are making should be fine for your forms (just keep an eye on your pass-thru html at the very top of a form). However, this will not work for view action bars.


For some reason, I can't get this to work. Before the style is applied to the buttons, I can see they are hiding correctly. But once the style is applied, all buttons are visible.

Any other suggestions? Or has this been resolved in this latest release?

Thanks.

jratcliff
18 Sep 2008, 7:43 PM
For some reason, I can't get this to work. Before the style is applied to the buttons, I can see they are hiding correctly. But once the style is applied, all buttons are visible.

Any other suggestions? Or has this been resolved in this latest release?

Thanks.

so you edited the extnd-all.js file directly and set useDxl:false? That should have fixed it. I'll look some more at the hide-when stuff and see if I can finish that off for a beta 1r2 release.

DBaker
1 Oct 2008, 10:05 PM
so you edited the extnd-all.js file directly and set useDxl:false? That should have fixed it. I'll look some more at the hide-when stuff and see if I can finish that off for a beta 1r2 release.

Yes.

I edited the extnd-all.js file directly...but I also had a Form override in my JS Header that was setting it back to true.

But now that I have it set it to false, I'm getting this error: Lotus Notes Exception - Too many arguments for @Function. I get this button even if I remove everything from the form and all the action buttons (except the edit button).
If I set it back to true, I don't get this error, but all my action buttons show.

Any ideas?

Thanks again.

DBaker
3 Oct 2008, 11:40 AM
Yes.

I edited the extnd-all.js file directly...but I also had a Form override in my JS Header that was setting it back to true.

But now that I have it set it to false, I'm getting this error: Lotus Notes Exception - Too many arguments for @Function. I get this button even if I remove everything from the form and all the action buttons (except the edit button).
If I set it back to true, I don't get this error, but all my action buttons show.

Any ideas?

Thanks again.

FYI -

I had to change the Edit button formula from @Command( [EditDocument] ; "1") to @Command( [EditDocument]).

Not sure why this was causing the error.