PDA

View Full Version : Hide/When not working...



R.J
12 Jan 2010, 12:45 AM
Lotus notes hide/when for e.g. @isnewdoc is not working on form's action bar. It shows the action buttons even if the hide/when is applied.

following is the code written in jsheader of the form to apply the extnd UI/



Ext.onReady(function() {
var uidoc = new Ext.nd.UIDocument({
bodyStyle : 'padding:10px',
layout : 'fit',
autoScroll : true
});
uidoc.render();
});



and following is the code in the head content of the form.


thisWebDbName := @WebDbName;

extndDbWebPath := "/Apps/extnd_b3.nsf/";
extUrl := extndDbWebPath + "ext/3x/";
extndUrl := extndDbWebPath + "extnd/3x/";
mode := @If(@UrlQueryString("debug") = "true"; "-debug"; "");
mode := "-debug";
unid := @If(@IsNewDoc;"";@Text(@DocumentUniqueID));
editMode := @If(@IsDocBeingEdited;"true";"false");


"<!-- Ext JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extUrl + "adapter/ext/ext-base.js'></script>" + @NewLine +
"<script type='text/javascript' src='" + extUrl + "ext-all" + mode + ".js'></script>" + @NewLine +

"<!-- Ext.nd JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "extnd-all" + mode + ".js'></script>" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "Session.js?OpenAgent&db=" + thisWebDbName + "'></script>" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "UIDocument.js?OpenAgent&db=" + thisWebDbName + "&unid=" + unid + "&editmode=" + editMode + "'></script>" + @NewLine +

"<link rel='stylesheet' type='text/css' href='" + extUrl + "resources/css/ext-all.css' />" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "resources/css/domino.css' />"


Please help..!!!

Cheer..!!!

jratcliff
12 Jan 2010, 6:58 AM
Ext.nd doesn't yet evaluate hide/when *formulas* when converting actions from dxl. We can only look at the hide properties that are set (hide in read mode, edit mode, etc.). However, if you have hide/when formulas we do give you the option to have Ext.nd create the actions from the domino generated javascript instead of from dxl and to do so you set the 'createActionsFrom' property to 'document' (it defaults to 'dxl').



Ext.onReady(function() {
var uidoc = new Ext.nd.UIDocument({
bodyStyle : 'padding:10px',
createActionsFrom : 'document',
layout : 'fit',
autoScroll : true
});
uidoc.render();
});

R.J
12 Jan 2010, 8:46 PM
Hi Jack,

Thanks for the help.. My Hide/whens are now working with your suggestion, but the icons set next to the button are not visible.

Any guesses why the icons disappear ?

Thanks in Advance. !!

seda
28 Jul 2010, 1:17 AM
I confirm the problem in IE8. With createActionsFrom : 'document' param of uidoc, action bar icon's in IE8 (maybe in other ver. IE too) disappears. It doesn't matter if extnd_b3 or extnd_b4 is used. Any fix?

seda
28 Jul 2010, 4:10 AM
I thing there is a problem in the uidoc.topToolbar.actions[0].icon path. If the conf: createActionsFrom : 'document' is active.

In my app, there is the icon path like this:

FF: "/icons/actn035.gif" - ok
IE: "/db.nsf/http:127.0.0.1/icons/actn035.gif" - ?

jratcliff
29 Jul 2010, 11:39 AM
it's fixed in our next beta that will be released soon. Otherwise, if you want to create your own override, the line of code in the Actionbar.js file that was changed went from this:



imageRef = (imageRef == null) ? null : (imageRef && imageRef.indexOf('/') == 0) ? imageRef : this.dbPath + imageRef;
this.dbPath + imageRef;


to this:


imageRef = (imageRef == null) ? null : (imageRef && (imageRef.indexOf('/') == 0 || imageRef.indexOf('http') == 0)) ? imageRef : this.dbPath + imageRef;

seda
30 Jul 2010, 1:21 AM
Thank you Jack. It works. Lookin forward the new beta.