XPages loading time in the Firefox with richtext - lotus-notes

i created an XPage with an richtext editor an an datepicker.
When i open documents with this XPage and change from the read to the edit mode. It will takes (without cache) 5-10 secconds to load (chrome just take 0,5 secconds).
The problem is as you can see, it will load a lot of dojo ressources.
It only happends while the richtext editor or/and the datepicker are in the XPage.
Is there a way to tell the domino server to send the dojo lib as one compressed file?
Or is there another solution to solve this problem.
Thanks.
UPDATE
the property xsp.resources.aggregate=true does not work for this problem.

You can use "Use runtime optimized javascript and CSS ressources". This option can be found on the Application Properties, Section "XPages". This will add the parameter
xsp.resources.aggregate=true
to your xsp.properties file and enables the feature for you whole application.
Alternativly you can enable this feature for one XPage only by adding this lines to the XPages source code:
<xp:this.properties>
<xp:parameter name="xsp.resources.aggregate" value="true" />
</xp:this.properties>

finally i found the problem. It will only cause if the editbutton makes a partial update on a panel with a document and a richtext editor inside. If i make a full refresh it will load the compressed files.

Related

Displaying Extension Library Dialog box when page loads?

Is there any way to display an extension pages dialog box when my page loads?
Add a <xp:scriptBlock /> with the following client-side code as its value:
XSP.addOnLoad(function(){XSP.openDialog("#{id:dlgMessage}");});
...just be sure to place the component outside any refresh targets, or it will launch the dialog again after every partial refresh event with a target that includes it.
Try adding a dojo.addOnLoad() (in a xp:scriptblock) that displays the dialog using CSJS: XSP.openDialog()
Bruce,
You could use jQuery to 'push' the button on page load.
Try putting this clientside js code in your onClientLoad event
$(document).ready(function(){
$('a.btn').trigger('click');
});
You will have to load jQuery to use this if you don't already have it loaded. You might also be able to do the same thing with dojo.
EDIT: You might have to modify the selector (the tag and class in the parens line 2) above if not using bootstrap. I would give it a unique class so as not to 'push' any other buttons at the same time.

xpages extension Library dialog read only

Can the xpages extension library dialog box (xe:dialog) be open so that it's fields are read only ?
Lotus Domino 8.5.3 version update 1 extlib
Thanks
If you make a panel control read only, the controls within the panel control are read only too. So, add your fields inside a panel control and make it read only:
<xp:panel readonly="true">
Add your fields here
</xp:panel>
The content of the dialog is defined by the structures declared within it, so you'd just make your elements within the content area computed text, or readonly fields, however you want to do it. If your question is can it be opened read-only sometimes, save a variable to the scope and use that to determine whether or not to render controls as editable.

XPages Open view and open XPage in edit mode

I've told a view to open using an XPage, but how do I open that XPage in edit mode?
I will suggest that you buy and read the Mastering XPages book to learn the basics of handling views and documents in XPages. The book contains material that describes exactly what you are looking for (how to open an XPage in read and edit mode).
I will assume your question relates to the XPage being used to open the selected document from the view and not the view itself as it is not possible to either define an XPage to to launch a view or for a view to be in "Edit Mode"...
When specifying the document data source for an XPage it is possible to define the default action as being Edit Document or Open Document. This sets the "action" property of the data source
The XPage itself has a "readonly" property that can be set to a specific value or computed. This is not tied to a specific data source.
It is possible to add a panel container control to the XPage and set the "readonly" property of the panel. This will allow all the controls inside the panel to be rendered as editable or readonly.
views and xpages cannot be in edit mode, only document data sources can be in edit mode.
In addition to the readonly properties that Peter mentioned:
It is possible that a custom control got its own data source while the one from a parent (e.g. the xpage) is in edit mode. That's the mistake i make often while binding controls to data fields.

Dynamic Content Control in Extlib flips out after rebuild

I have an issue with the dynamic content control in ExtLib. Every time I compile my xpage the dynamic content control flips out if I do not reload the page. I need a way to control this, like an onerror event on the control.
this is wahat's happening
I open my webpage, the dynamic content control works fine
I do some changes to my xpages and build (webpage still open)
I click a link on my webpage to reload the content in the dynamic content control.
the webpage flips out and starts to reload constantly using a partial refresh url.
I use various ways to update this control. sometimes it is through a csjs link and somtimes it is per interval using XSP.partialRefreshGet() so I guess I need a way to know if the dynamic content control is available before calling it, or let the control notify me somehow that is is not available
any idea?
Thanks
Thomas
When you change an XPage you must do a manual full reload of that page in any browser. Executing any call from the stale page will not work.

XPages templating dialog boxes

I am currently on a project redesigning an existing traditional domino web application to XPages. This application contains a web form with quite a lot of helper dialog boxes. Also notifications and validation and confirmation is done through dialogboxes.
I know I can create a custom control for each dialog box and add it to the Xpage and call the show. I even managed to load it dynamically using a dynamic content control with a facet for each dialog. Since the dialog cc contains a show() in the onClientLoad. It is easy to open a dialog by switching the content of the dynamic content control.
Still, adding all these custom controls to my XPages feels inefficient and really clutters the design tab. What's your take?
I would prefer setting the content of the dialog dynamically (Like in traditional domino you would define a form for each dialog). Is that possible?
If not is it possible to load a custom control dynamically (Like using a computed subform)?
Also for confirmation boxes I need the OK button to execute different code for each confirm. What would be the best way to implement that? Add custom parameter "functionOnOk" to the "dlgConfirm" custom control and evaluate that in the submit button?
PS: I am still using panels with dojoType=dijit.DialogBox, but will change those to extlib dialog boxes. For the confirm and messageboxes I am now using client side dijit.Dialogs with mark-up in code, but I would like the markup in XPages as well.
I know there are issues with panels with dijit.Dialog, because Dojo moves the dialog in the DOM, which prevents any SSJS in the dialog running. I don't know if that's also an issue with dijit.DialogBox, but I suspect it could be. Jeremy Hodge did some code to workaround that.
However, I would strongly recommend using the Extension Library control. Client-side dijit.Dialogs are likely to be much more difficult to code and will not allow any SSJS interaction. I'm not aware of any Dojo properties not available in the Extension Library control, and the Extension Library control also allows you to open or close the dialog both in CSJS or SSJS. It also allows you to specify an area to refresh on close.
In terms of the properties, preload is there purely to speed up showing. Are you using the refreshOnShow property? This ensures the URL or content is refreshed each time the dialog is shown. The Extension Library chapter on dialogs has a table covering all the properties. You can set the URL to point to another XPage or another web page. This may allow you to use the Dynamic Content control to pass parameters to switch the content that should appear.
In terms of the code behind the OK button, if you use the Extension Library dialog, you have all the functionality you would have outside the dialog.

Resources