XPages Navigator Control to Open Profile Document? - xpages

Converting a legacy Notes application to XPages with Extension library.
Using application layout with navigator control for basic site navigation.
Stuck on how to have a navigator menu item open a profile document for editing by administrator type user...
Have an XPage created that binds to the profile form, but not finding way to have it opened on the onClick event of navigator menu item?
Any suggestions?

You can use ordinary data source. First, get UNID of profile document and initialize data source with it.
WARNING: profile documents are cached, you need to restart http or reset application if there is some background change to profile document (otherwise you see old values). Avoid using profile documents with frequent changes!

With XPages, profiles are obsolete. A better approach is to move the contents of the profile to a regular document and then in the application_init () method read all that data into the application scope. If you have updating profiles then this is critical because of the issues updating profiles across multiple servers and JREs.
If you must use the profiles, on the navigator, set it to open the profile.xsp in Edit mode. The profile.xsp then Edits the profile with the Default Formulas of each bound field retrieving the value from the profile using SSJS. The Submit button runs SSJS which iterates through the items on the document and writes them to the profile, but does not save itself to disk.

Related

xpage creates save conflict on save/submit

I have an xpage that on submit of an edit to an existing document, a save conflict is created each time you click the submit button. I am the only one that has access to this application currently so I do know there are not any other users that be be saving also.
I noticed this when I attached a document data source to multiple custom controls that I used in that xpage. When the save document simple action was executed it resulted in save conflicts all the time.

xpages document will not ever switch to the edit mode

I have tried using the simple action to toggle mode, simple action to change mode to edit, have the view link open the document in edit mode. Nothing actually puts the document fields into an editable state. There are not any authors fields on the document and I have manager access to the database. This is an application update of a classic notes client app to a xpages UI. So I am working with existing documents. I am totally clueless as to what to look at. There are zero errors in the browser or the server console. I can edit the documents just fine in the notes client.
If I create a test application and use the same methods to put documents into edit mode using the above mentioned methods, it works just fine. But not with a xpage using the existing documents. Any guidance you can give me on what to look for would be greatly appreciated.
Check the ACL and your author fields and the Internet access as Sven suggest

SharePoint 2010, Upload Document Redirect to Page

I have a document library in SharePoint 2010 that several different teams are using for the same purpose. Each team has their own page that has a filtered view of the document library on it. The document library also has custom columns.
The issue I am running into is when a team member uploads a document from their page. They click "Add document" from their page, and then they browse to the document they want to upload. This part works perfectly - and the URL specifies the source as the team's page. However, after a user selects the document and clicks "OK", it takes them to the EditForm.aspx page that allows the user to fill in the meta data for the document. This is fine, but now the source URL specifies a view from inside of the document library, and no longer points to the team's page (where they came from).
Does anyone know how I can change this source URL to point to the team's page instead of the document library? Or, does anyone know a workaround for this issue so that a user can upload a document from a page (with document library web part on it) so that it returns to the page?
Thanks!!
SharePoint 2010 should work the way you want out-of-the-box. I tried to reproduce your situation, but was unable to. What I did was set up a library with one custom column and two custom views. I then created two pages, one with a list form web part using one view and one with a list form web part with the other view.
When I click on the Add Document from either page, a modal dialog window opens to the Upload page. I first select the file (Upload.aspx) and then am redirected to the metadata properties (EditForm.aspx). After filling out the metadata, the dialog window closes, and the page behind it (the page we were originally on) refreshes to show the new document in the web part. So the user experience is that they stay on the page they want while adding the document as desired.
If you edit your question or provide comments with more details on your situation we can try to reproduce it, but the functionality you describe is exactly how it is supposed to work out-of-the-box.
Peter's correct - SharePoint's being SharePoint.
If I am reading this right, it may be that you should simply check out in-line editing. Using a view, you and edit the properties dynamically without leaving the page (each team getting their own view).
Alternately, I see many who simply want to redirect users back to the page they came from either edit or view of an item regardless of where that was (a link, etc.). Simplest way to do that is a little programming by adding a button to the forms replacing the OK/Cancel with your own code. Simply edit the forms using InfoPath to add the new buttons - you have the user context if you need to custom redirect to a team home page or some such.

Sharepoint 2007: Pop up message on new announcements

Is it possible to display on a page a javascript popup message if there are new unseen items in an announcements list?
If you want the pop-up to jump out even when the user does not refresh a page, you will need to develop a polling mechanism (using JS) and call a web service to find out if there are new items.
Otherwise, you just need to add a web part to the page that will do the check on page load.
We did something similar, showing the users how many documents there are in a document library that each user has not read. we used the SPAudit object to find our what items have been seen by which user. Of course it has to be optimized for performance, so we just check a few of the latest items, not all of them. We even added this to the quick links menu, so that next to each document library appears a number of document the current user has not read yet, it is really cool, very similar to what you need.
You could store the last time the user viewed the announcements in a cookie and read that out to compare against the newest item. You can also store that the user has closed the pop-up.
Have a look at the following resources. You can make it work with minimum alteration
Using Jquery In Sharepoint To Display Notifications For Open Tasks
SharePoint Tasks Popup using JavaScript API
jQuery Ticker for SharePoint Announcement List

How to programmatically disable ECB menu item for a particular list item?

I have a custom document library which is based on default document library. I'd like to disable Edit physical document for some of the documents depending on their property.
If you don't mind a client side solution then you can use either a single Content Editor Web Part to inject some JavaScript on a single page or execute the script on every page in the site collection using our free SharePoint Infuser.
Plenty of examples, although not your particular problem, can be found here.

Resources