Задача простая: дать пользователям редактировать один и тот же документ как в Lotus клиенте, так и через браузер. С клиентом нет проблем, в браузере все поля в режиме только для чтения.
Добрый день, доводилось ли кому нибудь генерировать Xpages страницы программно, есть ли способ править их XMLину, или получить доступ к DOM уже отрендереного документа, но на стороне сервера?
So, I needed to add a printer-friendly option to a SharePoint List Item. After a bit of Googling I found that most suggestions were based upon using print-based StyleSheets, whereas I wanted something a bit more solid. What I ended up doing was adding a completely new page that gave me full control of what appeared when printed. Here's how I did it.
The Print Popup
Out of the box SharePoint gives you a standard toolbar on each List Item, like the one below, which also has the custom button that I'm going to show you how to add later on.
When clicked this new button opens a popup with a page that's ready for printing, like below:
Note that the two buttons you can see on the popup are hidden from printing using some CSS on the page.
Adding The Button
To add this button to the toolbar of the List Item in question I first created a new Feature in my WSPBuilder project in Visual Studio.
In the resulting elements.xml file I then added a <CustomAction> child to the <Elements> tag, which looked like this:
You should be able to work out what's going on here. When the project is built and deployed and the feature is enabled through the Site Settings then you get a new button on the "read mode" tool bar for list items based on the specified content type (whose ID is listed in the RegistrationId attribute).
Adding the Print Form
You'll notice quite a few references to the "_layouts" directory in the XML code above and may be wondering what it is? Well, I'm no expert and not sure exactly what it is, but, as I see it, it's somewhere to put custom ASP.NET pages, images etc.
You can see the required folder structure in this WSPBuilder project below. To make them available in the actual "_layouts" directory for your site you just right-click the "ACME" parent folder in Visual Studio and choose "Copy to 12 Hive".
It's the print.aspx page that we're going to use to display our print-friendly page in a popup. Notice in the button's XML that the URL used to open this page passes to it the ID of List and the List Item, so we can then get a handle on them in the "onload" event of the ASPX page.
As you can see the OnLoad page event fills the to Literal elements with data from the List item, which it got to using the URL parameters passed.
Summary
This approach probably isn't as simple as adding a special print stylesheet to the item itself, but this is sometimes my preferred approach. Especially when dealing with HTML so overly verbose as SharePoint's, where the CSS to hide everything but the relevant content must be a nightmare to compile and maintain.
Either way it's a nice simple example of adding custom toolbar buttons and ASPX pages to the _layouts directory.
NEW COURSE - LEARN XPAGE DEVELOPMENT! Learn how to develop XPages with TLCC's new course, Developing XPages using Domino Designer 8.5. Learn XPages at your own pace and at your place. An expert instructor is a click away if you need help. Not just a collection of sample exercises, Developing XPages Using Domino Designer 8.5 is a complete and comprehensive course that will give you a thorough understanding of this exciting new technology in Domino.
Yesterday I started using TweetDeck instead of Twitter.com as a tool for reading/posting tweets and boy am I glad I did. If you're stilling using Twitter.com, stop!
Anyway, first thing I did was set up some search columns - two of which you can see below. On the left is a "real time" feed of tweets that have the word sharepoint in and on the right those that have the words lotus and domino in them.
The picture kind of speaks for itself -- there seems to be a tweet about SharePoint on average once a minute (if not more), whereas Domino tweets are about a dozen a day.
My point being that one of them seems a happening, buzz-filled place to be and the other doesn't.
Perhaps this isn't fair? It's hard to track down all of the Lotus Domino tweets via search, as searching for just Domino brings up too much other stuff, while looking for both "Lotus" and "Domino" undoubtedly misses out tweets about Domino which don't have both words in them. But, nonetheless, I think it speaks volumes. Not looking for a flame war (it's not like I'm firmly on either side or anything), just though I'd mention it.
Going to have to remove the sharepoint search for now, as there are so many popup notifications that's it's a constant distraction.
Got this email from my dad last night. If you want a cheap iPad, you'd better act fast!
Jake i see on your site that your thinking of getting an ipad? a friend has 10 iPads going for half price- its first come first serve He has already sold one (pic is attached.)
let me know if you want one dad
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
↓ ↓ ↓ ↓
I don't think I've laughed that much at an email from dad for a long time. What made it even funnier was that I believed it at first, as you would (well, I had just come in and had had a couple of pints).
BTW: That's not my dad in the picture. In case you're wondering.
In the Standard client under Show Calendars, if a user deselect his/her calendar then close the calendar or shut down Lotus Notes, upon the next startup of Lotus Notes or accessing their calendar, the user's calendar entries would appear briefly then quickly disappear in 8.5.1...
It would be nice if the user's calendar is selected by default upon closing/opening the calendar view or the Lotus Notes client...
At present, SmartIcons can only work against single view entries.
When one wants to create a generic tool that can run on multiple documents, or do something altogether different with the Selected Database), one cannot.
This could be enhanced by allowing LotusScript behing SmartIcons, where NotesSession.currentDatabase is the selected workspace database (or databases(s)???!!!!).
Flow (http://flow.openntf.org),
the advanced LotusScript logging engine, has gone Gold. The Flow project
was first posted to OpenNTF in 2008 and has been in beta until today. Though
the Flow beta was stable enough to be the logging engine for all ...
The BlackBerry Java SDK 6.0 simulator from RIM comes with a WebKit browser. I've tested the XPages Mobile Controls briefly on that browser and the http://i.openntf.org sample app works fine without any code changes. Very promising. Looking forward to ...
If you are a fan of using the OpenLog project to capture errors and events in your applications and, have used it in your enterprise applications I would appreciate hearing from you. I am putting together a presentation for a series of talks with enterprise ...
After expanding a conversation thread in Lotus Notes 8.0.2 (Standard Configuration) client and opening a message, any subsequent attempts to open other messages by double clicking from the Inbox view fails. The memo accessed from the expanded thread keeps opening up. Disabling the option "Show check marks in margin for selected documents" works around this problem.
In Notes 8.x Standard clients, the new Recent Contacts feature does validate email addresses typed in by the user or replied to for compliance with RFC821 or 822 standards. Thus addresses such as <'joeuser@domain.com'> could be added to a user's Recent Contacts view
When using the Open button in Notes to open the Calendar, Mail, Workspace or other bookmarks, the error "Invalid directory name or device not ready" is shown. If the application is opened using the buttons in the Home page, the error is not shown.
IBM Lotus Domino Server 8.5.1 Fix Pack 4 for IBM i V5/ Type: Incremental Installer / Release Date: 11 August 2010. See 'More info' link above for additional information.
IBM Lotus Domino Server 8.5.1 Fix Pack 4 for IBM i V6/ Type: Incremental Installer / Release Date: 11 August 2010. See 'More info' link above for additional information.
The Notes client may crash after opening a document in the mail file and pressing <Enter> a few times to scan through the next few documents in the view.
The IBM Lotus iNotes Redirect database is an application that can be used to redirect a user's browser to their iNotes mailfile based on their user name and password. One of the options available when configuring this database is the ability to enable "Personal Options", which allows users to ...
In many environments, it is necessary to use an existing Microsoft IIS server as the frontend Web server for transparently forwarding HTTP requests to a backend Domino web server, effectively allowing users to access Domino databases through IIS. This is a common scenario when the IIS server is ...