191 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
An apparent theme: application agnosticism
Fri, Aug 19th 2016 2
Sessions for #MWLUG2016
Fri, Jul 1st 2016 5
Can you hear me now? Life without #HearingLoss
Tue, May 10th 2016 1
Austin, Texas hosts #MWLUG2016 in August
Wed, Apr 6th 2016 3
Orphan #Java class files in the Local folder in #XPages
Thu, Mar 31st 2016 2
An agent to change field values to help in #XPages
Tue, Mar 22nd 2016 2
Copying property definitions for custom controls in #XPages
Thu, Mar 10th 2016 1
Top 10
Showing a database in a panel in #IBMNotes
Tue, Jul 22nd 2014 5
Sessions for #MWLUG2016
Fri, Jul 1st 2016 5
Sample database for #Excel exporting from #XPages
Mon, Feb 24th 2014 4
Exporting from #XPages to Excel without Excel, Part 2
Thu, Sep 26th 2013 4
Simple view without links in #xpages
Fri, May 2nd 2014 4
Dirty pages and keeping users on them in #XPages
Wed, Apr 16th 2014 3
Are you sure? Asking for confirmation in #XPages
Wed, Sep 17th 2014 3
What “They” Never Tell You About Owning a Business #MWLUG2015
Wed, Aug 19th 2015 3
Austin, Texas hosts #MWLUG2016 in August
Wed, Apr 6th 2016 3
Exporting from #XPages to Excel without Excel, Part 1
Wed, Sep 25th 2013 2


Simple view without links in #xpages
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
David Navarre    

One of my co-workers, Neil Enet, asked me the other day if it was possible to set up a view but prohibit the users from opening the documents. I tossed out the idea of using an HTML table with all the HTML for the rows and cells being computed in one column of a view.

"<tr><td>" + approverName + "</td><td>" + approvalType +"</td><td>" + description"</td></tr>"

Unfortunately, that’s pretty clunky and not very satisfying. So, as we talked, I said, “Hey, how about you create an XPage with a view and just don’t make any of the columns clickable?” So, he did.

I asked Neil to comment on it, and he had some great thoughts:

My first XPage. I’ve never competed on a race before, but I imagine the feeling of winning one as being pretty similar to seeing this XPage for the first time. And OK, let’s be honest, it’s a pretty simple XPage. “Simple” might be too much of a word, actually. It’s just a view. ONE view.

The process was extremely easy. I just dragged the View Control, linked it to the view in Notes that I wanted, and voilà. I changed the font size and color of each column, and that felt like an even more awesome achievement.

The funny thing is I’m sure that if I never had the need to create a view like this, where users weren’t able to open documents, this wouldn’t have been so fulfilling. I can see myself saying: “Great, I just created a view, and you can’t open any docs. What’s the big deal about THAT?” But it turns out that that’s exactly what I needed. So simple! And to think that Old Notes didn’t allow me to do this, and that I had to go down the “terrifying” XPages way. Ha!

I can’t think of a better way to start playing with XPages. I now know I can do one, and I know I’m being very naive if I say “XPages is a piece of cake”, but there it is on my system, and I’m sure it will not be the only one.

I’m looking forward to creating more complex XPages, and it’s very very exciting. I might just take a picture of my XPage and put it next to my wife’s here on my desk. And when people walk by and ask me what that is, I’ll answer: “That’s the most simple XPage in the world. But you know what? It’s MY simple XPage.”

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

<xp:viewPanel rows="30" id="viewPanel1">
	<xp:this.facets>
		<xp:pager partialRefresh="true" layout="Previous Group Next" xp:key="headerPager" id="pager1">
		</xp:pager>
	</xp:this.facets>
	<xp:this data>
		<xp:dominoView var="view1" viewName="COPApprovals"></xp:dominoView>
	</xp:this.data>
	<xp:viewColumn columnName="$11" id="viewColumn1" style="font-weight:bold;color:rgb(0,0,160)">
	</xp:viewColumn>
	<xp:viewColumn columnName="$10" id="viewColumn2" style="font-weight:bold;color:rgb(0,64,0)">
	</xp:viewColumn>
	<xp:viewcolumn columnName="$12" id="viewColumn3">
	</xp:viewColumn>
</xp:viewPanel>

</xp:view>

Then, to get users to access it from their Old Notes, using an Outline Entry to open the URL….

targetXpage := "internalApprovals.xsp";

server := @Subset ( @DbName; 1 );
path := @Subset ( @DbName; -1 );

fserver := @Name([CN]; server);
fpath := @ReplaceSubstring(path; "\"; "/");

url := "notes://" + fserver + "/" + fpath + "/" + targetXpage;

url

And now, Neil has developed his first XPage, users will be able to see status on their documents and everyone will be happy. (Well, I’ll be happier once he goes back in and names the columns in the old view, gives better IDs to the XPage viewColumns, puts it all onto an application layout control and makes everything pretty, but, it works!)

So, if you’re still in fear of XPages, you needn’t be. Go forth and be LOST IN XPAGES with the rest of us!

 




---------------------
http://lostinxpages.com/2014/05/02/simple-view-without-links-in-xpages/
May 02, 2014
5 hits



Recent Blog Posts
2
An apparent theme: application agnosticism
Fri, Aug 19th 2016 9:55a   David Navarre
A
5
Sessions for #MWLUG2016
Fri, Jul 1st 2016 11:54a   David Navarre
A
1
Can you hear me now? Life without #HearingLoss
Tue, May 10th 2016 11:50p   David Navarre
A
3
Austin, Texas hosts #MWLUG2016 in August
Wed, Apr 6th 2016 4:46p   David Navarre
A
2
Orphan #Java class files in the Local folder in #XPages
Thu, Mar 31st 2016 3:56p   David Navarre
A
2
An agent to change field values to help in #XPages
Tue, Mar 22nd 2016 1:14p   David Navarre
A
1
Copying property definitions for custom controls in #XPages
Thu, Mar 10th 2016 1:11p   David Navarre
A
2
Pause to breathe: a note from Lotusphere ’16
Mon, Feb 1st 2016 4:11p   David Navarre
A




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition